* [PATCH] cifsd: Fix an error code in smb2_read() @ 2021-03-22 14:50 ` Dan Carpenter 2021-03-23 5:35 ` Namjae Jeon 0 siblings, 1 reply; 2+ messages in thread From: Dan Carpenter @ 2021-03-22 14:50 UTC (permalink / raw) To: Namjae Jeon Cc: Sergey Senozhatsky, Steve French, Hyunchul Lee, Ronnie Sahlberg, linux-cifs, linux-cifsd-devel, kernel-janitors 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> --- 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 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] cifsd: Fix an error code in smb2_read() 2021-03-22 14:50 ` [PATCH] cifsd: Fix an error code in smb2_read() Dan Carpenter @ 2021-03-23 5:35 ` Namjae Jeon 0 siblings, 0 replies; 2+ messages in thread From: Namjae Jeon @ 2021-03-23 5:35 UTC (permalink / raw) To: 'Dan Carpenter' Cc: 'Sergey Senozhatsky', 'Steve French', 'Hyunchul Lee', 'Ronnie Sahlberg', linux-cifs, linux-cifsd-devel, kernel-janitors 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-23 5:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox