From: Hannes Reinecke <hare@suse.de>
To: Maurizio Lombardi <mlombard@redhat.com>
Cc: Maurizio Lombardi <m.lombardi85@mail.ru>,
Keith Busch <kbusch@kernel.org>, Sagi Grimberg <sagi@grimberg.me>,
Yi Zhang <yi.zhang@redhat.com>,
"open list:NVM EXPRESS DRIVER" <linux-nvme@lists.infradead.org>,
Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: Re: blktests nvme 041,042 leak memory
Date: Mon, 3 Jun 2024 11:33:37 +0200 [thread overview]
Message-ID: <025702f4-5f3a-4fd1-897e-ac7b7d1ca8ec@suse.de> (raw)
In-Reply-To: <CAFL455na13RH=6x5oFbFWUccAXenVUBM9QVzAe2A=4Q9e8MMMw@mail.gmail.com>
On 6/3/24 10:52, Maurizio Lombardi wrote:
> po 3. 6. 2024 v 10:37 odesílatel Hannes Reinecke <hare@suse.de> napsal:
>>
>> On 5/31/24 16:37, Maurizio Lombardi wrote:
>> Hmm. Don't really like it.
>> We took great pains of moving then entire DH-CHAP code into its own
>> file, and this patch reverts it and is causing the DH-CHAP code to be
>> littered all over the place.
>
> This was just an example, I'm not asking to merge it.
>
> I just had to find a way to make it possible to call nvme_auth_stop() even
> when nvme_auth_init() has never been called without crashing the kernel,
> moving INIT_WORK was the easiest way.
>
Like this?
diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
index a264b3ae078b..668cc4d891d7 100644
--- a/drivers/nvme/host/auth.c
+++ b/drivers/nvme/host/auth.c
@@ -983,7 +983,8 @@ EXPORT_SYMBOL_GPL(nvme_auth_init_ctrl);
void nvme_auth_stop(struct nvme_ctrl *ctrl)
{
- cancel_work_sync(&ctrl->dhchap_auth_work);
+ if (ctrl->dhchap_ctxs)
+ cancel_work_sync(&ctrl->dhchap_auth_work);
}
EXPORT_SYMBOL_GPL(nvme_auth_stop);
Cheers,
Hannes
next prev parent reply other threads:[~2024-06-03 9:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-26 19:47 blktests nvme 041,042 leak memory Sagi Grimberg
2024-05-27 1:11 ` Yi Zhang
2024-05-28 9:44 ` Maurizio Lombardi
2024-05-29 9:08 ` Maurizio Lombardi
2024-05-29 12:51 ` Sagi Grimberg
2024-05-29 13:45 ` Maurizio Lombardi
2024-05-29 16:25 ` Keith Busch
2024-05-29 16:48 ` Keith Busch
2024-05-30 6:59 ` Sagi Grimberg
2024-05-30 7:25 ` Maurizio Lombardi
2024-05-30 16:29 ` Keith Busch
2024-05-30 17:40 ` Maurizio Lombardi
2024-05-31 11:55 ` Maurizio Lombardi
2024-05-31 14:37 ` Maurizio Lombardi
2024-06-03 8:37 ` Hannes Reinecke
2024-06-03 8:52 ` Maurizio Lombardi
2024-06-03 9:33 ` Hannes Reinecke [this message]
2024-06-03 9:38 ` Maurizio Lombardi
2024-06-03 9:35 ` Maurizio Lombardi
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=025702f4-5f3a-4fd1-897e-ac7b7d1ca8ec@suse.de \
--to=hare@suse.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=m.lombardi85@mail.ru \
--cc=mlombard@redhat.com \
--cc=sagi@grimberg.me \
--cc=shinichiro.kawasaki@wdc.com \
--cc=yi.zhang@redhat.com \
/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