[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080904165518.15a02908@psychotron.englab.brq.redhat.com>
Date: Thu, 4 Sep 2008 16:55:18 +0200
From: Jiri Pirko <jpirko@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: linux-nfs@...r.kernel.org, bfields@...ldses.org, neilb@...e.de
Subject: [PATCH] nfsd/nfs4acl: Number of used used array elements needs to
be zeroed.
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@...hat.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
--
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