net: macb: change GFP_KERNEL to GFP_ATOMIC
authorJulia Lawall <[email protected]>
Sat, 2 Dec 2017 07:01:21 +0000 (08:01 +0100)
committerDavid S. Miller <[email protected]>
Tue, 5 Dec 2017 16:26:42 +0000 (11:26 -0500)
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: ae8223de3df5 ("net: macb: Added support for RX filtering")
CC: Rafal Ozieblo <[email protected]>
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/cadence/macb_main.c

index c5fa87cdc6c401a790522c1232026c15c70ba296..8af325ef542da0af263762c1c420cd2a0488705d 100644 (file)
@@ -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));