linux/drivers/net/ethernet/qlogic
Duoming Zhou 8dbd6e4ce1 qlcnic: fix sleep-in-atomic-context bugs caused by msleep
The watchdog timer is used to monitor whether the process
of transmitting data is timeout. If we use qlcnic driver,
the dev_watchdog() that is the timer handler of watchdog
timer will call qlcnic_tx_timeout() to process the timeout.
But the qlcnic_tx_timeout() calls msleep(), as a result,
the sleep-in-atomic-context bugs will happen. The processes
are shown below:

   (atomic context)
dev_watchdog
  qlcnic_tx_timeout
    qlcnic_83xx_idc_request_reset
      qlcnic_83xx_lock_driver
        msleep

---------------------------

   (atomic context)
dev_watchdog
  qlcnic_tx_timeout
    qlcnic_83xx_idc_request_reset
      qlcnic_83xx_lock_driver
        qlcnic_83xx_recover_driver_lock
          msleep

Fix by changing msleep() to mdelay(), the mdelay() is
busy-waiting and the bugs could be mitigated.

Fixes: 629263acae ("qlcnic: 83xx CNA inter driver communication mechanism")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-11-25 08:12:12 +00:00
..
netxen net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
qed net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
qede net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
qlcnic qlcnic: fix sleep-in-atomic-context bugs caused by msleep 2022-11-25 08:12:12 +00:00
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
Makefile
qla3xxx.c net/qla3xxx: fix potential memleak in ql3xxx_send() 2022-11-18 19:39:05 -08:00
qla3xxx.h net/qla3xxx: Convert to SPDX license identifiers 2020-09-16 14:32:31 +02:00