public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix sg_io_hdr.info corruption.
@ 2008-12-28 14:50 Alexey Zaytsev
  2008-12-30 23:46 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Alexey Zaytsev @ 2008-12-28 14:50 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

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;
 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-01-01 14:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-28 14:50 [PATCH] Fix sg_io_hdr.info corruption Alexey Zaytsev
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox