lkml.org 
[lkml]   [2004]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectcciss 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/
\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.224 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site