Re: net: deadlock on genl_mutex

From: Cong Wang
Date: Thu Dec 08 2016 - 19:32:35 EST


On Thu, Dec 8, 2016 at 9:16 AM, Dmitry Vyukov <dvyukov@xxxxxxxxxx> wrote:
> Chain exists of:
> Possible unsafe locking scenario:
>
> CPU0 CPU1
> ---- ----
> lock(genl_mutex);
> lock(nlk->cb_mutex);
> lock(genl_mutex);
> lock(rtnl_mutex);
>
> *** DEADLOCK ***

This one looks legitimate, because nlk->cb_mutex could be rtnl_mutex.
Let me think about it.