From: Julia Lawall Date: Mon, 9 Jan 2012 09:40:50 +0000 (+0100) Subject: drivers/net/wireless/mwifiex/scan.c: convert GFP_KERNEL to GFP_ATOMIC X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=75ac9a28a0c6b818ba1aba874b6b3ae17241552c;p=openwrt%2Fstaging%2Fblogic.git drivers/net/wireless/mwifiex/scan.c: convert GFP_KERNEL to GFP_ATOMIC 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 Acked-by: Bing Zhao Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index 6396d3318ead..98f1ca9cd6d8 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c @@ -2001,7 +2001,7 @@ mwifiex_save_curr_bcn(struct mwifiex_private *priv) kfree(priv->curr_bcn_buf); priv->curr_bcn_buf = kmalloc(curr_bss->beacon_buf_size, - GFP_KERNEL); + GFP_ATOMIC); if (!priv->curr_bcn_buf) { dev_err(priv->adapter->dev, "failed to alloc curr_bcn_buf\n");