Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761104AbZC1XYp (ORCPT ); Sat, 28 Mar 2009 19:24:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755466AbZC1XYe (ORCPT ); Sat, 28 Mar 2009 19:24:34 -0400 Received: from extu-mxob-1.symantec.com ([216.10.194.28]:60666 "EHLO extu-mxob-1.symantec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752937AbZC1XYd (ORCPT ); Sat, 28 Mar 2009 19:24:33 -0400 Date: Sat, 28 Mar 2009 23:23:01 +0000 (GMT) From: Hugh Dickins X-X-Sender: hugh@blonde.anvils To: Al Viro cc: Linus Torvalds , Andrew Morton , Joe Malicki , Michael Itz , Kenneth Baker , Chris Wright , David Howells , Alexey Dobriyan , Oleg Nesterov , Greg Kroah-Hartman , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] Annotate struct fs_struct's usage count restriction In-Reply-To: Message-ID: References: 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: 1168 Lines: 33 From: David Howells Annotate struct fs_struct's usage count to indicate the restrictions upon it. It may not be incremented, except by clone(CLONE_FS), as this affects the check in check_unsafe_exec() in fs/exec.c. Signed-off-by: David Howells Signed-off-by: Hugh Dickins Cc: stable@kernel.org --- include/linux/fs_struct.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- 2.6.29/include/linux/fs_struct.h 2009-03-23 23:12:14.000000000 +0000 +++ linux/include/linux/fs_struct.h 2009-03-28 18:06:02.000000000 +0000 @@ -4,7 +4,10 @@ #include struct fs_struct { - atomic_t count; + atomic_t count; /* This usage count is used by check_unsafe_exec() for + * security checking purposes - therefore it may not be + * incremented, except by clone(CLONE_FS). + */ rwlock_t lock; int umask; struct path root, pwd; -- 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/