]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/dlm/dir.c
[ARM] 4904/1: [AT91] Pass ECC controller to NAND driver
[linux-2.6-omap-h63xx.git] / fs / dlm / dir.c
index 831050e5bfd59529359904b64cbcb81b215508a0..85defeb64df452068e78044321a98c807c75d687 100644 (file)
@@ -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;