Skip to content

Commit

Permalink
PM / Sleep: Fix read_unlock_usermodehelper() call.
Browse files Browse the repository at this point in the history
[ Upstream commit e4c89a5 ]

Commit b298d28
 "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@I-love.SAKURA.ne.jp>
Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Tetsuo Handa authored and Greg Kroah-Hartman committed Mar 4, 2012
1 parent 0707a9c commit bf698b5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bf698b5

Please sign in to comment.