Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jul 2000 09:03:19 -0400 (EDT)
From:      kabaev@mail.ru
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/20057: M_WAITOK in interrupt context panic in NETGRAPH 
Message-ID:  <200007201303.JAA00453@kan.ne.mediaone.net>

next in thread | raw e-mail | index | archive | help


>Number:         20057
>Category:       kern
>Synopsis:       netgraph panics in ng_base.c:ng_path2node
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 20 06:10:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Alexander N. Kabaev
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:

FreeBSD kan.ne.mediaone.net 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Thu Jul 20 00:13:12 EDT 2000     kan@kan.ne.mediaone.net:/usr/src/sys/compile/KAN  i386

>Description:

   ng_path2node function is sometimes called from the interrupt context
   (from SWI => ng_intr => ng_pppoe_??? .... => ng_path2node), yet it
   allocates memory buffer with M_WAITOK. That causes the above mentioned
   panic. 

>How-To-Repeat:

   use ppp in PPPoe mode with INVARIANTS in the kernel

>Fix:

Index: ng_base.c
===================================================================
RCS file: /home/ncvs/src/sys/netgraph/ng_base.c,v
retrieving revision 1.20
diff -u -r1.20 ng_base.c
--- ng_base.c	2000/05/26 02:05:38	1.20
+++ ng_base.c	2000/07/20 12:48:06
@@ -1100,7 +1100,7 @@
 
 	/* Now compute return address, i.e., the path to the sender */
 	if (rtnp != NULL) {
-		MALLOC(*rtnp, char *, NG_NODELEN + 2, M_NETGRAPH, M_WAITOK);
+		MALLOC(*rtnp, char *, NG_NODELEN + 2, M_NETGRAPH, M_NOWAIT);
 		if (*rtnp == NULL) {
 			TRAP_ERROR;
 			return (ENOMEM);


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007201303.JAA00453>