Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp481149pxk; Thu, 3 Sep 2020 05:09:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2xUt+x1SMViQpSSdR0i8FMrOLLTUhydkngfnUW1uSjkntnE3o1dBLmhXql3vIZ+gEtfER X-Received: by 2002:a50:ce06:: with SMTP id y6mr1743320edi.273.1599134947340; Thu, 03 Sep 2020 05:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599134947; cv=none; d=google.com; s=arc-20160816; b=xItItl+iF3g8zdhgcfft7JUujMtGLe7X0JhhPtxJIPuukKM2T2/dcqUY93Eyolxs9G 30jDIZfuzdcSetHijsg7fzRJYZVUKIgL7LwKO+EY+7lz6ElfWFg3fMmCBw4zy6TgsAYJ SJldd4gCAmjSZWVInOywdUY4Kh2vlaOj8hBdPrRNzwoMaH6CTfowF+MfAyp6Jry/3FpK 3Gcx3fOMG14LJS4GG1sTqA4+PYBqs2aYQAkhvp/+3oOnWZJIk0N9HCVeoEbPW3+ARwCi fsIR+PhDitrmCAWA+ABW29me3yugffsgEHS5LFvtWorofZRBsMt2MCFk8eVskHRjDxI2 ZegA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=l/vX7ALR9npAxDuOqlpTzo+LGbe5CANgWkZrbboRLq0=; b=xyh9bPVMeOXxkJkVOlAsKdx2m2UaeTf9H2f4ryU77Z9Q2j3nSBQ1urEWupWc2B9xlS djZGBhbyidKx75ktVNvtjBrEyE8fwMkB2SMPsnMfY8XvzOdGlml3QCXssrTJHbkBYNd9 RN5MtCwz83BfTmupI/ysd5diuRCU9mPawHjSiiEdd6qeDx3t4DtcUGcYWgpuPCj9SA4/ lLkYbdDnmqi3Q0BcHwq0N9vv4My2AfJ+yufr9eH44me4lyRuynA2FC6U5CZGzJg1jNm2 GG8TOJjhZY3v/ZCDAZOnDHu1naY2QtlAvfKaSMaSJ93SHfrtPSMB1Ns630lv+PDCwzwJ F8Lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u6si1667547ejg.449.2020.09.03.05.08.43; Thu, 03 Sep 2020 05:09:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728790AbgICL6x (ORCPT + 99 others); Thu, 3 Sep 2020 07:58:53 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:50722 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728725AbgICLtn (ORCPT ); Thu, 3 Sep 2020 07:49:43 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E6620A509112187F4BE1; Thu, 3 Sep 2020 19:49:36 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Thu, 3 Sep 2020 19:49:27 +0800 From: Wei Xu To: CC: , , , , , , , , , , , , , , , Boris Pismenny , Saeed Mahameed , Jakub Kicinski , Tariq Toukan , , Subject: [PATCH] net/mlx5e: kTLS, Fix GFP_KERNEL in spinlock context Date: Thu, 3 Sep 2020 19:45:34 +0800 Message-ID: <1599133539-175203-1-git-send-email-xuwei5@hisilicon.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace GFP_KERNEL with GFP_ATOMIC while resync_post_get_progress_params is invoked in a spinlock context. This code was detected with the help of Coccinelle. Signed-off-by: Wei Xu --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c index acf6d80..1a32435 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_rx.c @@ -247,7 +247,7 @@ resync_post_get_progress_params(struct mlx5e_icosq *sq, int err; u16 pi; - buf = kzalloc(sizeof(*buf), GFP_KERNEL); + buf = kzalloc(sizeof(*buf), GFP_ATOMIC); if (unlikely(!buf)) { err = -ENOMEM; goto err_out; -- 2.8.1