Bug 9818 - nvme: move stopping keep-alive into nvme_uninit_ctrl()
Summary: nvme: move stopping keep-alive into nvme_uninit_ctrl()
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: GuixinLiu
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-26 19:52 UTC by HLjksuga
Modified: 2024-08-27 14:00 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description HLjksuga inspur_group 2024-08-26 19:52:59 UTC
Description of problem:
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().

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 小龙 admin 2024-08-27 14:00:29 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3770