From: Alexey Zaytsev <alexey.zaytsev@gmail.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix sg_io_hdr.info corruption.
Date: Sun, 28 Dec 2008 17:50:35 +0300 [thread overview]
Message-ID: <20081228144946.30288.67559.stgit@zaytsev.su> (raw)
sizeof(unsigned (short)) is actually sizeof(function), == 1.
Spotted by sparse.
Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
---
fs/compat_ioctl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 5235c67..7c2d617 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -784,7 +784,7 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
if (copy_in_user(&sgio->status, &sgio32->status,
(4 * sizeof(unsigned char)) +
- (2 * sizeof(unsigned (short))) +
+ (2 * sizeof(unsigned short)) +
(3 * sizeof(int))))
return -EFAULT;
next reply other threads:[~2008-12-28 14:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-28 14:50 Alexey Zaytsev [this message]
2008-12-30 23:46 ` Andrew Morton
2008-12-31 9:08 ` FUJITA Tomonori
2008-12-31 9:15 ` Andrew Morton
2008-12-31 10:51 ` Alexey Zaytsev
2009-01-01 11:08 ` [PATCH] Fix sg_io_hdr.info corruption Alexey Zaytsev
2009-01-01 14:54 ` Douglas Gilbert
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=20081228144946.30288.67559.stgit@zaytsev.su \
--to=alexey.zaytsev@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@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