On 2/25/2021 2:32 PM, Elad Nachman wrote:
This first part of v4 of the patch re-introduces Stephen Hemminger's
patch 64106 . This part changes the parameter kni_net_process_request()
gets and introduces the initial rtnl unlocking mechanism.
Signed-off-by: Elad Nachman <ela...@gmail.com>
---
v4:
* for if down case, send asynchronously with rtnl locked and without
wait, returning immediately to avoid both kernel race conditions
and deadlock in user-space
v3:
* Include original patch and new patch as a series of patch, added a
comment to the new patch
v2:
* rebuild the patch as increment from patch 64106
* fix comment and blank lines
<...>
+ /* Since we need to wait and RTNL mutex is held
+ * drop the mutex and hold reference to keep device
+ */
+ dev_hold(dev);
+ rtnl_unlock();
+
ret_val = wait_event_interruptible_timeout(kni->wq,
kni_fifo_count(kni->resp_q), 3 * HZ);
+ rtnl_lock();
+ dev_put(dev);
+
Hi Elad,
Let's drop rtnl lock/unlock form this patch, it will be changed in next patch
already, and make this patch only function parameter change, as preparation to
actual change.