Commit a54a93d
nvme: move stopping keep-alive into nvme_uninit_ctrl()
Commit 4733b65 ("nvme: start keep-alive after admin queue setup")
moves starting keep-alive from nvme_start_ctrl() into
nvme_init_ctrl_finish(), but don't move stopping keep-alive into
nvme_uninit_ctrl(), so keep-alive work can be started and keep pending
after failing to start controller, finally use-after-free is triggered if
nvme host driver is unloaded.
This patch fixes kernel panic when running nvme/004 in case that connection
failure is triggered, by moving stopping keep-alive into nvme_uninit_ctrl().
This way is reasonable because keep-alive is now started in
nvme_init_ctrl_finish().
Fixes: 3af755a ("nvme: move nvme_stop_keep_alive() back to original position")
Cc: Hannes Reinecke <hare@suse.de>
Cc: Mark O'Donovan <shiftee@posteo.net>
Reported-by: Changhui Zhong <czhong@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>1 parent 81475be commit a54a93d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4612 | 4612 | | |
4613 | 4613 | | |
4614 | 4614 | | |
4615 | | - | |
4616 | 4615 | | |
4617 | 4616 | | |
4618 | 4617 | | |
| |||
4648 | 4647 | | |
4649 | 4648 | | |
4650 | 4649 | | |
| 4650 | + | |
4651 | 4651 | | |
4652 | 4652 | | |
4653 | 4653 | | |
| |||
0 commit comments