crypto: ixp4xx - convert GFP_KERNEL to GFP_ATOMIC
authorJulia Lawall <julia.lawall@lip6.fr>
Mon, 9 Jan 2012 09:40:49 +0000 (10:40 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 Jan 2012 05:38:41 +0000 (16:38 +1100)
The function is called with locks held and thus should not use GFP_KERNEL.

The semantic patch that makes this report is available
in scripts/coccinelle/locks/call_kern.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ixp4xx_crypto.c

index a82c11af9f4829a835bf614461a748f2894a801c..0053d7ebb5cae0a479eacf0d22c69606509644ea 100644 (file)
@@ -265,7 +265,7 @@ static int setup_crypt_desc(void)
        BUILD_BUG_ON(sizeof(struct crypt_ctl) != 64);
        crypt_virt = dma_alloc_coherent(dev,
                        NPE_QLEN * sizeof(struct crypt_ctl),
-                       &crypt_phys, GFP_KERNEL);
+                       &crypt_phys, GFP_ATOMIC);
        if (!crypt_virt)
                return -ENOMEM;
        memset(crypt_virt, 0, NPE_QLEN * sizeof(struct crypt_ctl));