Re: [GIT]: Networking

David Miller
2009-06-16T09:57:12Z

From: Ingo Molnar <mingo@elte.hu>
Date: Tue, 16 Jun 2009 11:48:13 +0200

> I think David's larger point was that what looked to me like more
> widespread breakage was in fact limited to [a]x25, a comparatively
> rarely used (and rarely tested) corner of the kernel.
>
> I turned them off and that solved the problems here. (and i suspect
> the real fix wont be far away either) Thanks everyone.

This code path has been broken, basically, forever. It does a
lock_sock() from a timer, which has that might_sleep() check, and
essentially always has.

It would have warned this way years ago if someone had triggered it.

The code has been this way forever, so something else changed to start
triggering this on you.

I still am curious what in the world opens those sockets for you,
nothing normal should be doing so.

Can you satisfy my curiosity by turning X25 back on and booting
with this patch? Thanks.

diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index ed80af8..5214a38 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -494,6 +494,10 @@ static int x25_create(struct net *net, struct socket *sock, int protocol)
struct x25_sock *x25;
int rc = -ESOCKTNOSUPPORT;

+#if 1
+ printk(KERN_INFO "[%s:%d]: Creates X25 socket.\n",
+ current->comm, current->pid);
+#endif
if (net != &init_net)
return -EAFNOSUPPORT;