From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:48054 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754998AbcHVVWm (ORCPT ); Mon, 22 Aug 2016 17:22:42 -0400 From: Andreas Gruenbacher To: Alexander Viro Cc: Andreas Gruenbacher , linux-fsdevel@vger.kernel.org, Tyler Hicks , ecryptfs@vger.kernel.org, Miklos Szeredi , linux-unionfs@vger.kernel.org, David Howells , Serge Hallyn , Dmitry Kasatkin , linux-ima-devel@lists.sourceforge.net, Paul Moore , Stephen Smalley , Eric Paris , Casey Schaufler , Oleg Drokin , Andreas Dilger Subject: [PATCH v4 05/20] xattr: Remove unnecessary NULL attribute name check Date: Mon, 22 Aug 2016 23:21:53 +0200 Message-Id: <1471900928-21588-6-git-send-email-agruenba@redhat.com> In-Reply-To: <1471900928-21588-1-git-send-email-agruenba@redhat.com> References: <1471900928-21588-1-git-send-email-agruenba@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 c243905..1f72c92 100644 --- a/fs/xattr.c +++ b/fs/xattr.c @@ -675,9 +675,6 @@ xattr_resolve_name(const struct xattr_handler **handlers, const char **name) { const struct xattr_handler *handler; - if (!*name) - return ERR_PTR(-EINVAL); - for_each_xattr_handler(handlers, handler) { const char *n; -- 2.7.4