Skip to content

Commit

Permalink
net: macb: change GFP_KERNEL to GFP_ATOMIC
Browse files Browse the repository at this point in the history
Function gem_add_flow_filter called on line 2958 inside lock on line 2949
but uses GFP_KERNEL

Generated by: scripts/coccinelle/locks/call_kern.cocci

Fixes: ae8223d ("net: macb: Added support for RX filtering")
CC: Rafal Ozieblo <rafalo@cadence.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Julia Lawall authored and David S. Miller committed Dec 5, 2017
1 parent 9b89f07 commit 81da3bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cadence/macb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2799,7 +2799,7 @@ static int gem_add_flow_filter(struct net_device *netdev,
int ret = -EINVAL;
bool added = false;

newfs = kmalloc(sizeof(*newfs), GFP_KERNEL);
newfs = kmalloc(sizeof(*newfs), GFP_ATOMIC);
if (newfs == NULL)
return -ENOMEM;
memcpy(&newfs->fs, fs, sizeof(newfs->fs));
Expand Down

0 comments on commit 81da3bf

Please sign in to comment.