Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=043b19cdc081f586a8f4e1c93ce6c03b63c26284
Commit:     043b19cdc081f586a8f4e1c93ce6c03b63c26284
Parent:     a9cc9159281d44754f621f75d4efad0076b29db4
Author:     Al Viro <[EMAIL PROTECTED]>
AuthorDate: Sat Jan 26 00:03:59 2008 -0500
Committer:  David Teigland <[EMAIL PROTECTED]>
CommitDate: Mon Feb 4 01:30:19 2008 -0600

    dlm: fix dlm_dir_lookup() handling of too long names
    
    ... those can happen and BUG() from DLM_ASSERT() in allocate_direntry() is
    not a good way to handle them.
    
    Signed-off-by: Al Viro <[EMAIL PROTECTED]>
    Signed-off-by: David Teigland <[EMAIL PROTECTED]>
---
 fs/dlm/dir.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/dlm/dir.c b/fs/dlm/dir.c
index 831050e..85defeb 100644
--- 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to