public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Sagi Grimberg <sagi@grimberg.me>,
	Chaitanya Kulkarni <chaitanyak@nvidia.com>,
	"hare@suse.de" <hare@suse.de>
Cc: "kbusch@kernel.org" <kbusch@kernel.org>,
	"hch@lst.de" <hch@lst.de>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH V2 1/2] nvme: add generic helper to store secret
Date: Tue, 6 Jun 2023 03:24:03 +0000	[thread overview]
Message-ID: <478ca846-cf68-c8db-d4e5-f862775d16c2@nvidia.com> (raw)
In-Reply-To: <ef1a8621-ae27-1b06-fbc2-b3cb1e137b1e@grimberg.me>

     kfree(dhchap_secret);
>> -    /* Start re-authentication */
>> -    dev_info(ctrl->device, "re-authenticating controller\n");
>> -    queue_work(nvme_wq, &ctrl->dhchap_auth_work);
>> -
>> -    return count;
>> +    return nvme_dhchap_secret_store_common(ctrl, buf, count, false);
> 
> Both call with ctrl_secret=false?
> 

this is wrong ..

This is my mistake let me fix this and send V4.

> I think it conveys the point that this is confusing...

The reason I did this because original code had kfree() bug and that bug
was replicated in both the functions, with fixing the mistake, I believe
we can avoid such replication of code and potential bugs.

-ck



  reply	other threads:[~2023-06-06  3:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05  6:51 [PATCH V2 0/2] nvme: dhchap_secret code cleanup Chaitanya Kulkarni
2023-06-05  6:51 ` [PATCH V2 1/2] nvme: add generic helper to store secret Chaitanya Kulkarni
2023-06-05  7:52   ` Hannes Reinecke
2023-06-05 22:30   ` Sagi Grimberg
2023-06-06  3:24     ` Chaitanya Kulkarni [this message]
2023-06-06  6:43       ` Sagi Grimberg
2023-06-07  3:44         ` Chaitanya Kulkarni
2023-06-07  5:03         ` hch
2023-06-05  6:51 ` [PATCH V2 2/2] nvme-core: use macro defination to define dev attr Chaitanya Kulkarni
2023-06-05  7:55   ` Hannes Reinecke
2023-06-05  8:01     ` Chaitanya Kulkarni

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=478ca846-cf68-c8db-d4e5-f862775d16c2@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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