From: willy@linux.intel.com (Matthew Wilcox)
Subject: [PATCH 2/2] Return the result from user admin command IOCTL even in case of failureX
Date: Wed, 22 May 2013 16:23:41 -0400 [thread overview]
Message-ID: <20130522202341.GX6057@linux.intel.com> (raw)
In-Reply-To: <alpine.LRH.2.03.1303011459080.456@localhost.localdom>
On Fri, Mar 01, 2013@03:05:06PM -0700, Keith Busch wrote:
> On Thu, 28 Feb 2013, Chayan Biswas wrote:
> >- if (!status && copy_to_user(&ucmd->result, &cmd.result,
> >- sizeof(cmd.result)))
> >+ if (copy_to_user(&ucmd->result, &cmd.result, sizeof(cmd.result)))
> > status = -EFAULT;
>
> I think you want to change this to a check for 'status >= 0' before
> copying the result to the user since a status < 0 means the command was
> not completed by the controller (successfully or otherwise) and you'd
> be copying uninitialized data to the user in that case.
Going back through my old patches ... Chayan, do you want to make the
change Keith suggested and resubmit? Or do you think he's wrong?
next prev parent reply other threads:[~2013-05-22 20:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 19:49 [PATCH 2/2] Return the result from user admin command IOCTL even in case of failure Chayan Biswas
2013-03-01 22:05 ` [PATCH 2/2] Return the result from user admin command IOCTL even in case of failureX Keith Busch
2013-05-22 20:23 ` Matthew Wilcox [this message]
2013-05-22 21:12 ` Chayan Biswas
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=20130522202341.GX6057@linux.intel.com \
--to=willy@linux.intel.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 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.