mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: "sudarsana.kalluru@cavium.com" <sudarsana.kalluru@cavium.com>,
	"Sudarsana Reddy Kalluru" <Sudarsana.Kalluru@cavium.com>,
	Yuval Mintz <Yuval.Mintz@cavium.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
Subject: [PATCH for 4.9 07/39] qed: Fix possible system hang in the dcbnl-getdcbx() path.
Date: Mon, 18 Sep 2017 00:19:38 +0000	[thread overview]
Message-ID: <20170918001922.7048-7-alexander.levin@verizon.com> (raw)
In-Reply-To: <20170918001922.7048-1-alexander.levin@verizon.com>

From: "sudarsana.kalluru@cavium.com" <sudarsana.kalluru@cavium.com>

[ Upstream commit 62289ba27558553871fd047baadaaeda886c6a63 ]

qed_dcbnl_get_dcbx() API uses kmalloc in GFT_KERNEL mode. The API gets
invoked in the interrupt context by qed_dcbnl_getdcbx callback. Need
to invoke this kmalloc in atomic mode.

Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
 drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
index a4789a93b692..9d59cb85c012 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
@@ -1222,7 +1222,7 @@ static struct qed_dcbx_get *qed_dcbnl_get_dcbx(struct qed_hwfn *hwfn,
 {
 	struct qed_dcbx_get *dcbx_info;
 
-	dcbx_info = kzalloc(sizeof(*dcbx_info), GFP_KERNEL);
+	dcbx_info = kmalloc(sizeof(*dcbx_info), GFP_ATOMIC);
 	if (!dcbx_info)
 		return NULL;
 
-- 
2.11.0

  parent reply	other threads:[~2017-09-18  0:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18  0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 04/39] usb: plusb: Add support for PL-27A1 Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 03/39] team: fix memory leaks Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 02/39] net/packet: check length in getsockopt() called with PACKET_HDRLEN Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` Levin, Alexander (Sasha Levin) [this message]
2017-09-18  0:19 ` [PATCH for 4.9 06/39] net: dsa: b53: Include IMP/CPU port in dumb forwarding mode Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 09/39] bridge: netlink: register netdevice before executing changelink Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 08/39] mmc: sdio: fix alignment issue in struct sdio_func Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 05/39] udp: disable inner UDP checksum offloads in IPsec case Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 11/39] Btrfs: fix potential use-after-free for cloned bio Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 10/39] Btrfs: fix segmentation fault when doing dio read Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 12/39] sata_via: Enable hotplug only on VT6421 Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 16/39] netfilter: invoke synchronize_rcu after set the _hook_ to NULL Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 14/39] kasan: do not sanitize kexec purgatory Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 13/39] hugetlbfs: initialize shared policy as part of inode allocation Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 15/39] drivers/rapidio/devices/tsi721.c: make module parameter variable name unique Levin, Alexander (Sasha Levin)
2017-09-18  0:19 ` [PATCH for 4.9 17/39] MIPS: IRQ Stack: Unwind IRQ stack onto task stack Levin, Alexander (Sasha Levin)
2017-09-18  6:41 ` [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Greg KH
2017-09-18 14:13   ` Levin, Alexander (Sasha Levin)
2017-09-18 14:31     ` Levin, Alexander (Sasha Levin)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170918001922.7048-7-alexander.levin@verizon.com \
    --to=alexander.levin@verizon.com \
    --cc=Yuval.Mintz@cavium.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=sudarsana.kalluru@cavium.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®