Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f9bd136 authored by sudarsana.kalluru@cavium.com's avatar sudarsana.kalluru@cavium.com Committed by Greg Kroah-Hartman
Browse files

qed: Fix possible system hang in the dcbnl-getdcbx() path.




[ 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: default avatarSudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f0631685
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;