NetBSD-Users archive

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

Re: [NetBSD-7] Panic in nfsd



Christos Zoulas a écrit :
On Jan 5, 11:57pm, joel.bertrand%systella.fr@localhost (=?UTF-8?Q?BERTRAND_Jo=c3=abl?=) wrote:
-- Subject: Re: [NetBSD-7] Panic in nfsd

Can you try something like this. Not even compile-tested...


christos

Index: if.c
===================================================================
RCS file: /cvsroot/src/sys/net/if.c,v
retrieving revision 1.318
diff -u -u -r1.318 if.c
--- if.c	31 Aug 2015 08:02:44 -0000	1.318
+++ if.c	6 Jan 2016 15:27:52 -0000
@@ -769,14 +769,20 @@
  	if_down(ifp);

  #ifdef ALTQ
+	int error;
  	if (ALTQ_IS_ENABLED(&ifp->if_snd))
-		altq_disable(&ifp->if_snd);
+		if ((error = altq_disable(&ifp->if_snd)) != 0)
+			printf("%s: altq_disable %d\n", ifp->if_xname, error);
  	if (ALTQ_IS_ATTACHED(&ifp->if_snd))
-		altq_detach(&ifp->if_snd);
+		if ((error = altq_detach(&ifp->if_snd)) != 0)
+			printf("%s: altq_detach %d\n", ifp->if_xname, error);
  #endif

-	if (ifp->if_snd.ifq_lock)
+	if (ifp->if_snd.ifq_lock) {
  		mutex_obj_free(ifp->if_snd.ifq_lock);
+		printf("%s: setting lock to NULL\n", ifp->if_xname);
+		ifp->if_snd.ifq_lock = NULL;
+	}

  	sysctl_teardown(&ifp->if_sysctl_log);



Just a question. I've opened /usr/src/sys/net/if.c and mine is older that yours. Mine begins with :

/*      $NetBSD: if.c,v 1.290.2.1 2014/11/11 12:20:28 martin Exp $      */

Is your patch against current or netbsd-7 ? I have found similar code in if_detach(struct ifnet *ifp). I'll test as soon as possible.

	Regards,

	JKB


Home | Main Index | Thread Index | Old Index