Messages in this thread | | | From | Rusty Russell <> | Subject | Re: Module parameters and __initdata | Date | Mon, 17 Jan 2011 09:49:44 +1030 |
| |
On Thu, 6 Jan 2011 08:46:59 am Alan Stern wrote: > Is the proper use of "__initdata" with module parameters documented > anywhere? > > I'm running into problems with drivers/usb/gadget/printer.c, which > includes code such as this: > > > static ushort __initdata bcdDevice; > module_param(bcdDevice, ushort, S_IRUGO); > MODULE_PARM_DESC(bcdDevice, "USB Device version (BCD)");
You need to make perm 0. You can't read it if it's freed after init!
Rusty.
| |