lkml.org 
[lkml]   [2005]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: 2.6.12-rc4-mm2 - sleeping function called from invalid context at mm/slab.c:2502
From
Guys, please CC netdev on issues like this.

On Tue, May 17, 2005 at 05:43:00PM +0000, Chris Wright wrote:
>
> This has some issues w.r.t. truesize and socket buffer space. The trim
> is done to keep accounting sane, so we'd either have to trim ourselves
> or take into account the change in size. And ultimately, we'd still get
> trimmed by netlink, so the GFP issue is still there. Ideally, gfp_any()
> would really be _any_

The trimming is completely optional. That is, if the allocation fails
nothing bad will happen. So the solution is to simply use GFP_ATOMIC.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -673,7 +673,7 @@ int netlink_unicast(struct sock *ssk, st
int err;
long timeo;

- skb = netlink_trim(skb, gfp_any());
+ skb = netlink_trim(skb, GFP_ATOMIC);

timeo = sock_sndtimeo(ssk, nonblock);
retry:
\
 
 \ /
  Last update: 2005-05-18 10:34    [W:0.080 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site