[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170214.150549.1660822376531685873.davem@davemloft.net>
Date: Tue, 14 Feb 2017 15:05:49 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: netdev@...r.kernel.org, edumazet@...gle.com, willemb@...gle.com
Subject: Re: [PATCH net] packet: fix races in fanout_add()
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Tue, 14 Feb 2017 09:03:51 -0800
> From: Eric Dumazet <edumazet@...gle.com>
>
> Multiple threads can call fanout_add() at the same time.
>
> We need to grab fanout_mutex earlier to avoid races that could
> lead to one thread freeing po->rollover that was set by another thread.
>
> Do the same in fanout_release(), for peace of mind, and to help us
> finding lockdep issues earlier.
>
> Fixes: dc99f600698d ("packet: Add fanout support.")
> Fixes: 0648ab70afe6 ("packet: rollover prepare: per-socket state")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Applied and queued up for -stable, thanks.
Powered by blists - more mailing lists