]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - security/selinux/ss/hashtab.c
Merge branch 'serge-next-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sergeh...
[karo-tx-linux.git] / security / selinux / ss / hashtab.c
index 933e735bb1850d8b7d125f4899124ff8f2af0d0d..2cc496149842825cd90e57a087c57314295f73fc 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/errno.h>
+#include <linux/sched.h>
 #include "hashtab.h"
 
 struct hashtab *hashtab_create(u32 (*hash_value)(struct hashtab *h, const void *key),
@@ -40,6 +41,8 @@ int hashtab_insert(struct hashtab *h, void *key, void *datum)
        u32 hvalue;
        struct hashtab_node *prev, *cur, *newnode;
 
+       cond_resched();
+
        if (!h || h->nel == HASHTAB_MAX_NODES)
                return -EINVAL;