public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] parport : "dev->timeslice" is an unsigned long, not an int
Date: Tue, 11 Dec 2007 20:49:09 +0100	[thread overview]
Message-ID: <475EE9B5.8060208@cosmosbay.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

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>


[-- Attachment #2: parport.patch --]
[-- Type: text/plain, Size: 460 bytes --]

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,

                 reply	other threads:[~2007-12-11 19:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=475EE9B5.8060208@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox