iavf: Change GFP_KERNEL to GFP_ATOMIC in kzalloc()
authorAleksandr Loktionov <aleksandr.loktionov@intel.com>
Tue, 14 May 2019 17:37:02 +0000 (10:37 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 17 Jun 2019 22:39:25 +0000 (15:39 -0700)
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>
drivers/net/ethernet/intel/iavf/iavf_main.c

index 9ce04a8c0d0ff4fa502758079546cb63996c1999..8a37b9f604e23c0ae7d8c90fa652ef31b909bf86 100644 (file)
@@ -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;