parport: "dev->timeslice" is an unsigned long, not an int
authorEric Dumazet <dada1@cosmosbay.com>
Tue, 18 Dec 2007 00:19:51 +0000 (16:19 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 18 Dec 2007 03:28:15 +0000 (19:28 -0800)
While auditing proc_doulongvec_ms_jiffies_minmax() usage in kernel, I found
a bug in drivers/parport/procfs.c, incorrectly using sizeof(int) instead of
sizeof(unsigned long)

Only 64bit arches are affected by this old bug.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/parport/procfs.c

index ed82e41210d1d1e89616105b2b23e7f3322bd292..d950fc34320a61e21a32f9a8b4dc928f9fcc365a 100644 (file)
@@ -384,7 +384,7 @@ parport_device_sysctl_template = {
                {
                        .procname       = "timeslice",
                        .data           = NULL,
-                       .maxlen         = sizeof(int),
+                       .maxlen         = sizeof(unsigned long),
                        .mode           = 0644,
                        .proc_handler   = &proc_doulongvec_ms_jiffies_minmax,
                        .extra1         = (void*) &parport_min_timeslice_value,