diff options
author | Zefan Li <lizefan@huawei.com> | 2014-09-20 02:35:43 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-09-20 12:23:35 -0400 |
commit | 3e2cd91ab92665148616a80dc0745c499d2746a7 (patch) | |
tree | d9deebb021eb70e509f0c44b4094bc18509ea036 /kernel/cgroup.c | |
parent | a25eb52e81a40e986179a790fbb5a1f02f482b7a (diff) |
cgroup: fix missing unlock in cgroup_release_agent()
The patch 971ff4935538: "cgroup: use a per-cgroup work for release
agent" from Sep 18, 2014, leads to the following static checker
warning:
kernel/cgroup.c:5310 cgroup_release_agent()
warn: 'mutex:&cgroup_mutex' is sometimes locked here and sometimes unlocked.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 16e3a4f5c9dc..f873c4681316 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -5291,7 +5291,10 @@ static void cgroup_release_agent(struct work_struct *work) | |||
5291 | 5291 | ||
5292 | mutex_unlock(&cgroup_mutex); | 5292 | mutex_unlock(&cgroup_mutex); |
5293 | call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC); | 5293 | call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC); |
5294 | goto out_free; | ||
5294 | out: | 5295 | out: |
5296 | mutex_unlock(&cgroup_mutex); | ||
5297 | out_free: | ||
5295 | kfree(agentbuf); | 5298 | kfree(agentbuf); |
5296 | kfree(pathbuf); | 5299 | kfree(pathbuf); |
5297 | } | 5300 | } |