Re: [PATCH 4.9 38/62] qlcnic: fix sleep-in-atomic-context bugs caused by msleep

Pavel Machek
2022-12-06T12:51:46Z

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

Hi!

> From: Duoming Zhou <duoming@zju.edu.cn>

> (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.

The mdelay is for 200 msec:

qlcnic_83xx_hw.h:#define QLC_83XX_DRV_LOCK_RECOVERY_DELAY 200

This may be an improvement, but spinning for 200 msec in atomic
context is not okay, I'm afraid.

Best regards,
Pavel

--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]