From: Christoph Hellwig <hch@infradead.org>
To: Meng Xu <meng.xu@gatech.edu>
Cc: Christoph Hellwig <hch@infradead.org>,
Meng Xu <mengxu.gatech@gmail.com>,
axboe@kernel.dk, linux-block@vger.kernel.org,
sanidhya@gatech.edu, taesoo@gatech.edu
Subject: Re: [PATCH] scsi: ensure the header peeked does not change in the actual message
Date: Tue, 19 Sep 2017 13:36:28 -0700 [thread overview]
Message-ID: <20170919203628.GC731@infradead.org> (raw)
In-Reply-To: <11095dd2-e6b1-e3c6-4295-b52941822889@gatech.edu>
On Tue, Sep 19, 2017 at 12:15:57PM -0400, Meng Xu wrote:
> Hi Christoph,
>
> By saying not copying the byte twice, did you mean
> copy_from_user(req->cmd, sic->data + sizeof(opcode), cmdlen -
> sizeof(opcode)) ?
>
> Does it affect the how req->cmd will be used later?
> If no, I'll submit another patch as instructed.
No, do something like:
req->cmd[0] = opcode;
if (copy_from_user(req->cmd + 1, sic->data, cmdlen - 1))
goto error;
prev parent reply other threads:[~2017-09-19 20:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 15:23 [PATCH] scsi: ensure the header peeked does not change in the actual message Meng Xu
2017-09-19 16:01 ` Christoph Hellwig
2017-09-19 16:15 ` Meng Xu
2017-09-19 20:36 ` Christoph Hellwig [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=20170919203628.GC731@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=meng.xu@gatech.edu \
--cc=mengxu.gatech@gmail.com \
--cc=sanidhya@gatech.edu \
--cc=taesoo@gatech.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.