From: Li Nan <[email protected]>
To: Changhui Zhong <[email protected]>,
Linux Block Devices <[email protected]>,
[email protected]
Cc: Ming Lei <[email protected]>,
"[email protected]" <[email protected]>,
"yukuai (C)" <[email protected]>,
"[email protected]" <[email protected]>,
"[email protected]" <[email protected]>
Subject: Re: [bug report] WARNING: CPU: 2 PID: 3445306 at drivers/block/ublk_drv.c:2633 ublk_ctrl_start_recovery.constprop.0+0x74/0x180
Date: Sat, 25 May 2024 15:19:38 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
在 2024/5/24 17:45, Li Nan 写道:
>
>
> 在 2024/5/24 11:49, Changhui Zhong 写道:
>> Hello,
>>
>> I hit the kernel panic when running test ubdsrv generic/005,
>> please help check it and let me know if you need any info/testing for
>> it, thanks.
>>
Can you test the following patch? WARN will still be triggered, but the
NULL pointer dereference will be fixed.
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index 4e159948c912..99b621b2d40f 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -2630,7 +2630,8 @@ static void ublk_queue_reinit(struct ublk_device *ub,
struct ublk_queue *ubq)
{
int i;
- WARN_ON_ONCE(!(ubq->ubq_daemon && ubq_daemon_is_dying(ubq)));
+ if (WARN_ON_ONCE(!(ubq->ubq_daemon && ubq_daemon_is_dying(ubq))))
+ return;
/* All old ioucmds have to be completed */
ubq->nr_io_ready = 0;
--
Thanks,
Nan
next prev parent reply other threads:[~2024-05-25 7:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-24 3:49 [bug report] WARNING: CPU: 2 PID: 3445306 at drivers/block/ublk_drv.c:2633 ublk_ctrl_start_recovery.constprop.0+0x74/0x180 Changhui Zhong
2024-05-24 9:45 ` Li Nan
2024-05-25 7:19 ` Li Nan [this message]
2024-05-29 1:08 ` Changhui Zhong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9bb4beb1-06d4-2127-31aa-003c555653d4@huaweicloud.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox