Re: [PATCH 3.3-rc1] PM / Sleep: Fix read_unlock_usermodehelper() call.

From: Rafael J. Wysocki
Date: Mon Jan 23 2012 - 16:05:44 EST


On Monday, January 23, 2012, Srivatsa S. Bhat wrote:
> On 01/23/2012 10:19 AM, Tetsuo Handa wrote:
>
> > Commit b298d289
> > "PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled()"
> > added read_unlock_usermodehelper() but read_unlock_usermodehelper() is called
> > without read_lock_usermodehelper() when kmalloc() failed.
> >
> > Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
> > -----
>
>
> Acked-by: Srivatsa S. Bhat <srivatsa.bhat@xxxxxxxxxxxxxxxxxx>

Applied.

Thanks,
Rafael


> > diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
> > index 26ab358..6c9387d 100644
> > --- a/drivers/base/firmware_class.c
> > +++ b/drivers/base/firmware_class.c
> > @@ -525,8 +525,7 @@ static int _request_firmware(const struct firmware **firmware_p,
> > if (!firmware) {
> > dev_err(device, "%s: kmalloc(struct firmware) failed\n",
> > __func__);
> > - retval = -ENOMEM;
> > - goto out;
> > + return -ENOMEM;
> > }
> >
> > if (fw_get_builtin_firmware(firmware, name)) {
> >
>
>
>

--
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/