* [patch] cpuset: lock vs unlock typo
@ 2014-10-27 13:27 Dan Carpenter
2014-10-27 15:08 ` Vladimir Davydov
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-10-27 13:27 UTC (permalink / raw)
To: Li Zefan, Vladimir Davydov, Andrew Morton
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
This will deadlock instead of unlocking.
Fixes: f73eae8d8384 ('cpuset: simplify cpuset_node_allowed API')
Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 38f7433..4eaa203 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1992,7 +1992,7 @@ static int cpuset_css_online(struct cgroup_subsys_state *css)
spin_lock_irq(&callback_lock);
cs->mems_allowed = parent->mems_allowed;
cpumask_copy(cs->cpus_allowed, parent->cpus_allowed);
- spin_lock_irq(&callback_lock);
+ spin_unlock_irq(&callback_lock);
out_unlock:
mutex_unlock(&cpuset_mutex);
return 0;
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch] cpuset: lock vs unlock typo
2014-10-27 13:27 [patch] cpuset: lock vs unlock typo Dan Carpenter
@ 2014-10-27 15:08 ` Vladimir Davydov
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Davydov @ 2014-10-27 15:08 UTC (permalink / raw)
To: Dan Carpenter
Cc: Li Zefan, Andrew Morton, cgroups-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
On Mon, Oct 27, 2014 at 04:27:02PM +0300, Dan Carpenter wrote:
> This will deadlock instead of unlocking.
>
> Fixes: f73eae8d8384 ('cpuset: simplify cpuset_node_allowed API')
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Shame on me. It strikes only if cgroup.clone_children is set, so I
didn't catch it while testing the patch :-(
Acked-by: Vladimir Davydov <vdavydov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Thank you!
>
> diff --git a/kernel/cpuset.c b/kernel/cpuset.c
> index 38f7433..4eaa203 100644
> --- a/kernel/cpuset.c
> +++ b/kernel/cpuset.c
> @@ -1992,7 +1992,7 @@ static int cpuset_css_online(struct cgroup_subsys_state *css)
> spin_lock_irq(&callback_lock);
> cs->mems_allowed = parent->mems_allowed;
> cpumask_copy(cs->cpus_allowed, parent->cpus_allowed);
> - spin_lock_irq(&callback_lock);
> + spin_unlock_irq(&callback_lock);
> out_unlock:
> mutex_unlock(&cpuset_mutex);
> return 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-27 15:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-27 13:27 [patch] cpuset: lock vs unlock typo Dan Carpenter
2014-10-27 15:08 ` Vladimir Davydov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox