The patch titled Subject: mm/backing-dev.c: fix error path in wb_init() has been added to the -mm tree. Its filename is mm-backing-devc-fix-error-path-in-wb_init.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-backing-devc-fix-error-path-in-wb_init.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-backing-devc-fix-error-path-in-wb_init.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/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Subject: mm/backing-dev.c: fix error path in wb_init() We need to use post-decrement to get percpu_counter_destroy() called on &wb->stat[0]. Moreover, the pre-decremebt would cause infinite out-of-bounds accesses if the setup code failed at i==0. Signed-off-by: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/backing-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN mm/backing-dev.c~mm-backing-devc-fix-error-path-in-wb_init mm/backing-dev.c --- a/mm/backing-dev.c~mm-backing-devc-fix-error-path-in-wb_init +++ a/mm/backing-dev.c @@ -328,7 +328,7 @@ static int wb_init(struct bdi_writeback return 0; out_destroy_stat: - while (--i) + while (i--) percpu_counter_destroy(&wb->stat[i]); fprop_local_destroy_percpu(&wb->completions); out_put_cong: _ Patches currently in -mm which might be from linux@xxxxxxxxxxxxxxxxxx are mm-backing-devc-fix-error-path-in-wb_init.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