cciss update [2/5] fix for 32/64-bit conversions

From: mikem
Date: Fri Aug 13 2004 - 17:07:19 EST


Patch 2 of 5.
This patch fixes our usage of copy_to_user in our 32/64-bit
conversions. We were passing in the size of the address
rather than the size of the struct.
Applies to 2.4.27. Please consider this for inclusion.

Thanks,
mikem
-------------------------------------------------------------------------------
diff -burNp lx2427-p001/drivers/block/cciss.c lx2427/drivers/block/cciss.c
--- lx2427-p001/drivers/block/cciss.c 2004-08-13 15:38:30.808314000 -0500
+++ lx2427/drivers/block/cciss.c 2004-08-13 15:45:07.640986640 -0500
@@ -592,7 +592,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;
@@ -620,7 +620,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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/