Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755674AbZLJBC3 (ORCPT ); Wed, 9 Dec 2009 20:02:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752987AbZLJBCX (ORCPT ); Wed, 9 Dec 2009 20:02:23 -0500 Received: from tundra.namei.org ([65.99.196.166]:57766 "EHLO tundra.namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751889AbZLJBCX (ORCPT ); Wed, 9 Dec 2009 20:02:23 -0500 Date: Thu, 10 Dec 2009 12:02:15 +1100 (EST) From: James Morris To: Thomas Gleixner cc: LKML , linux-security-module@vger.kernel.org, Peter Zijlstra Subject: Re: [PATCH] capabilities: Use RCU to protect task lookup in sys_capget In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 837 Lines: 25 On Wed, 9 Dec 2009, Thomas Gleixner wrote: > cap_get_target_pid() protects the task lookup with tasklist_lock. > security_capget() is called under tasklist_lock as well but > tasklist_lock does not protect anything there. The capabilities are > protected by RCU already. > > So tasklist_lock only protects the lookup and prevents the task going > away, which can be done with rcu_read_lock() as well. > > Signed-off-by: Thomas Gleixner Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next -- James Morris -- 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/