From patchwork Fri Oct 23 15:42:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 298635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEF89C4363A for ; Fri, 23 Oct 2020 15:42:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 973B4221F9 for ; Fri, 23 Oct 2020 15:42:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S463257AbgJWPmb (ORCPT ); Fri, 23 Oct 2020 11:42:31 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:38732 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S463246AbgJWPma (ORCPT ); Fri, 23 Oct 2020 11:42:30 -0400 X-IronPort-AV: E=Sophos;i="5.77,408,1596492000"; d="scan'208";a="474078905" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2020 17:42:28 +0200 Date: Fri, 23 Oct 2020 17:42:28 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Rohit Maheshwari cc: kuba@kernel.org, netdev@vger.kernel.org, davem@davemloft.net, secdev@chelsio.com, Rohit Maheshwari , kbuild-all@lists.01.org Subject: [PATCH] cxgb4/ch_ktls: fix call_kern.cocci warnings Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: kernel test robot drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:1592:22-32: ERROR: function chcr_end_part_handler called on line 1885 inside lock on line 1822 but uses GFP_KERNEL Find functions that refer to GFP_KERNEL but are called with locks held. Semantic patch information: The proposed change of converting the GFP_KERNEL is not necessarily the correct one. It may be desired to unlock the lock, or to not call the function under the lock in the first place. Generated by: scripts/coccinelle/locks/call_kern.cocci CC: Rohit Maheshwari Signed-off-by: kernel test robot Signed-off-by: Julia Lawall --- Hello, Please check on this. Normally, it relates to the call site of the function. julia url: https://github.com/0day-ci/linux/commits/Rohit-Maheshwari/cxgb4-ch_ktls-Fixes-in-nic-tls-code/20201023-133301 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 18ded910b589839e38a51623a179837ab4cc3789 :::::: branch date: 3 hours ago :::::: commit date: 3 hours ago Please take the patch only if it's a positive warning. Thanks! chcr_ktls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c +++ b/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c @@ -1589,7 +1589,7 @@ static int chcr_end_part_handler(struct /* TAG needs to be calculated so, need to send complete record, * free the original skb and send a new one. */ - nskb = alloc_skb(0, GFP_KERNEL); + nskb = alloc_skb(0, GFP_ATOMIC); if (!nskb) { dev_kfree_skb_any(skb); return NETDEV_TX_BUSY;