From: Tetsuo Handa <[email protected]> [ Upstream commit e4c89a508f4385a0cd8681c2749a2cd2fa476e40 ]
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 <[email protected]> Acked-by: Srivatsa S. Bhat <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Srivatsa S. Bhat <[email protected]> --- drivers/base/firmware_class.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index de2e173..9589b7f 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -493,8 +493,7 @@ _request_firmware(const struct firmware **firmware_p, const char *name, if (!firmware) { dev_err(device, "%s: kmalloc(struct firmware) failed\n", __func__); - retval = -ENOMEM; - goto out; + return -ENOMEM; } for (builtin = __start_builtin_fw; builtin != __end_builtin_fw; -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
