Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/sys/arch/xen/xen Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/4a0a6c06c54f
branches:  netbsd-3
changeset: 577801:4a0a6c06c54f
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Feb 01 20:45:34 2006 +0000

description:
Pull up following revision(s) (requested by bouyer in ticket #1154):
        sys/arch/xen/xen/if_xennet.c: revision 1.41
Fif off-by-one error: the last byte of a packet is at offset len - 1,
not len.
Should fix KASSERT panic reported by Mike M. Volokhov on port-xen.

diffstat:

 sys/arch/xen/xen/if_xennet.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 36c024b30640 -r 4a0a6c06c54f sys/arch/xen/xen/if_xennet.c
--- a/sys/arch/xen/xen/if_xennet.c      Wed Feb 01 20:43:25 2006 +0000
+++ b/sys/arch/xen/xen/if_xennet.c      Wed Feb 01 20:45:34 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_xennet.c,v 1.13.2.19 2006/01/22 10:41:59 tron Exp $ */
+/*     $NetBSD: if_xennet.c,v 1.13.2.20 2006/02/01 20:45:34 tron Exp $ */
 
 /*
  *
@@ -33,7 +33,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xennet.c,v 1.13.2.19 2006/01/22 10:41:59 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet.c,v 1.13.2.20 2006/02/01 20:45:34 tron Exp $");
 
 #include "opt_inet.h"
 #include "opt_nfs_boot.h"
@@ -989,7 +989,7 @@
                }
 
                if (m->m_pkthdr.len != m->m_len ||
-                   (pa ^ (pa + m->m_pkthdr.len)) & PG_FRAME) {
+                   (pa ^ (pa + m->m_pkthdr.len - 1)) & PG_FRAME) {
 
                        MGETHDR(new_m, M_DONTWAIT, MT_DATA);
                        if (new_m == NULL) {
@@ -1024,7 +1024,7 @@
                } else
                        IFQ_DEQUEUE(&ifp->if_snd, m);
 
-               KASSERT(((pa ^ (pa + m->m_pkthdr.len)) & PG_FRAME) == 0);
+               KASSERT(((pa ^ (pa + m->m_pkthdr.len -  1)) & PG_FRAME) == 0);
 
                bufid = get_bufarray_entry(sc->sc_tx_bufa);
                KASSERT(bufid < NETIF_TX_RING_SIZE);



Home | Main Index | Thread Index | Old Index