xen-netback: Use GFP_ATOMIC to allocate hash
authorAnoob Soman <anoob.soman@citrix.com>
Thu, 2 Mar 2017 10:50:20 +0000 (10:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Mar 2017 22:44:22 +0000 (14:44 -0800)
Allocation of new_hash, inside xenvif_new_hash(), always happen
in softirq context, so use GFP_ATOMIC instead of GFP_KERNEL for new
hash allocation.

Signed-off-by: Anoob Soman <anoob.soman@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/hash.c

index e8c5dddc54ba27ee43354ab1fae263e0c31c5f1e..3c4c58b9fe76edfbf3d27fb5b6dbd0184ba706c0 100644 (file)
@@ -39,7 +39,7 @@ static void xenvif_add_hash(struct xenvif *vif, const u8 *tag,
        unsigned long flags;
        bool found;
 
-       new = kmalloc(sizeof(*entry), GFP_KERNEL);
+       new = kmalloc(sizeof(*entry), GFP_ATOMIC);
        if (!new)
                return;