Re: oops in uevent_helper [was: mmotm 2010-01-13-12-17 uploaded]

From: Neil Horman
Date: Sun Feb 14 2010 - 12:55:06 EST


On Sun, Feb 14, 2010 at 06:32:20PM +0100, Jiri Slaby wrote:
> On 02/12/2010 06:06 PM, Neil Horman wrote:
> > Fix up remaining references to uevent_helper to play nice with Andi's
> > uevent_helper/rcu changes.
> >
> > Some changes were made recently which modified uevent_helper to be an rcu
> > protected pointer, rather than a static char array. This has led to a few
> > missed points in which the sysfs path still assumed that:
> > 1) the uevent_helper symbol could still be accessed safely without
> > rcu_dereference
> > 2) that the sysfs path could copy data to that pointer safely.
> >
> > I've fixed this by chaging the sysfs path so that it duplicates the string on
> > uevent_helper_store, and freeing it (only if it doesn't point to the
> > CONFIG_DEFAULT_UEVENT_HELPER string), in a call_rcu post-quiescent point. I've
> > also fixed up the remaining references to the uevent_helper pointers to use
> > rcu_dereference.
> >
> > Signed-off-by: Neil Horman <nhorman@xxxxxxxxxxxxx>
>
> Tested-by: Jiri Slaby <jirislaby@xxxxxxxxx>
>
Thanks Jiri!
Neil

> --
> js
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/