Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

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>

authored by

Eric Dumazet and committed by
Linus Torvalds
60af8803 8d431dbe

+1 -1
+1 -1
drivers/parport/procfs.c
··· 384 384 { 385 385 .procname = "timeslice", 386 386 .data = NULL, 387 - .maxlen = sizeof(int), 387 + .maxlen = sizeof(unsigned long), 388 388 .mode = 0644, 389 389 .proc_handler = &proc_doulongvec_ms_jiffies_minmax, 390 390 .extra1 = (void*) &parport_min_timeslice_value,