Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764767AbZLQOTN (ORCPT ); Thu, 17 Dec 2009 09:19:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757344AbZLQOTM (ORCPT ); Thu, 17 Dec 2009 09:19:12 -0500 Received: from palinux.external.hp.com ([192.25.206.14]:49228 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757243AbZLQOTL (ORCPT ); Thu, 17 Dec 2009 09:19:11 -0500 Date: Thu, 17 Dec 2009 07:19:08 -0700 From: Matthew Wilcox To: Liuweni Cc: linux-fsdevel , linux-kernel , viro , Xiao Guangrong , strongzgy , Liu Hui Subject: Re: [PATCH 1/3]posix acl:Add an acl check Message-ID: <20091217141908.GV7812@parisc-linux.org> References: <200912172215402654375@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200912172215402654375@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1037 Lines: 22 On Thu, Dec 17, 2009 at 10:15:43PM +0800, Liuweni wrote: > In this function, the parameter of acl will be called by FOREACH_ACL_ENTRY(macro) > without null point check. I add a null point check to it. All the callers of posix_acl_valid() currently check for acl being a null pointer themselves. Moving the check to posix_acl_valid() certainly seems like a good idea to me, but you need to delete the check from all the callers. Further, it seems like many of the callers might have a PTR_ERR value for 'acl', so you should also move this check into posix_acl_valid(). -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- 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/