From: Rusty Russell <rusty@rustcorp.com.au>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: two 2.5 modules bugs
Date: Mon, 30 Dec 2002 22:39:14 +1100 [thread overview]
Message-ID: <20021230114018.7FE4A2C063@lists.samba.org> (raw)
In-Reply-To: Your message of "Mon, 30 Dec 2002 17:13:07 +1100."
> In message <200212292018.VAA25446@harpo.it.uu.se> you write:
> > >long". The obvious fix (untested) is:
> > >
> > Tested. This patch makes the parport_pc module work again. Thanks.
>
> Linus, please apply. Mikael, thanks for the excellent bug report!
>
> Rusty.
> --
> Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
>
> Name: Fix MODULE_PARM for arrays of s.
And this as well. We restore the ","s after parsing: if expect to
keep pointers to this stuff, we must not do that.
Linus, please apply.
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .5399-linux-2.5-bk/kernel/params.c .5399-linux-2.5-bk.updated/kernel/params.c
--- .5399-linux-2.5-bk/kernel/params.c 2002-12-26 15:41:06.000000000 +1100
+++ .5399-linux-2.5-bk.updated/kernel/params.c 2002-12-30 20:30:38.000000000 +1100
@@ -233,6 +233,7 @@ int param_array(const char *name,
int ret;
unsigned int count = 0;
struct kernel_param kp;
+ char save;
/* Get the name right for errors. */
kp.name = name;
@@ -247,7 +248,6 @@ int param_array(const char *name,
/* We expect a comma-separated list of values. */
do {
int len;
- char save;
if (count > max) {
printk(KERN_ERR "%s: can only take %i arguments\n",
@@ -256,18 +256,17 @@ int param_array(const char *name,
}
len = strcspn(val, ",");
- /* Temporarily nul-terminate and parse */
+ /* nul-terminate and parse */
save = val[len];
((char *)val)[len] = '\0';
ret = set(val, &kp);
- ((char *)val)[len] = save;
if (ret != 0)
return ret;
kp.arg += elemsize;
val += len+1;
count++;
- } while (val[-1] == ',');
+ } while (save == ',');
if (count < min) {
printk(KERN_ERR "%s: needs at least %i arguments\n",
next reply other threads:[~2002-12-30 11:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-30 11:39 Rusty Russell [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-12-29 20:18 two 2.5 modules bugs Mikael Pettersson
2002-12-30 6:13 ` Rusty Russell
2002-12-27 16:16 Mikael Pettersson
2002-12-27 23:24 ` Petr Vandrovec
2002-12-28 10:37 ` Rusty Russell
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=20021230114018.7FE4A2C063@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
--cc=torvalds@transmeta.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.