diff options
Diffstat (limited to 'security/selinux/netnode.c')
-rw-r--r-- | security/selinux/netnode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/security/selinux/netnode.c b/security/selinux/netnode.c index 8bb456d80dd5..5d0ed08d46e5 100644 --- a/security/selinux/netnode.c +++ b/security/selinux/netnode.c @@ -201,7 +201,10 @@ static int sel_netnode_sid_slow(const void *addr, u16 family, u32 *sid) return 0; } - new = kzalloc(sizeof(*new), GFP_ATOMIC); + /* If this memory allocation fails still return 0. The SID + * is valid, it just won't be added to the cache. + */ + new = kmalloc(sizeof(*new), GFP_ATOMIC); switch (family) { case PF_INET: ret = security_node_sid(PF_INET, |