[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201101170949.45192.rusty@rustcorp.com.au>
Date: Mon, 17 Jan 2011 09:49:44 +1030
From: Rusty Russell <rusty@...tcorp.com.au>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: Module parameters and __initdata
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists