lkml.org 
[lkml]   [2004]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 2/2] cciss: cleans up warnings in the pass thru ioctl
Patch 2 of 2 for 20041021.
This patch cleans up a warning with some versions of gcc.
Under gcc version 3.3.3 a warning is generated that the comparsion will always
be false due to the limits of the data type. buf_size is declared as a WORD
which limits it to 64k. If the app needs to transfer larger amounts of data
it should use the CCISS_BIG_PASSTHRU.
Please consider this for inclusion. Built against 2.4.28-pre4.
Please apply in order.

cciss.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)

Signed off by Mike Miller.
-------------------------------------------------------------------------------
diff -burNp lx2428-pre4-p001/drivers/block/cciss.c lx2428-pre4/drivers/block/cciss.c
--- lx2428-pre4-p001/drivers/block/cciss.c 2004-10-21 15:59:09.881439840 -0500
+++ lx2428-pre4/drivers/block/cciss.c 2004-10-21 13:24:26.616710592 -0500
@@ -958,8 +958,10 @@ static int cciss_ioctl(struct inode *ino
return -EINVAL;
}
/* Check kmalloc limits */
- if (iocommand.buf_size > 128000)
+ if (iocommand.buf_size > 64000) {
+ printk(KERN_WARNING "cciss: use CCISS_BIG_PASSTHRU\n");
return -EINVAL;
+ }
if (iocommand.buf_size > 0) {
buff = kmalloc(iocommand.buf_size, GFP_KERNEL);
if (buff == NULL)
-
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:07    [W:0.025 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site