net/ibmnvic: Fix deadlock problem in reset
authorJuliet Kim <julietk@linux.vnet.ibm.com>
Mon, 19 Nov 2018 21:59:22 +0000 (15:59 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Dec 2018 08:16:14 +0000 (09:16 +0100)
commitbfa634ba505ab5ad24e1d40b49b23768d8e8d046
treebc56f090b565b2dda3b5859330d9a1b20142d1af
parent07f745f9a6d624dc1829f0d2a3a1d31b40a3eb69
net/ibmnvic: Fix deadlock problem in reset

[ Upstream commit a5681e20b541a507c7d4fd48ae4a4040d32ee1ef ]

This patch changes to use rtnl_lock only during a reset to avoid
deadlock that could occur when a thread operating close is holding
rtnl_lock and waiting for reset_lock acquired by another thread,
which is waiting for rtnl_lock in order to set the number of tx/rx
queues during a reset.

Also, we now setting the number of tx/rx queues during a soft reset
for failover or LPM events.

Signed-off-by: Juliet Kim <julietk@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/ibm/ibmvnic.h