Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756819Ab0FBB4y (ORCPT ); Tue, 1 Jun 2010 21:56:54 -0400 Received: from tundra.namei.org ([65.99.196.166]:33444 "EHLO tundra.namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754789Ab0FBB4w (ORCPT ); Tue, 1 Jun 2010 21:56:52 -0400 Date: Wed, 2 Jun 2010 11:56:36 +1000 (EST) From: James Morris To: Dan Carpenter cc: Casey Schaufler , "David P. Quigley" , David Howells , Serge Hallyn , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [patch] smack: opt_dentry is never null in in smack_d_instantiate() In-Reply-To: <20100601071404.GH5483@bicker> Message-ID: References: <20100601071404.GH5483@bicker> 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: 1023 Lines: 29 On Tue, 1 Jun 2010, Dan Carpenter wrote: > This patch removes some unneeded code for if opt_dentry is null because > that can never happen. > > The function dereferences "opt_dentry" earlier when it checks > "if (opt_dentry->d_parent == opt_dentry) {". That code was added in > 2008. > > This function called from security_d_instantiate(). I checked all the > places which call security_d_instantiate() and dentry is always non-null. > I also checked the selinux version of this hook and there is a comment > which says that dentry should be non-null if called from > d_instantiate(). > > Signed-off-by: Dan Carpenter 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/