[bug report] blktests nvme/022 lead kernel WARNING and NULL pointer
Hannes Reinecke
hare at suse.de
Sun May 9 09:44:13 BST 2021
On 5/7/21 9:50 PM, Sagi Grimberg wrote:
>
>>> Hi Sagi
>>>
>>> Bisect shows bellow commits was the first bad commit.
>>>
>>> commit a70b81bd4d9d2d6c05cfe6ef2a10bccc2e04357a (refs/bisect/bad)
>>> Author: Hannes Reinecke <hare at suse.de>
>>> Date: Fri Apr 16 13:46:20 2021 +0200
>>>
>>> nvme: sanitize KATO setting
>>>
>>
>> Hi Sagi
>> This issue has been consistently reproduced with blktests on recent
>> linux-block/for-next, do you have a chance to check it?
>
> I had not, Hannes can you have a look?
>
Can you check if this patch helps?
diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index 74b3b150e1a5..a48d8219cf90 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -458,6 +458,9 @@ static void nvme_loop_reset_ctrl_work(struct
work_struct *work)
container_of(work, struct nvme_loop_ctrl, ctrl.reset_work);
int ret;
+ /* reset_work might run concurrently to delete_work */
+ if (ctrl->state == NVME_CTRL_DELETING)
+ return;
nvme_stop_ctrl(&ctrl->ctrl);
nvme_loop_shutdown_ctrl(ctrl);
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
More information about the Linux-nvme
mailing list