From: Jan Kiszka <[email protected]>

ivshm_net_run is executed in task context, thus also with bottom-halves
enabled. Calling napi_schedule in that state can cause problems under
NOHZ, see also

https://patches.linaro.org/project/linux-usb/patch/[email protected]/

Therefore, disable bh around this call. Other invocations of
napi_schedule are not affected:

ivshm_net_poll - poll routine, always called with bh disabled
ivshm_net_int_tx_rx - interrupt handler, bh implicitly off
ivshm_net_poll_controller - always called with IRQs off, thus also bh

Reported-by: Peng Fan <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
---
 drivers/net/ivshmem-net.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ivshmem-net.c b/drivers/net/ivshmem-net.c
index 9406b4dcc6c0..a80eea5aecaf 100644
--- a/drivers/net/ivshmem-net.c
+++ b/drivers/net/ivshmem-net.c
@@ -558,7 +558,9 @@ static void ivshm_net_run(struct net_device *ndev)

        netif_start_queue(ndev);
        napi_enable(&in->napi);
+       local_bh_disable();
        napi_schedule(&in->napi);
+       local_bh_enable();
        ivshm_net_set_state(in, IVSHM_NET_STATE_RUN);
 }

--
2.35.3

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/bb0226f4-5c26-0fc5-fdfe-e6d936e34102%40web.de.

Reply via email to