From: "Namjae Jeon" <namjae.jeon@samsung.com>
To: "'Dan Carpenter'" <dan.carpenter@oracle.com>
Cc: "'Sergey Senozhatsky'" <sergey.senozhatsky@gmail.com>,
"'Steve French'" <sfrench@samba.org>,
"'Hyunchul Lee'" <hyc.lee@gmail.com>,
"'Ronnie Sahlberg'" <lsahlber@redhat.com>,
<linux-cifs@vger.kernel.org>,
<linux-cifsd-devel@lists.sourceforge.net>,
<kernel-janitors@vger.kernel.org>
Subject: RE: [PATCH] cifsd: Fix an error code in smb2_read()
Date: Tue, 23 Mar 2021 14:35:02 +0900 [thread overview]
Message-ID: <00f401d71fa6$45e5f6d0$d1b1e470$@samsung.com> (raw)
In-Reply-To: <YFiuo53u7GHg7cU5@mwanda>
Hi Dan,
> This code is assigning the wrong variable to "err" so it returns zero/success instead of -ENOMEM.
>
> Fixes: 788b6f45c1d2 ("cifsd: add server-side procedures for SMB3")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
I will apply this patch.
Thanks for your work!
> ---
> fs/cifsd/smb2pdu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifsd/smb2pdu.c b/fs/cifsd/smb2pdu.c index 32816baa8a99..6770ebedc24a 100644
> --- a/fs/cifsd/smb2pdu.c
> +++ b/fs/cifsd/smb2pdu.c
> @@ -6200,7 +6200,7 @@ int smb2_read(struct ksmbd_work *work)
> work->aux_payload_buf = ksmbd_alloc_response(length);
> }
> if (!work->aux_payload_buf) {
> - err = nbytes;
> + err = -ENOMEM;
> goto out;
> }
>
> --
> 2.30.2
prev parent reply other threads:[~2021-03-23 5:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210322145056epcas1p2803a480b8b83f038407553c2b25fd384@epcas1p2.samsung.com>
2021-03-22 14:50 ` [PATCH] cifsd: Fix an error code in smb2_read() Dan Carpenter
2021-03-23 5:35 ` Namjae Jeon [this message]
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='00f401d71fa6$45e5f6d0$d1b1e470$@samsung.com' \
--to=namjae.jeon@samsung.com \
--cc=dan.carpenter@oracle.com \
--cc=hyc.lee@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-cifsd-devel@lists.sourceforge.net \
--cc=lsahlber@redhat.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=sfrench@samba.org \
/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