The patch titled Subject: ocfs2: drop a VLA in ocfs2_orphan_del() has been added to the -mm tree. Its filename is ocfs2-drop-a-vla-in-ocfs2_orphan_del.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-drop-a-vla-in-ocfs2_orphan_del.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-drop-a-vla-in-ocfs2_orphan_del.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Salvatore Mesoraca <s.mesoraca16@xxxxxxxxx> Subject: ocfs2: drop a VLA in ocfs2_orphan_del() Avoid a VLA by using a real constant expression instead of a variable. The compiler should be able to optimize the original code and avoid using an actual VLA. Anyway this change is useful because it will avoid a false positive with -Wvla, it might also help the compiler generating better code. Link: http://lkml.kernel.org/r/1520970710-19732-1-git-send-email-s.mesoraca16@xxxxxxxxx Signed-off-by: Salvatore Mesoraca <s.mesoraca16@xxxxxxxxx> Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Mark Fasheh <mark@xxxxxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Cc: Junxiao Bi <junxiao.bi@xxxxxxxxxx> Cc: Joseph Qi <jiangqi903@xxxxxxxxx> Cc: Changwei Ge <ge.changwei@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/namei.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -puN fs/ocfs2/namei.c~ocfs2-drop-a-vla-in-ocfs2_orphan_del fs/ocfs2/namei.c --- a/fs/ocfs2/namei.c~ocfs2-drop-a-vla-in-ocfs2_orphan_del +++ a/fs/ocfs2/namei.c @@ -2332,8 +2332,7 @@ int ocfs2_orphan_del(struct ocfs2_super struct buffer_head *orphan_dir_bh, bool dio) { - const int namelen = OCFS2_DIO_ORPHAN_PREFIX_LEN + OCFS2_ORPHAN_NAMELEN; - char name[namelen + 1]; + char name[OCFS2_DIO_ORPHAN_PREFIX_LEN + OCFS2_ORPHAN_NAMELEN + 1]; struct ocfs2_dinode *orphan_fe; int status = 0; struct ocfs2_dir_lookup_result lookup = { NULL, }; _ Patches currently in -mm which might be from s.mesoraca16@xxxxxxxxx are ocfs2-drop-a-vla-in-ocfs2_orphan_del.patch namei-allow-restricted-o_creat-of-fifos-and-regular-files.patch namei-allow-restricted-o_creat-of-fifos-and-regular-files-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html