lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5375130B.8010303@tycho.nsa.gov>
Date:	Thu, 15 May 2014 15:18:35 -0400
From:	Stephen Smalley <sds@...ho.nsa.gov>
To:	Dave Jones <davej@...hat.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>, pmoore@...hat.com,
	eparis@...hat.com
Subject: Re: [2/2] conditionally reschedule in hashtab_insert while loading
 selinux policy.

On 05/15/2014 03:03 PM, Dave Jones wrote:
> After silencing the sleeping warning in mls_convert_context() I started
> seeing similar traces from hashtab_insert. Do a cond_resched there too.
> 
> Signed-off-by: Dave Jones <davej@...hat.com>

Acked-by:  Stephen Smalley <sds@...ho.nsa.gov>

> 
> diff --git a/security/selinux/ss/hashtab.c b/security/selinux/ss/hashtab.c
> index 933e735bb185..2cc496149842 100644
> --- a/security/selinux/ss/hashtab.c
> +++ b/security/selinux/ss/hashtab.c
> @@ -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;
>  
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ