From: Aristeu Rozanski Subject: [PATCH 1/5] device_cgroup: fix locking in devcgroup_destroy() Date: Tue, 27 Nov 2012 14:35:02 -0500 Message-ID: <20121127193501.728193744@napanee.usersys.redhat.com> References: <20121127193501.255267751@napanee.usersys.redhat.com> Return-path: Content-Disposition: inline; filename=devcg-devcgroup_destroy_locking.patch Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Tejun Heo , Serge Hallyn , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Tejun Heo Cc: Serge Hallyn Signed-off-by: Aristeu Rozanski --- security/device_cgroup.c | 4 ++++ 1 file changed, 4 insertions(+) Index: github/security/device_cgroup.c =================================================================== --- github.orig/security/device_cgroup.c 2012-11-26 17:13:54.008153189 -0500 +++ github/security/device_cgroup.c 2012-11-27 11:58:43.574251075 -0500 @@ -215,7 +215,11 @@ struct dev_cgroup *dev_cgroup; dev_cgroup = cgroup_to_devcgroup(cgroup); + + mutex_lock(&devcgroup_mutex); dev_exception_clean(dev_cgroup); + mutex_unlock(&devcgroup_mutex); + kfree(dev_cgroup); }