Re: [PATCH v3] cgroup: fix cgroup_rmdir() vs close(eventfd) race
From: Tejun Heo
Date: Mon Feb 18 2013 - 12:18:08 EST
On Mon, Feb 18, 2013 at 06:56:14PM +0800, Li Zefan wrote:
> commit 205a872bd6f9a9a09ef035ef1e90185a8245cc58 ("cgroup: fix lockdep
> warning for event_control") solved a deadlock by introducing a new
> Move cgrp->event_list to a temporary list doesn't mean you can traverse
> this list locklessly, because at the same time cgroup_event_wake() can
> be called and remove the event from the list. The result of this race
> is disastrous.
> We adopt the way how kvm irqfd code implements race-free event removal,
> which is now described in the comments in cgroup_event_wake().
> - call eventfd_signal() no matter it's eventfd close or cgroup removal
> that removes the cgroup event.
> Acked-by: Kirill A. Shutemov <kirill@xxxxxxxxxxxxx>
> Signed-off-by: Li Zefan <lizefan@xxxxxxxxxx>
Dropped v2 and applied this one to cgroup/for-3.9.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/