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

(usagi-users 02313) BUG() in sock_allock_send_skb() called from IPv6 ND (is Re: BUG check in latest (4.1) IPV6)



CC'd to davem and kuznet.

In article <3E9CA849.4020805@xxxxxxxxxx> (at Tue, 15 Apr 2003 17:48:09 -0700), Mark Huth <mark.huth@xxxxxxxxxx> says:

> I am running a VLAN test at the time, with large numbers of VLAN devices 
> being created and configured.

How many devices do you use?


> The obvious solution is to call sock_alloc_send_skb() with noblock = 1, 
> so that the thread will not attempt to sleep, but returns -EAGAIN.  The 
> ndisc_send_rs() routine will need to be recoded to check for the error 
> conditions besides NULL, and take appropriate action, like rescheduling 
> the timeout and returning.

I've commited a change just to change from noblock = 0 to 1 in our tree
as the first step.
(BUG() is fatal; just failing to send message would be okay...)


David, please apply the following patch (against 2.5.67 + CS 1.1202)
for now, to avoid fatal situation.  2.4 and 2.2 seem to have similar 
issue.  (bug reported by <mark.huth@xxxxxxxxxx>)

Index: net/ipv6/ndisc.c
===================================================================
RCS file: /cvsroot/usagi/usagi-backport/linux25/net/ipv6/ndisc.c,v
retrieving revision 1.1.1.8
diff -u -r1.1.1.8 ndisc.c
--- net/ipv6/ndisc.c	14 Apr 2003 04:34:17 -0000	1.1.1.8
+++ net/ipv6/ndisc.c	16 Apr 2003 17:19:40 -0000
@@ -462,7 +462,7 @@
 	}
 
 	skb = sock_alloc_send_skb(sk, MAX_HEADER + len + dev->hard_header_len + 15,
-				  0, &err);
+				  1, &err);
 
 	if (skb == NULL) {
 		ND_PRINTK1("send_na: alloc skb failed\n");
@@ -546,7 +546,7 @@
 		len += NDISC_OPT_SPACE(dev->addr_len);
 
 	skb = sock_alloc_send_skb(sk, MAX_HEADER + len + dev->hard_header_len + 15,
-				  0, &err);
+				  1, &err);
 	if (skb == NULL) {
 		ND_PRINTK1("send_ns: alloc skb failed\n");
 		return;
@@ -616,7 +616,7 @@
 		len += NDISC_OPT_SPACE(dev->addr_len);
 
         skb = sock_alloc_send_skb(sk, MAX_HEADER + len + dev->hard_header_len + 15,
-				  0, &err);
+				  1, &err);
 	if (skb == NULL) {
 		ND_PRINTK1("send_ns: alloc skb failed\n");
 		return;
@@ -1328,7 +1328,7 @@
 	len += rd_len;
 
 	buff = sock_alloc_send_skb(sk, MAX_HEADER + len + dev->hard_header_len + 15,
-				   0, &err);
+				   1, &err);
 	if (buff == NULL) {
 		ND_PRINTK1("ndisc_send_redirect: alloc_skb failed\n");
 		return;


-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@xxxxxxxxxxxxxx>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA