BUG #4.
authorJustin Pettit <jpettit@nicira.com>
Tue, 22 Apr 2008 00:56:12 +0000 (17:56 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 22 Apr 2008 00:56:12 +0000 (17:56 -0700)
Don't use kmalloc with GFP_KERNEL within an rcu_read_lock().

datapath/datapath.c
datapath/table-hash.c

index 89c576742928a9fdc59fbb4cf76f5ea838f30641..054c47e5825aaa1176b32ff6d1be44bb6f0a3b6e 100644 (file)
@@ -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;
index 87d3f65054364253ec82809aa3fa17e85f52e0e9..184aa30d74fcd1c25bc73439d4a90dc620b8f5d6 100644 (file)
@@ -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;