Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cpuset: add a missing unlock in cpuset_write_resmask()

Don't forget to release cgroup_mutex if alloc_trial_cpuset() fails.

[akpm@linux-foundation.org: avoid multiple return points]
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Miao Xie <miaox@cn.fujitsu.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Li Zefan and committed by
Linus Torvalds
b75f38d6 2ec38a03

+5 -2
+5 -2
kernel/cpuset.c
··· 1575 1575 return -ENODEV; 1576 1576 1577 1577 trialcs = alloc_trial_cpuset(cs); 1578 - if (!trialcs) 1579 - return -ENOMEM; 1578 + if (!trialcs) { 1579 + retval = -ENOMEM; 1580 + goto out; 1581 + } 1580 1582 1581 1583 switch (cft->private) { 1582 1584 case FILE_CPULIST: ··· 1593 1591 } 1594 1592 1595 1593 free_trial_cpuset(trialcs); 1594 + out: 1596 1595 cgroup_unlock(); 1597 1596 return retval; 1598 1597 }