[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170203.161816.1608140108344194361.davem@davemloft.net>
Date: Fri, 03 Feb 2017 16:18:16 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: xiyou.wangcong@...il.com, edumazet@...gle.com, dvyukov@...gle.com,
netdev@...r.kernel.org
Subject: Re: [PATCH net] net: use a work queue to defer
net_disable_timestamp() work
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Thu, 02 Feb 2017 10:31:35 -0800
> From: Eric Dumazet <edumazet@...gle.com>
>
> Dmitry reported a warning [1] showing that we were calling
> net_disable_timestamp() -> static_key_slow_dec() from a non
> process context.
>
> Grabbing a mutex while holding a spinlock or rcu_read_lock()
> is not allowed.
>
> As Cong suggested, we now use a work queue.
>
> It is possible netstamp_clear() exits while netstamp_needed_deferred
> is not zero, but it is probably not worth trying to do better than that.
>
> netstamp_needed_deferred atomic tracks the exact number of deferred
> decrements.
...
> Fixes: b90e5794c5bd ("net: dont call jump_label_dec from irq context")
> Suggested-by: Cong Wang <xiyou.wangcong@...il.com>
> Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Applied and queued up for -stable, thanks Eric.
Powered by blists - more mailing lists