OpenCloudOS-Kernel/net/netlink
Herbert Xu 8a0f5ccfb3 crypto: deadlock between crypto_alg_sem/rtnl_mutex/genl_mutex
On Tue, Mar 14, 2017 at 10:44:10AM +0100, Dmitry Vyukov wrote:
>
> Yes, please.
> Disregarding some reports is not a good way long term.

Please try this patch.

---8<---
Subject: netlink: Annotate nlk cb_mutex by protocol

Currently all occurences of nlk->cb_mutex are annotated by lockdep
as a single class.  This causes a false lcokdep cycle involving
genl and crypto_user.

This patch fixes it by dividing cb_mutex into individual classes
based on the netlink protocol.  As genl and crypto_user do not
use the same netlink protocol this breaks the false dependency
loop.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-21 14:38:15 -07:00
..
Kconfig netlink: remove mmapped netlink support 2016-02-18 11:42:18 -05:00
Makefile netlink: Diag core and basic socket info dumping (v2) 2013-03-21 12:38:03 -04:00
af_netlink.c crypto: deadlock between crypto_alg_sem/rtnl_mutex/genl_mutex 2017-03-21 14:38:15 -07:00
af_netlink.h netlink: Call cb->done from a worker thread 2016-11-29 19:48:38 -05:00
diag.c netlink: netlink_diag_dump() runs without locks 2016-11-03 16:16:51 -04:00
genetlink.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-11-15 10:54:36 -05:00