]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
pknock: switch allocations to GFP_KERNEL
authorJan Engelhardt <jengelh@medozas.de>
Fri, 16 Oct 2009 14:56:57 +0000 (16:56 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Fri, 30 Oct 2009 17:40:52 +0000 (18:40 +0100)
All allocations currently using GFP_ATOMIC happen in user context, so
GFP_KERNEL is sufficient.

extensions/pknock/xt_pknock.c

index 9bfcdf4e111a977d042177fac4104e0466dc1be0..830603e611001124ba099c9c8ca21fe6d6c2823e 100644 (file)
@@ -162,7 +162,7 @@ alloc_hashtable(unsigned int size)
        struct list_head *hash;
        unsigned int i;
 
-       hash = kmalloc(sizeof(*hash) * size, GFP_ATOMIC);
+       hash = kmalloc(sizeof(*hash) * size, GFP_KERNEL);
        if (hash == NULL)
                return NULL;
        for (i = 0; i < size; ++i)
@@ -470,7 +470,7 @@ add_rule(struct xt_pknock_mtinfo *info)
                }
        }
 
-       rule = kmalloc(sizeof(*rule), GFP_ATOMIC);
+       rule = kmalloc(sizeof(*rule), GFP_KERNEL);
        if (rule == NULL)
                return false;