From: Rusty Russell <rusty@rustcorp.com.au>
To: Bert Wesarg <wesarg@informatik.uni-halle.de>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kernel/param.c: don't use .max when .num is NULL in param_array_set()
Date: Tue, 29 Mar 2005 16:05:53 +1000 [thread overview]
Message-ID: <1112076353.21459.34.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.GSO.4.56.0503271455190.25037@turing>
On Sun, 2005-03-27 at 14:57 +0200, Bert Wesarg wrote:
> Hello,
>
> there seems to be a bug, at least for me, in kernel/param.c for arrays
> with .num == NULL. If .num == NULL, the function param_array_set() uses
> &.max for the call to param_array(), wich alters the .max value to the
> number of arguments. The result is, you can't set more array arguments as
> the last time you set the parameter.
Yes. But this ignores the larger problem, in that the printing routines
need *some* way of telling how many to print. We could add a new
element for this case, at the price of enlarging the structure a little
for every array parameter. I think you'll find that with your patch,
the code does this:
$ insmod example.ko array=1,2,3
$ cat /sys/module/example/parameters/array
1,2,3,0,0,0,0,0,0,0
Cheers,
Rusty.
--
A bad analogy is like a leaky screwdriver -- Richard Braakman
next prev parent reply other threads:[~2005-03-29 6:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-27 12:57 Bert Wesarg
2005-03-29 6:05 ` Rusty Russell [this message]
2005-03-29 10:07 ` Bert Wesarg
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=1112076353.21459.34.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=wesarg@informatik.uni-halle.de \
/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
all inboxes | Powered by JetHome®