diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-03-16 05:48:11 -0400 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2013-03-18 09:33:09 -0400 |
commit | 4502403dcf8f5c76abd4dbab8726c8e4ecb5cd34 (patch) | |
tree | 79f16f1c9ff482fb926b147a2f4f0b4382f0ccf6 /security | |
parent | a937536b868b8369b98967929045f1df54234323 (diff) |
selinux: use GFP_ATOMIC under spin_lock
The call tree here is:
sk_clone_lock() <- takes bh_lock_sock(newsk);
xfrm_sk_clone_policy()
__xfrm_sk_clone_policy()
clone_policy() <- uses GFP_ATOMIC for allocations
security_xfrm_policy_clone()
security_ops->xfrm_policy_clone_security()
selinux_xfrm_policy_clone()
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/xfrm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c index 48665ecd1197..8ab295154517 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c | |||
@@ -310,7 +310,7 @@ int selinux_xfrm_policy_clone(struct xfrm_sec_ctx *old_ctx, | |||
310 | 310 | ||
311 | if (old_ctx) { | 311 | if (old_ctx) { |
312 | new_ctx = kmalloc(sizeof(*old_ctx) + old_ctx->ctx_len, | 312 | new_ctx = kmalloc(sizeof(*old_ctx) + old_ctx->ctx_len, |
313 | GFP_KERNEL); | 313 | GFP_ATOMIC); |
314 | if (!new_ctx) | 314 | if (!new_ctx) |
315 | return -ENOMEM; | 315 | return -ENOMEM; |
316 | 316 | ||