Re: packet_sendmsg_spkt sleeping from invalid context

From: Eric Dumazet
Date: Mon Dec 14 2009 - 16:26:22 EST


Le 14/12/2009 21:52, Frederic Weisbecker a écrit :
>
> I also wonder. Are you using PREEMPT_RCU ?

Not at all :)

But yes, this is illegal to do the memcpy_fromiovec() in rcu_read_lock() context.

> That may explain why you haven't seen this issue because
> might_sleep() doesn't see you are in a rcu read locked
> section as preemption is not disabled, but it is illegal to
> voluntarily sleep in such area (although it's fine with
> preempt rcu) as doing so with non-prempt RCU config would barf.
>
> I'm trying a patch to handle that.

As you want, I also have a patch testing right now :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/