[PATCH] parport : "dev->timeslice" is an unsigned long, not an int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
index ed82e41..d950fc3 100644
--- a/drivers/parport/procfs.c
+++ b/drivers/parport/procfs.c
@@ -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,

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux