From patchwork Thu Sep 3 11:45:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Xu X-Patchwork-Id: 248999 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp369408ilg; Thu, 3 Sep 2020 04:52:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaO0yw0Of1bSmbKlJ1BnByCvu7o7pLDPurVVnMVVNn+fJZt6ZgxXQpEcO1a5l9+gZ5V91O X-Received: by 2002:a05:6402:3199:: with SMTP id di25mr2665320edb.315.1599133944314; Thu, 03 Sep 2020 04:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599133944; cv=none; d=google.com; s=arc-20160816; b=tH0OFqqPDDkgG5PmKnvdsLj6s3LWmhN8IzlQXbMLjXJ1IwtmpcqmKtR62/mbKqQhwB 5VihpqKcKVgMOg//N8ZCBZehg6asGSuzeHEaiS3Wq+sSf9eoxAxGndP+FAkngf4V7mGF U2tcm4k6TsnqgPbHT3L3Ihwt7Ogk6rarZmpCTkcOH4Mlk882yUcmOgVRVLYmAScikOed rutJEg2cn8idZPEatc9QHjTD/epzpT75Qw6pX8KdagE5lA8+66y96QXdHmwlPGB9x+at nqpgx2CacxzSFoBSQDZoHUJ/XEtvLqvzze0IVgas8ddPOFLMi+Ef/d2lYopJ/ime1Pcb xuug== 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=x9xZamAfto2BryuyHUuelSAxx+Y3N7hbXVIDdXfzcKLfgTGIvZ7DIdXVGpmaywGS3q OEldbATvUsp/3PYg6w6otPcnWfY7v6Z5hsSnKRUfgLGfW53qBvv6wA+UmM0bJKOXV/De vWYPnyle+yTdjaXOdYcoEvJqzRv5gVrc5tDoExCCyddCBgm/e7BWXPDTgQOPDFEwl1zf jz2xMxp3zkbTtko35gstgx+LSVpsXufrlDylpGwCw2R1lAWcQVYVg9b9bnmSHm3FdbzX sHjrsZM9rQg3XmSNhwJtXsAhDcGQhumKsuvFPFSdvSVp4nAxXSH8zGGoZM8+6NDN1kVr GDxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 l10si1592322edf.398.2020.09.03.04.52.23; Thu, 03 Sep 2020 04:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-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 netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728748AbgICLvb (ORCPT + 9 others); Thu, 3 Sep 2020 07:51:31 -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 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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(-) -- 2.8.1 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;