浏览代码

xen-netback: Use GFP_ATOMIC to allocate hash

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>
Anoob Soman 8 年之前
父节点
当前提交
9f674e48c1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/xen-netback/hash.c

+ 1 - 1
drivers/net/xen-netback/hash.c

@@ -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;