cciss update [2 of 6]

From: Miller, Mike (OS Dev)
Date: Wed Aug 04 2004 - 16:02:53 EST


Patch 2 of 6
Name: p002_memset_for_268rc2.patch

This patch addresses a problem with our utilities. Seems like some of them
don't know how much data to request so I have to cover for them in
the driver. We zero out the buffer before copying their data into it.
This patch applies to 2.6.8-rc2. Please consider this for inclusion.
Please apply patches in order.

Thanks,
mikem
-------------------------------------------------------------------------------
diff -burpN lx268-rc2-p001/drivers/block/cciss.c lx268-rc2/drivers/block/cciss.c
--- lx268-rc2-p001/drivers/block/cciss.c 2004-07-30 10:26:55.243049000 -0500
+++ lx268-rc2/drivers/block/cciss.c 2004-07-30 11:19:33.666896400 -0500
@@ -868,6 +868,8 @@ static int cciss_ioctl(struct inode *ino
kfree(buff);
return -EFAULT;
}
+ } else {
+ memset(buff, 0, iocommand.buf_size);
}
if ((c = cmd_alloc(host , 0)) == NULL)
{
@@ -1014,6 +1016,8 @@ static int cciss_ioctl(struct inode *ino
copy_from_user(buff[sg_used], data_ptr, sz)) {
status = -ENOMEM;
goto cleanup1;
+ } else {
+ memset(buff[sg_used], 0, sz);
}
left -= sz;
data_ptr += sz;
-
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/