[3.5.y.z,extended,stable] Patch "selinux: use GFP_ATOMIC under spin_lock" has been added to staging queue

Submitted by Luis Henriques on March 20, 2013, 10:43 a.m.


Message ID 1363776234-5113-1-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques March 20, 2013, 10:43 a.m.
This is a note to let you know that I have just added a patch titled

    selinux: use GFP_ATOMIC under spin_lock

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:


If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 983ae9f8fe2ac2e1d6dfd28ca36a9eaf4959c069 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Sat, 16 Mar 2013 12:48:11 +0300
Subject: [PATCH] selinux: use GFP_ATOMIC under spin_lock

commit 4502403dcf8f5c76abd4dbab8726c8e4ecb5cd34 upstream.

The call tree here is:

sk_clone_lock()              <- takes bh_lock_sock(newsk);
clone_policy()               <- uses GFP_ATOMIC for allocations

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Luis Henriques <luis.henriques@canonical.com>
 security/selinux/xfrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Patch hide | download patch | download mbox

diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c
index 48665ec..8ab2951 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;