projects/linux·commit 3be4aaf4

Merge branch 'userns-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace

3be4aaf4 · Linus Torvalds <[email protected]> · 2018-04-24 17:58:51 -07:00

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.
Commit
3be4aaf4e2d3eb95cce7835e8df797ae65ae5ac1
Parents
24cac700 · 1f578172

Merge commit. Changes below are compared with the first parent: 24cac700.

Changes

1 files changed · +2 −0

FileStatusAddDelContent
security/commoncap.cmodified+2−0View file

security/commoncap.c

View file
diff --git a/security/commoncap.c b/security/commoncap.c
index 48620c9..1ce701f 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -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);