All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 7/7 v2] selinux: fix error codes in symtab_init()
@ 2010-06-12 18:57 Dan Carpenter
  2010-07-22 14:53 ` Stephen Smalley
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2010-06-12 18:57 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: James Morris, Eric Paris, selinux

hashtab_create() only returns NULL on allocation failures to -ENOMEM is
appropriate here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Eric Paris <eparis@redhat.com>
---
V2: unchanged.

diff --git a/security/selinux/ss/symtab.c b/security/selinux/ss/symtab.c
index bcf9f62..160326e 100644
--- a/security/selinux/ss/symtab.c
+++ b/security/selinux/ss/symtab.c
@@ -36,7 +36,7 @@ int symtab_init(struct symtab *s, unsigned int size)
 {
 	s->table = hashtab_create(symhash, symcmp, size);
 	if (!s->table)
-		return -1;
+		return -ENOMEM;
 	s->nprim = 0;
 	return 0;
 }


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch 7/7 v2] selinux: fix error codes in symtab_init()
  2010-06-12 18:57 [patch 7/7 v2] selinux: fix error codes in symtab_init() Dan Carpenter
@ 2010-07-22 14:53 ` Stephen Smalley
  2010-07-22 22:43   ` James Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Smalley @ 2010-07-22 14:53 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: James Morris, Eric Paris, selinux

On Sat, 2010-06-12 at 20:57 +0200, Dan Carpenter wrote:
> hashtab_create() only returns NULL on allocation failures to -ENOMEM is
> appropriate here.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> Acked-by: Eric Paris <eparis@redhat.com>

Acked-by:  Stephen D. Smalley <sds@tycho.nsa.gov>
for the entire series.

> ---
> V2: unchanged.
> 
> diff --git a/security/selinux/ss/symtab.c b/security/selinux/ss/symtab.c
> index bcf9f62..160326e 100644
> --- a/security/selinux/ss/symtab.c
> +++ b/security/selinux/ss/symtab.c
> @@ -36,7 +36,7 @@ int symtab_init(struct symtab *s, unsigned int size)
>  {
>  	s->table = hashtab_create(symhash, symcmp, size);
>  	if (!s->table)
> -		return -1;
> +		return -ENOMEM;
>  	s->nprim = 0;
>  	return 0;
>  }
> 
> 
> --
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
> the words "unsubscribe selinux" without quotes as the message.

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 7/7 v2] selinux: fix error codes in symtab_init()
  2010-07-22 14:53 ` Stephen Smalley
@ 2010-07-22 22:43   ` James Morris
  0 siblings, 0 replies; 3+ messages in thread
From: James Morris @ 2010-07-22 22:43 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: Dan Carpenter, Eric Paris, selinux

On Thu, 22 Jul 2010, Stephen Smalley wrote:

> On Sat, 2010-06-12 at 20:57 +0200, Dan Carpenter wrote:
> > hashtab_create() only returns NULL on allocation failures to -ENOMEM is
> > appropriate here.
> > 
> > Signed-off-by: Dan Carpenter <error27@gmail.com>
> > Acked-by: Eric Paris <eparis@redhat.com>
> 
> Acked-by:  Stephen D. Smalley <sds@tycho.nsa.gov>
> for the entire series.

All applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next

-- 
James Morris
<jmorris@namei.org>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-22 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-12 18:57 [patch 7/7 v2] selinux: fix error codes in symtab_init() Dan Carpenter
2010-07-22 14:53 ` Stephen Smalley
2010-07-22 22:43   ` James Morris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.