Skip to content

Commit

Permalink
parport: "dev->timeslice" is an unsigned long, not an int
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Eric Dumazet authored and Linus Torvalds committed Dec 18, 2007
1 parent 8d431db commit 60af880
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/parport/procfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 60af880

Please sign in to comment.