Re: [PATCH v2 1/2] drop_monitor: fix sleeping in invalid context warning
From: Neil Horman <nhorman@tuxdriver.com>
Date: 2012-04-28 14:30:29
From: Neil Horman <nhorman@tuxdriver.com>
Date: 2012-04-28 14:30:29
On Sat, Apr 28, 2012 at 08:11:13AM +0200, Eric Dumazet wrote:
On Fri, 2012-04-27 at 16:11 -0400, Neil Horman wrote:quoted
Eric Dumazet pointed out this warning in the drop_monitor protocol to me:quoted
It stems from holding a spinlock (trace_state_lock) while attempting to register or unregister tracepoint hooks, making in_atomic() true in this context, leading to the warning when the tracepoint calls might_sleep() while its taking a mutex. Since we only use the trace_state_lock to prevent trace protocol state races, as well as hardware stat list updates on an rcu write side, we can just convert the spinlock to a mutex to avoid this problem. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Reported-by: Eric Dumazet <redacted> CC: David Miller <davem@davemloft.net> ---Acked-by: Eric Dumazet <edumazet@google.com> Thanks Neil
Anytmie, thanks for reporting it. Neil