Skip to content

Commit

Permalink
iavf: Change GFP_KERNEL to GFP_ATOMIC in kzalloc()
Browse files Browse the repository at this point in the history
iavf_add_vlan() is being called in atomic context
so kzalloc() needs GFP_ATOMIC. This patch fixes it.

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Aleksandr Loktionov authored and Jeff Kirsher committed Jun 17, 2019
1 parent 88ec730 commit f0a48fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/iavf/iavf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ iavf_vlan_filter *iavf_add_vlan(struct iavf_adapter *adapter, u16 vlan)

f = iavf_find_vlan(adapter, vlan);
if (!f) {
f = kzalloc(sizeof(*f), GFP_KERNEL);
f = kzalloc(sizeof(*f), GFP_ATOMIC);
if (!f)
goto clearout;

Expand Down

0 comments on commit f0a48fb

Please sign in to comment.