lkml.org 
[lkml]   [2009]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [GIT]: Networking

* David Miller <davem@davemloft.net> wrote:

> From: Ingo Molnar <mingo@elte.hu>
> Date: Tue, 16 Jun 2009 11:15:38 +0200
>
> > BUG: sleeping function called from invalid context at net/core/sock.c:1851
>
> This line in my tree (and Linus's) reads:
>
> if (sk->sk_lock.owned)
>
> what gives? :-)

hmmm - i have to declare the small kmemcheck annotation attached
below :-)

(kmemcheck is off in the config so it shouldnt matter)

So the line is:

might_sleep();

Lemme dig.

Ingo

diff --git a/net/core/sock.c b/net/core/sock.c
index 06e26b7..b0ba569 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -945,6 +945,8 @@ static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority,
sk = kmalloc(prot->obj_size, priority);

if (sk != NULL) {
+ kmemcheck_annotate_bitfield(sk, flags);
+
if (security_sk_alloc(sk, family, priority))
goto out_free;


\
 
 \ /
  Last update: 2009-06-16 11:31    [W:0.968 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site