Messages in this thread Patch in this message | | | Subject | cciss updates [2/6] zero out buffer in passthru ioctls for HP utilities | From | mikem <> | Date | Thu, 05 Aug 2004 14:33:33 -0500 |
| |
Patch 2 of 6
This patch addresses a problem with our utilities. We must zero out the buffer before copying their data into it to prevent bogus info when switching between SCSI & SATA or SAS drives. This patch applies to 2.6.8-rc3. 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/
| |