lkml.org 
[lkml]   [2004]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subjectcciss update [1 of 6]
Date
From
Patch 1 of 6
Name: p001_ioctl32_fix_for_268rc2.patch

This patch fixes a bug in our call to copy_to_user in our 32/64 conversions.
We were passing in the sizeof the address instead of the sizeof the struct.
Stupid bug.
This applies to 2.6.8-rc2. Please consider this for inclusion.

Thanks,
mikem
-------------------------------------------------------------------------------
diff -burpN lx268-rc2.orig/drivers/block/cciss.c lx268-rc2/drivers/block/cciss.c
--- lx268-rc2.orig/drivers/block/cciss.c 2004-07-30 10:00:16.670069000 -0500
+++ lx268-rc2/drivers/block/cciss.c 2004-07-30 10:26:55.243049808 -0500
@@ -579,7 +579,7 @@ int cciss_ioctl32_passthru(unsigned int
set_fs(old_fs);
if (err)
return err;
- err |= copy_to_user(&arg32->error_info, &arg64.error_info, sizeof(&arg32->error_info));
+ err |= copy_to_user(&arg32->error_info, &arg64.error_info, sizeof(arg32->error_info));
if (err)
return -EFAULT;
return err;
@@ -612,7 +612,7 @@ int cciss_ioctl32_big_passthru(unsigned
set_fs(old_fs);
if (err)
return err;
- err |= copy_to_user(&arg32->error_info, &arg64.error_info, sizeof(&arg32->error_info));
+ err |= copy_to_user(&arg32->error_info, &arg64.error_info, sizeof(arg32->error_info));
if (err)
return -EFAULT;
return err;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.365 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site