Skip to contentSkip to conversation

selinux: fix error codes in symtab_init()

PATCH In review Dan Carpenter 3 participants 3 messages Jun 18, 2010 – Jul 22, 2010 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH v2 7/7 selinux: fix error codes in symtab_init()

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

---
V2: unchanged.

security/selinux/ss/symtab.c +1 -1
index bcf9f62..160326e 100644
@@ -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 [email protected] with the words "unsubscribe selinux" without quotes as the message.

Acked-by on v2 7/7
#1 lore raw
Quoted 5 lines · Dan Carpenter

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

for the entire series.

Quoted 22 lines

---
V2: unchanged.

security/selinux/ss/symtab.c +1 -2
index bcf9f62..160326e 100644
@@ -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 [email protected] with the words "unsubscribe selinux" without quotes as the message.

Signature · 8 lines
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 [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 9 lines · Stephen Smalley
Quoted 5 lines · Dan Carpenter

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

for the entire series.

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

Signature · 7 lines
James Morris
<[email protected]>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.