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>
This commit is contained in:
parent
e55005034b
commit
8c97feb5ed
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue