Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751628AbdLBHBZ (ORCPT ); Sat, 2 Dec 2017 02:01:25 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:1326 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751367AbdLBHBX (ORCPT ); Sat, 2 Dec 2017 02:01:23 -0500 X-IronPort-AV: E=Sophos;i="5.45,348,1508796000"; d="scan'208";a="246929750" Date: Sat, 2 Dec 2017 08:01:21 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Rafal Ozieblo cc: Nicolas Ferre , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kbuild-all@01.org Subject: [PATCH v2] net: macb: change GFP_KERNEL to GFP_ATOMIC Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1113 Lines: 34 Function gem_add_flow_filter called on line 2958 inside lock on line 2949 but uses GFP_KERNEL Generated by: scripts/coccinelle/locks/call_kern.cocci Fixes: ae8223de3df5 ("net: macb: Added support for RX filtering") CC: Rafal Ozieblo Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- v2: Fix some broken email addresses. No change to the patch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: fb20eb9d798d2f4c1a75b7fe981d72dfa8d7270d commit: ae8223de3df5a0ce651d14a50dad31b9cae029f2 [2033/2251] net: macb: Added support for RX filtering macb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -2799,7 +2799,7 @@ static int gem_add_flow_filter(struct ne int ret = -EINVAL; bool added = false; - newfs = kmalloc(sizeof(*newfs), GFP_KERNEL); + newfs = kmalloc(sizeof(*newfs), GFP_ATOMIC); if (newfs == NULL) return -ENOMEM; memcpy(&newfs->fs, fs, sizeof(newfs->fs));