aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-11-19 19:08:46 -0800
committerJakub Kicinski <kuba@kernel.org>2020-11-19 19:08:46 -0800
commit56495a2442a47d0ea752db62434913b3346fe5a5 (patch)
tree35284af165304f4fe47f0214a48a8708f76a0d28 /security
parentr8153_ecm: avoid to be prior to r8152 driver (diff)
parentMerge tag 'net-5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff)
downloadlinux-dev-56495a2442a47d0ea752db62434913b3346fe5a5.tar.xz
linux-dev-56495a2442a47d0ea752db62434913b3346fe5a5.zip
Merge https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/ibpkey.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/security/selinux/ibpkey.c b/security/selinux/ibpkey.c
index f68a7617cfb9..3a63a989e55e 100644
--- a/security/selinux/ibpkey.c
+++ b/security/selinux/ibpkey.c
@@ -151,8 +151,10 @@ static int sel_ib_pkey_sid_slow(u64 subnet_prefix, u16 pkey_num, u32 *sid)
* is valid, it just won't be added to the cache.
*/
new = kzalloc(sizeof(*new), GFP_ATOMIC);
- if (!new)
+ if (!new) {
+ ret = -ENOMEM;
goto out;
+ }
new->psec.subnet_prefix = subnet_prefix;
new->psec.pkey = pkey_num;