[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVnurNWy97MQdmy_GASf40-Xg0G7fbpqYWirPo_7ddA3g@mail.gmail.com>
Date: Fri, 26 Jun 2015 11:49:58 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Jens Axboe <axboe@...com>, Tejun Heo <tj@...nel.org>
Cc: torvalds@...uxfoundation.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] Cgroup writeback support for 4.2
On Thu, Jun 25, 2015 at 4:44 PM, Jens Axboe <axboe@...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 -- geert@...ux-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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists