On Thu, Jun 25, 2015 at 4:44 PM, Jens Axboe <ax...@fb.com> wrote: > This is the big pull request for adding cgroup writeback support. This > code has been in development for a long time, and it has been simmering > in for-next for a good chunk of this cycle too. This is one of those > problems that has been talked about for at least half a decade, finally > there's a solution and code to go with it.
Spoiler for TLDR: These are all false positives. If CONFIG_CGROUP_WRITEBACK=n: mm/page-writeback.c: In function ‘balance_dirty_pages_ratelimited’: mm/page-writeback.c:1574: warning: ‘writeback’ is used uninitialized in this function In this case, mem_cgroup_wb_stats() is a dummy function that doesn't write to its output parameters, hence writeback will contain arbitrary data. There's another call too mem_cgroup_wb_stats() in wb_over_bg_thresh() where my gcc 4.1.2 didn't warn, where it probably deduced that mdtc will always be NULL, and the branch thus never taken. Regardless of CONFIG_CGROUP_WRITEBACK: mm/page-writeback.c: In function ‘balance_dirty_pages_ratelimited’: mm/page-writeback.c:1537: warning: ‘m_bg_thresh’ may be used uninitialized in this function mm/page-writeback.c:1537: warning: ‘m_thresh’ may be used uninitialized in this function mm/page-writeback.c:1537: warning: ‘m_dirty’ may be used uninitialized in this function But these are false positives too, due to the many tests on mdtc or !mdtc, and the creative use of dummy *_INIT() macros and mdtc_valid() static inline functions. I suggest refactoring this code to make it less fragile, though. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/