From: Lee Duncan <lduncan@suse.com>
To: Minjie Du <duminjie@vivo.com>, Chris Leech <cleech@redhat.com>,
Mike Christie <michael.christie@oracle.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"open list:ISCSI" <open-iscsi@googlegroups.com>,
"open list:ISCSI" <linux-scsi@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Cc: opensource.kernel@vivo.com
Subject: Re: [PATCH v1] scsi: iscsi: use kfree_sensitive() in iscsi_session_free()
Date: Mon, 17 Jul 2023 10:31:49 -0700 [thread overview]
Message-ID: <cf71648c-eed0-cefb-ddff-1b2f7809dc3b@suse.com> (raw)
In-Reply-To: <20230717092657.9776-1-duminjie@vivo.com>
On 7/17/23 02:26, Minjie Du wrote:
> session might contain private part of the password, so better use
> kfree_sensitive() to free it.
> In iscsi_session_free() use kfree_sensitive() to free session->password.
>
> Signed-off-by: Minjie Du <duminjie@vivo.com>
> ---
> drivers/scsi/libiscsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
> index 0fda8905e..2f273229c 100644
> --- a/drivers/scsi/libiscsi.c
> +++ b/drivers/scsi/libiscsi.c
> @@ -3132,7 +3132,7 @@ void iscsi_session_free(struct iscsi_cls_session *cls_session)
> struct module *owner = cls_session->transport->owner;
>
> iscsi_pool_free(&session->cmdpool);
> - kfree(session->password);
> + kfree_sensitive(session->password);
> kfree(session->password_in);
> kfree(session->username);
> kfree(session->username_in);
Reviewed-by: Lee Duncan <lduncan@suse.com>
next prev parent reply other threads:[~2023-07-17 17:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 9:26 Minjie Du
2023-07-17 17:31 ` Lee Duncan [this message]
2023-07-17 18:25 ` Mike Christie
[not found] ` <SG2PR06MB5288D9E4D3124B5577ACA035AE39A@SG2PR06MB5288.apcprd06.prod.outlook.com>
2023-07-19 14:53 ` 回复: " Lee Duncan
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=cf71648c-eed0-cefb-ddff-1b2f7809dc3b@suse.com \
--to=lduncan@suse.com \
--cc=cleech@redhat.com \
--cc=duminjie@vivo.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michael.christie@oracle.com \
--cc=open-iscsi@googlegroups.com \
--cc=opensource.kernel@vivo.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
Powered by JetHome