Patch "IB/ipoib: Grab rtnl lock on heavy flush when calling ndo_open/stop" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
IB/ipoib: Grab rtnl lock on heavy flush when calling ndo_open/stop
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ib-ipoib-grab-rtnl-lock-on-heavy-flush-when-calling-ndo_open-stop.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Dec 18 13:29:00 CET 2017
From: Alex Vesker <[email protected]>
Date: Tue, 10 Oct 2017 10:36:41 +0300
Subject: IB/ipoib: Grab rtnl lock on heavy flush when calling ndo_open/stop
From: Alex Vesker <[email protected]>
[ Upstream commit b4b678b06f6eef18bff44a338c01870234db0bc9 ]
When ndo_open and ndo_stop are called RTNL lock should be held. In this specific case ipoib_ib_dev_open calls the offloaded ndo_open which re-sets the number of TX queue assuming RTNL lock is held. Since RTNL lock is not held, RTNL assert will fail.
--- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/infiniband/ulp/ipoib/ipoib_ib.c +6 -1
@@ -1203,10 +1203,15 @@ static void __ipoib_ib_dev_flush(structipoib_ib_dev_down (dev);if (level ==IPOIB_FLUSH_HEAVY ) { +rtnl_lock ();if (test_bit (IPOIB_FLAG_INITIALIZED , &priv->flags))ipoib_ib_dev_stop (dev); -if (ipoib_ib_dev_open (dev) !=0 ) + + result =ipoib_ib_dev_open (dev); +rtnl_unlock (); +if (result)return ; +if (netif_queue_stopped (dev))netif_start_queue (dev); }
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/ib-ipoib-grab-rtnl-lock-on-heavy-flush-when-calling-ndo_open-stop.patch