[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20161017.105348.849516001766766698.davem@davemloft.net>
Date: Mon, 17 Oct 2016 10:53:48 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: netdev@...r.kernel.org, brouer@...hat.com, jsperbeck@...gle.com
Subject: Re: [PATCH net] net: pktgen: remove rcu locking in
pktgen_change_name()
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Sat, 15 Oct 2016 17:50:49 +0200
> From: Eric Dumazet <edumazet@...gle.com>
>
> After Jesper commit back in linux-3.18, we trigger a lockdep
> splat in proc_create_data() while allocating memory from
> pktgen_change_name().
>
> This patch converts t->if_lock to a mutex, since it is now only
> used from control path, and adds proper locking to pktgen_change_name()
>
> 1) pktgen_thread_lock to protect the outer loop (iterating threads)
> 2) t->if_lock to protect the inner loop (iterating devices)
>
> Note that before Jesper patch, pktgen_change_name() was lacking proper
> protection, but lockdep was not able to detect the problem.
>
> Fixes: 8788370a1d4b ("pktgen: RCU-ify "if_list" to remove lock in next_to_run()")
> Reported-by: John Sperbeck <jsperbeck@...gle.com>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Applied and queued up for -stable, thanks.
Powered by blists - more mailing lists