Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753642AbbHWNNv (ORCPT ); Sun, 23 Aug 2015 09:13:51 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:34502 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752602AbbHWNKs (ORCPT ); Sun, 23 Aug 2015 09:10:48 -0400 From: Aleksa Sarai To: tj@kernel.org Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Aleksa Sarai Subject: [PATCH 0/2] cgroup: pids: fix invalid reference semantics Date: Sun, 23 Aug 2015 23:10:30 +1000 Message-Id: <1440335432-4202-1-git-send-email-cyphar@cyphar.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 899 Lines: 23 I've discovered a bug in the PIDs cgroup. We aren't properly dealing with css references (we grab a reference to a css in ->can_attach() and then drop a reference to a *different* css in ->{cancel_,}attach(). This is a quick patch I wrote which I believe fixes the problem by getting cgroup_migrate() to grab a reference before ->can_attach() and once the attach has failed or succeded. Aleksa Sarai (2): cgroup: get a ref to source csses when migrating cgroup: pids: fix invalid get/put usage kernel/cgroup.c | 21 +++++++++++++++++++-- kernel/cgroup_pids.c | 13 +------------ 2 files changed, 20 insertions(+), 14 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/