Messages in this thread Patch in this message | | | Date | Tue, 10 Aug 2004 11:03:36 -0500 | From | mikem <> | Subject | cciss update [2/8] zero out buffer for HP utilities |
| |
Patch 2 of 8
This patch addresses a problem with our utilities. We zero out the buffer before copying their data into it. This patch applies to 2.6.8-rc4. Please consider this for inclusion. Please apply patches in order.
Thanks, mikem ------------------------------------------------------------------------------- diff -burpN lx268-rc3-p001/drivers/block/cciss.c lx268-rc3/drivers/block/cciss.c --- lx268-rc3-p001/drivers/block/cciss.c 2004-08-05 10:22:43.290646000 -0500 +++ lx268-rc3/drivers/block/cciss.c 2004-08-05 10:28:36.993875112 -0500 @@ -866,6 +866,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) { @@ -1012,6 +1014,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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |