From: Andreas Gruenbacher Subject: [PATCH v2 01/18] xattr: Remove unnecessary NULL attribute name check Date: Fri, 20 May 2016 13:14:18 +0200 Message-ID: <1463742875-9836-2-git-send-email-agruenba@redhat.com> References: <1463742875-9836-1-git-send-email-agruenba@redhat.com> Return-path: In-Reply-To: <1463742875-9836-1-git-send-email-agruenba@redhat.com> Sender: owner-linux-security-module@vger.kernel.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexander Viro Cc: Andreas Gruenbacher , linux-fsdevel@vger.kernel.org, Tyler Hicks , ecryptfs@vger.kernel.org, Miklos Szeredi , linux-unionfs@vger.kernel.org, Mimi Zohar , linux-ima-devel@lists.sourceforge.net, linux-security-module@vger.kernel.org, David Howells , Serge Hallyn , Dmitry Kasatkin , Paul Moore , Stephen Smalley , Eric Paris , Casey Schaufler , Oleg Drokin , Andreas Dilger When NULL is passed to one of the xattr system calls as the attribute name, copying that name from user space already fails with -EFAULT; xattr_resolve_name is never called with a NULL attribute name. Signed-off-by: Andreas Gruenbacher --- fs/xattr.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/xattr.c b/fs/xattr.c index b11945e..2476acc 100644 --- a/fs/xattr.c +++ b/fs/xattr.c @@ -667,9 +667,6 @@ xattr_resolve_name(const struct xattr_handler **handlers, const char **name) { const struct xattr_handler *handler; - if (!*name) - return NULL; - for_each_xattr_handler(handlers, handler) { const char *n; -- 2.5.5