From 25a6a99f6d2e005c4403f2b005353f1d3a0f57c7 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Mon, 21 Apr 2008 17:56:12 -0700 Subject: [PATCH] BUG #4. Don't use kmalloc with GFP_KERNEL within an rcu_read_lock(). --- datapath/datapath.c | 2 +- datapath/table-hash.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/datapath/datapath.c b/datapath/datapath.c index 89c57674..054c47e5 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -1008,7 +1008,7 @@ static int dp_genl_query(struct sk_buff *skb, struct genl_info *info) err = -ENOENT; else { void *data; - ans_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); + ans_skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC); if (!ans_skb) { err = -ENOMEM; goto err; diff --git a/datapath/table-hash.c b/datapath/table-hash.c index 87d3f650..184aa30d 100644 --- a/datapath/table-hash.c +++ b/datapath/table-hash.c @@ -165,7 +165,7 @@ static int table_hash_iterator(struct sw_table *swt, { struct swt_iterator_hash *ih; - swt_iter->private = ih = kmalloc(sizeof *ih, GFP_KERNEL); + swt_iter->private = ih = kmalloc(sizeof *ih, GFP_ATOMIC); if (ih == NULL) return 0; @@ -306,7 +306,7 @@ static int table_hash2_iterator(struct sw_table *swt, { struct swt_iterator_hash2 *ih2; - swt_iter->private = ih2 = kmalloc(sizeof *ih2, GFP_KERNEL); + swt_iter->private = ih2 = kmalloc(sizeof *ih2, GFP_ATOMIC); if (ih2 == NULL) return 0; -- 2.30.2