aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-03-16 12:48:11 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-20 12:58:52 -0700
commit5e44eef46e81bf6e159b44fa893cf7dd47a88f53 (patch)
tree6fb4c0e8552cbb7260d16b258de76a1e73d32a4d /security
parent99c817e4571710eca014345ac44c5ba41e77a853 (diff)
downloadkernel_samsung_smdk4412-5e44eef46e81bf6e159b44fa893cf7dd47a88f53.zip
kernel_samsung_smdk4412-5e44eef46e81bf6e159b44fa893cf7dd47a88f53.tar.gz
kernel_samsung_smdk4412-5e44eef46e81bf6e159b44fa893cf7dd47a88f53.tar.bz2
selinux: use GFP_ATOMIC under spin_lock
commit 4502403dcf8f5c76abd4dbab8726c8e4ecb5cd34 upstream. 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> Signed-off-by: James Morris <james.l.morris@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/xfrm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c
index 68178b7..1df278c 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,
if (old_ctx) {
new_ctx = kmalloc(sizeof(*old_ctx) + old_ctx->ctx_len,
- GFP_KERNEL);
+ GFP_ATOMIC);
if (!new_ctx)
return -ENOMEM;