From: Douglas Gilbert <dgilbert@interlog.com>
To: Li Bin <huawei.libin@huawei.com>,
jejb@linux.ibm.com, martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
xiexiuqi@huawei.com
Subject: Re: [PATCH] scsi: sg: add sg_remove_request in sg_common_write
Date: Mon, 13 Apr 2020 21:17:26 -0400 [thread overview]
Message-ID: <8a19ba1a-1afe-2938-daea-96b1f14570cf@interlog.com> (raw)
In-Reply-To: <1586777361-17339-1-git-send-email-huawei.libin@huawei.com>
On 2020-04-13 7:29 a.m., Li Bin wrote:
> If the dxfer_len is greater than 256M that the request is invalid,
s/that/then/
> it should call sg_remove_request in sg_common_write.
>
> Fixes: f930c7043663 ("scsi: sg: only check for dxfer_len greater than 256M")
Code fix is fine, please replace the "that" in the first comment line
above with "then".
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
> Signed-off-by: Li Bin <huawei.libin@huawei.com>
> ---
> drivers/scsi/sg.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
> index 4e6af592..9c0ee19 100644
> --- a/drivers/scsi/sg.c
> +++ b/drivers/scsi/sg.c
> @@ -793,8 +793,10 @@ static int get_sg_io_pack_id(int *pack_id, void __user *buf, size_t count)
> "sg_common_write: scsi opcode=0x%02x, cmd_size=%d\n",
> (int) cmnd[0], (int) hp->cmd_len));
>
> - if (hp->dxfer_len >= SZ_256M)
> + if (hp->dxfer_len >= SZ_256M) {
> + sg_remove_request(sfp, srp);
> return -EINVAL;
> + }
>
> k = sg_start_req(srp, cmnd);
> if (k) {
>
next prev parent reply other threads:[~2020-04-14 1:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 11:29 Li Bin
2020-04-14 1:17 ` Douglas Gilbert [this message]
2020-04-14 1:59 ` Martin K. Petersen
-- strict thread matches above, loose matches on Subject: below --
2020-04-13 11:28 Li Bin
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=8a19ba1a-1afe-2938-daea-96b1f14570cf@interlog.com \
--to=dgilbert@interlog.com \
--cc=huawei.libin@huawei.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=xiexiuqi@huawei.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