diff mbox series

cxgb4/ch_ktls: fix call_kern.cocci warnings

Message ID alpine.DEB.2.22.394.2010231739500.2707@hadrien (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series cxgb4/ch_ktls: fix call_kern.cocci warnings | expand

Commit Message

Julia Lawall Oct. 23, 2020, 3:42 p.m. UTC
From: kernel test robot <lkp@intel.com>

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 <rohitm@chelsio.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

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(-)
diff mbox series

Patch

--- 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;