projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9cc915
)
dlm: fix dlm_dir_lookup() handling of too long names
author
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 26 Jan 2008 05:03:59 +0000
(
00:03
-0500)
committer
David Teigland
<teigland@redhat.com>
Mon, 4 Feb 2008 07:30:19 +0000
(
01:30
-0600)
... those can happen and BUG() from DLM_ASSERT() in allocate_direntry() is
not a good way to handle them.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/dir.c
patch
|
blob
|
history
diff --git
a/fs/dlm/dir.c
b/fs/dlm/dir.c
index 831050e5bfd59529359904b64cbcb81b215508a0..85defeb64df452068e78044321a98c807c75d687 100644
(file)
--- a/
fs/dlm/dir.c
+++ b/
fs/dlm/dir.c
@@
-319,6
+319,9
@@
static int get_entry(struct dlm_ls *ls, int nodeid, char *name,
write_unlock(&ls->ls_dirtbl[bucket].lock);
+ if (namelen > DLM_RESNAME_MAXLEN)
+ return -EINVAL;
+
de = kzalloc(sizeof(struct dlm_direntry) + namelen, GFP_KERNEL);
if (!de)
return -ENOMEM;