From: Bert Wesarg <wesarg@informatik.uni-halle.de>
To: Rusty Russell <rusty@rustcorp.com.au>
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 12:07:52 +0200 (MEST) [thread overview]
Message-ID: <Pine.GSO.4.56.0503291206050.5367@turing> (raw)
In-Reply-To: <1112076353.21459.34.camel@localhost.localdomain>
On Tue, 29 Mar 2005, Rusty Russell wrote:
> 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
Yes, but in this case you can/will past a num pointer to
module_param_array(), when it is important to know how many arguments are
specified.
greetings,
bert
>
> Cheers,
> Rusty.
> --
> A bad analogy is like a leaky screwdriver -- Richard Braakman
>
prev parent reply other threads:[~2005-03-29 10:08 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
2005-03-29 10:07 ` Bert Wesarg [this message]
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=Pine.GSO.4.56.0503291206050.5367@turing \
--to=wesarg@informatik.uni-halle.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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®