[PATCH V2 1/2] nvme: add generic helper to store secret
Chaitanya Kulkarni
chaitanyak at nvidia.com
Mon Jun 5 20:24:03 PDT 2023
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
More information about the Linux-nvme
mailing list