tech-kern archive

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

fix for port-xen/44734 (now kern/44734)



Hello,
I looked at port-xen/44734 "Starting atalkd triggers assertion panic with
i386 xen domU", which I requalified as kern/44734 as it's not xen-specific.

The problem is that MOWNER_ATTACH(&aarp_mowner) is not done before
using it in aarpprobe(). I propose to move MOWNER_ATTACH(&aarp_mowner)
to ddp_init(), the drawback being that aarp_mowner is now exposed
outside of aarp.c
Is it acceptable ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: aarp.c
===================================================================
RCS file: /cvsroot/src/sys/netatalk/aarp.c,v
retrieving revision 1.27
diff -u -p -r1.27 aarp.c
--- aarp.c      24 Apr 2008 11:38:37 -0000      1.27
+++ aarp.c      4 May 2011 09:44:59 -0000
@@ -511,7 +511,6 @@ aarptnew(const struct at_addr *addr)
                first = 0;
                callout_init(&aarptimer_callout, 0);
                callout_reset(&aarptimer_callout, hz, aarptimer, NULL);
-               MOWNER_ATTACH(&aarp_mowner);
        }
        aat = &aarptab[AARPTAB_HASH(*addr) * AARPTAB_BSIZ];
        for (n = 0; n < AARPTAB_BSIZ; n++, aat++) {
Index: aarp.h
===================================================================
RCS file: /cvsroot/src/sys/netatalk/aarp.h,v
retrieving revision 1.2
diff -u -p -r1.2 aarp.h
--- aarp.h      10 Dec 2005 23:29:05 -0000      1.2
+++ aarp.h      4 May 2011 09:44:59 -0000
@@ -76,4 +76,6 @@ struct aarptab {
 #define AARPOP_RESPONSE        0x02
 #define AARPOP_PROBE   0x03
 
+extern struct mowner aarp_mowner;
+
 #endif /* !_NETATALK_AARP_H_ */
Index: ddp_usrreq.c
===================================================================
RCS file: /cvsroot/src/sys/netatalk/ddp_usrreq.c,v
retrieving revision 1.33
diff -u -p -r1.33 ddp_usrreq.c
--- ddp_usrreq.c        4 May 2008 07:22:14 -0000       1.33
+++ ddp_usrreq.c        4 May 2011 09:44:59 -0000
@@ -569,6 +569,7 @@ ddp_init(void)
 
        MOWNER_ATTACH(&atalk_tx_mowner);
        MOWNER_ATTACH(&atalk_rx_mowner);
+       MOWNER_ATTACH(&aarp_mowner);
 }
 
 #if 0


Home | Main Index | Thread Index | Old Index