Skip to content

Commit

Permalink
selinux: use GFP_ATOMIC under spin_lock
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
Dan Carpenter authored and James Morris committed Mar 18, 2013
1 parent a937536 commit 4502403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/selinux/xfrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4502403

Please sign in to comment.