diff options
| author | zhenwei pi <pizhenwei@bytedance.com> | 2020-10-15 09:51:40 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-29 09:58:00 +0100 |
| commit | abd19984441c5817937bf47a1cf0abe7c63587f9 (patch) | |
| tree | 435141f2be1e425e85e23dfce81596b92d814c08 /drivers/ntb | |
| parent | 5ef1279abc74ede5a7b77e0d3c8ba149d9bde3d1 (diff) | |
| download | linux-abd19984441c5817937bf47a1cf0abe7c63587f9.tar.gz linux-abd19984441c5817937bf47a1cf0abe7c63587f9.tar.bz2 linux-abd19984441c5817937bf47a1cf0abe7c63587f9.zip | |
nvmet: fix uninitialized work for zero kato
[ Upstream commit 85bd23f3dc09a2ae9e56885420e52c54bf983713 ]
When connecting a controller with a zero kato value using the following
command line
nvme connect -t tcp -n NQN -a ADDR -s PORT --keep-alive-tmo=0
the warning below can be reproduced:
WARNING: CPU: 1 PID: 241 at kernel/workqueue.c:1627 __queue_delayed_work+0x6d/0x90
with trace:
mod_delayed_work_on+0x59/0x90
nvmet_update_cc+0xee/0x100 [nvmet]
nvmet_execute_prop_set+0x72/0x80 [nvmet]
nvmet_tcp_try_recv_pdu+0x2f7/0x770 [nvmet_tcp]
nvmet_tcp_io_work+0x63f/0xb2d [nvmet_tcp]
...
This is caused by queuing up an uninitialized work. Althrough the
keep-alive timer is disabled during allocating the controller (fixed in
0d3b6a8d213a), ka_work still has a chance to run (called by
nvmet_start_ctrl).
Fixes: 0d3b6a8d213a ("nvmet: Disable keep-alive timer when kato is cleared to 0h")
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/ntb')
0 files changed, 0 insertions, 0 deletions
