Skip to content

Commit

Permalink
Merge branch 'userns-linus' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/ebiederm/user-namespace

Pull userns bug fix from Eric Biederman:
 "Just a small fix to properly set the return code on error"

* 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
  commoncap: Handle memory allocation failure.
  • Loading branch information
torvalds committed Apr 25, 2018
2 parents 24cac70 + 1f57817 commit 3be4aaf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions security/commoncap.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ int cap_inode_getsecurity(struct inode *inode, const char *name, void **buffer,
magic |= VFS_CAP_FLAGS_EFFECTIVE;
memcpy(&cap->data, &nscap->data, sizeof(__le32) * 2 * VFS_CAP_U32);
cap->magic_etc = cpu_to_le32(magic);
} else {
size = -ENOMEM;
}
}
kfree(tmpbuf);
Expand Down

0 comments on commit 3be4aaf

Please sign in to comment.