Messages in this thread | | | From | David Brownell <> | Subject | Re: [patch 2.6.21-rc5-git 1/2] fix hotplug for legacy platform drivers | Date | Mon, 2 Apr 2007 09:39:51 -0700 |
| |
On Monday 02 April 2007 3:55 am, Russell King wrote: > On Sat, Mar 31, 2007 at 02:55:38PM -0700, David Brownell wrote: > > --- g26.orig/drivers/pcmcia/pxa2xx_mainstone.c 2007-03-30 16:44:04.000000000 -0700 > > +++ g26/drivers/pcmcia/pxa2xx_mainstone.c 2007-03-31 14:23:56.000000000 -0700 > > @@ -175,6 +175,8 @@ static int __init mst_pcmcia_init(void) > > if (!mst_pcmcia_device) > > return -ENOMEM; > > > > + /* REVISIT just statically allocate the device */ > > + mst_pcmcia_device->dev.uevent_suppress = 0; > > Such a comment indicates that you clearly do not understand why these > platform devices are dynamically allocated. > > These are modules. If they were statically allocated, then you have a > potential oops waiting to happen if you have the right ordering of user > accesses to sysfs coupled with an inopportune unload of such a driver - > the memory backing the platform device will be unexpectedly released > resulting in an access to freed memory.
OK, so I consider that issue sufficiently revisited. :)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |