Skip to content

Commit

Permalink
xattr: Remove unnecessary NULL attribute name check
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Andreas Gruenbacher authored and Al Viro committed Oct 7, 2016
1 parent 08895a8 commit 5d18cbf
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 5d18cbf

Please sign in to comment.