Skip to content

Commit

Permalink
qed: Fix possible system hang in the dcbnl-getdcbx() path.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sudarsana.kalluru@cavium.com authored and David S. Miller committed Apr 20, 2017
1 parent 6cf75f1 commit 62289ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/qlogic/qed/qed_dcbx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,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;

Expand Down

0 comments on commit 62289ba

Please sign in to comment.