On Sat, Feb 18, 2006 at 01:14:14PM +0100, Sam Ravnborg wrote:
> It hits only arrays - so I took a look into moduleparam.h.
> Looks like an __initdata tag is missing?
>
> diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
> index b5c98c4..e67eafd 100644
> --- a/include/linux/moduleparam.h
> +++ b/include/linux/moduleparam.h
> @@ -147,6 +147,7 @@ extern int param_get_invbool(char *buffe
> /* Comma-separated array: *nump is set to number they actually specified. */
> #define module_param_array_named(name, array, type, nump, perm) \
> static struct kparam_array __param_arr_##name \
> + __initdata \
> = { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type,\
> sizeof(array[0]), array }; \
> module_param_call(name, param_array_set, param_array_get, \
>
>
> With this change static struct kparam_array __param_arr_##name is placed
> in .init.data.
> This made the warnings in drivers/input/joystick/db9 disappear.
>
> And with db9 marked __initdata there should be nothing wrong in
> using __initdata for __param_arr_##name as I see it.
What happens to /sys/module/*/parameters/foo if you read/write it?
Probably worth checking to ensure there isn't an oops lurking as a
result of this change.
(Maybe we need to poison the free'd init sections at boot time just
to make sure we catch possible errors like this.)
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]