From: Jesper Juhl <jesper.juhl@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Seokmann Ju <Seokmann.Ju@lsil.com>,
Neela Syam Kolli <Neela.Kolli@engenio.com>,
linux-scsi@vger.kernel.org, akpm@osdl.org,
James.Bottomley@steeleye.com, jesper.juhl@gmail.com
Subject: [PATCH] SCSI: Make megaraid_ioctl() check copy_to_user() return value
Date: Fri, 15 Sep 2006 14:43:11 +0200 [thread overview]
Message-ID: <200609151443.12941.jesper.juhl@gmail.com> (raw)
Check copy_to_user() return value in drivers/scsi/megaraid.c::megadev_ioctl()
This gets rid of this little warning:
drivers/scsi/megaraid.c:3661: warning: ignoring return value of 'copy_to_user', declared with attribute warn_unused_result
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
drivers/scsi/megaraid.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- linux-2.6.18-rc7-git1-orig/drivers/scsi/megaraid.c 2006-09-15 13:51:15.121774000 +0200
+++ linux-2.6.18-rc7-git1/drivers/scsi/megaraid.c 2006-09-15 14:27:32.377407763 +0200
@@ -3658,8 +3658,9 @@ megadev_ioctl(struct inode *inode, struc
* Send the request sense data also, irrespective of
* whether the user has asked for it or not.
*/
- copy_to_user(upthru->reqsensearea,
- pthru->reqsensearea, 14);
+ if (copy_to_user(upthru->reqsensearea,
+ pthru->reqsensearea, 14))
+ rval = -EFAULT;
freemem_and_return:
if( pthru->dataxferlen ) {
next reply other threads:[~2006-09-15 12:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-15 12:43 Jesper Juhl [this message]
2006-09-15 18:26 Ju, Seokmann
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=200609151443.12941.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=James.Bottomley@steeleye.com \
--cc=Neela.Kolli@engenio.com \
--cc=Seokmann.Ju@lsil.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.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
Powered by JetHome