mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] nfsd/nfs4acl: Number of used used array elements needs to be zeroed.
@ 2008-09-04 14:55 Jiri Pirko
  2008-09-04 15:01 ` J. Bruce Fields
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Pirko @ 2008-09-04 14:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-nfs, bfields, neilb

Number of used used array elements needs to be zeroed. It may cause
problems otherwise, because it's used uninitialized in find_uid().

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
 fs/nfsd/nfs4acl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c
index 54b8b41..7dcd90f 100644
--- a/fs/nfsd/nfs4acl.c
+++ b/fs/nfsd/nfs4acl.c
@@ -447,11 +447,13 @@ init_state(struct posix_acl_state *state, int cnt)
 	state->users = kzalloc(alloc, GFP_KERNEL);
 	if (!state->users)
 		return -ENOMEM;
+	state->users->n = 0;
 	state->groups = kzalloc(alloc, GFP_KERNEL);
 	if (!state->groups) {
 		kfree(state->users);
 		return -ENOMEM;
 	}
+	state->groups->n = 0;
 	return 0;
 }
 
-- 
1.5.5.1


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

end of thread, other threads:[~2008-09-04 22:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-04 14:55 [PATCH] nfsd/nfs4acl: Number of used used array elements needs to be zeroed Jiri Pirko
2008-09-04 15:01 ` J. Bruce Fields
2008-09-04 16:40   ` Benny Halevy
2008-09-04 16:47     ` david m. richter
2008-09-04 16:51     ` J. Bruce Fields
2008-09-04 22:20   ` Jiri Pirko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®