From: Justin Pettit Date: Tue, 22 Apr 2008 00:56:12 +0000 (-0700) Subject: BUG #4. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25a6a99f6d2e005c4403f2b005353f1d3a0f57c7;p=openvswitch BUG #4. Don't use kmalloc with GFP_KERNEL within an rcu_read_lock(). --- 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;