Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netatalk aarpprobe() is called before MOWNER_ATTACH(&aar...
details: https://anonhg.NetBSD.org/src/rev/94db8869cfb0
branches: trunk
changeset: 764841:94db8869cfb0
user: bouyer <bouyer%NetBSD.org@localhost>
date: Sun May 08 13:51:31 2011 +0000
description:
aarpprobe() is called before MOWNER_ATTACH(&aarp_mowner), leading
to a DIAGNOSTIC panic when MBUFTRACE is defined and atalkd is started.
Fix by moving MOWNER_ATTACH(&aarp_mowner) to ddp_init().
Should fix PR kern/44734
diffstat:
sys/netatalk/aarp.c | 5 ++---
sys/netatalk/aarp.h | 4 +++-
sys/netatalk/ddp_usrreq.c | 5 +++--
3 files changed, 8 insertions(+), 6 deletions(-)
diffs (68 lines):
diff -r 4cff7f075602 -r 94db8869cfb0 sys/netatalk/aarp.c
--- a/sys/netatalk/aarp.c Sun May 08 13:19:08 2011 +0000
+++ b/sys/netatalk/aarp.c Sun May 08 13:51:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aarp.c,v 1.34 2009/09/12 20:43:18 tsutsui Exp $ */
+/* $NetBSD: aarp.c,v 1.35 2011/05/08 13:51:31 bouyer Exp $ */
/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aarp.c,v 1.34 2009/09/12 20:43:18 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aarp.c,v 1.35 2011/05/08 13:51:31 bouyer Exp $");
#include "opt_mbuftrace.h"
@@ -508,7 +508,6 @@
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++) {
diff -r 4cff7f075602 -r 94db8869cfb0 sys/netatalk/aarp.h
--- a/sys/netatalk/aarp.h Sun May 08 13:19:08 2011 +0000
+++ b/sys/netatalk/aarp.h Sun May 08 13:51:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aarp.h,v 1.2 2005/12/10 23:29:05 elad Exp $ */
+/* $NetBSD: aarp.h,v 1.3 2011/05/08 13:51:31 bouyer Exp $ */
/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -76,4 +76,6 @@
#define AARPOP_RESPONSE 0x02
#define AARPOP_PROBE 0x03
+extern struct mowner aarp_mowner;
+
#endif /* !_NETATALK_AARP_H_ */
diff -r 4cff7f075602 -r 94db8869cfb0 sys/netatalk/ddp_usrreq.c
--- a/sys/netatalk/ddp_usrreq.c Sun May 08 13:19:08 2011 +0000
+++ b/sys/netatalk/ddp_usrreq.c Sun May 08 13:51:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ddp_usrreq.c,v 1.39 2009/04/16 21:37:17 elad Exp $ */
+/* $NetBSD: ddp_usrreq.c,v 1.40 2011/05/08 13:51:31 bouyer Exp $ */
/*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.39 2009/04/16 21:37:17 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.40 2011/05/08 13:51:31 bouyer Exp $");
#include "opt_mbuftrace.h"
@@ -554,6 +554,7 @@
MOWNER_ATTACH(&atalk_tx_mowner);
MOWNER_ATTACH(&atalk_rx_mowner);
+ MOWNER_ATTACH(&aarp_mowner);
}
#if 0
Home |
Main Index |
Thread Index |
Old Index