Re: [Patch v2] mm/vmscan: fix unsequenced modification and access warning

2017-05-31 Thread Michal Hocko
On Thu 25-05-17 21:43:43, Nick Desaulniers wrote: > On Tue, May 16, 2017 at 10:27:46AM +0200, Michal Hocko wrote: > > I guess it is worth reporting this to clang bugzilla. Could you take > > care of that Nick? > > >From https://bugs.llvm.org//show_bug.cgi?id=33065#c5 > it seems that this is indeed

Re: [Patch v2] mm/vmscan: fix unsequenced modification and access warning

2017-05-25 Thread Nick Desaulniers
On Tue, May 16, 2017 at 10:27:46AM +0200, Michal Hocko wrote: > I guess it is worth reporting this to clang bugzilla. Could you take > care of that Nick? >From https://bugs.llvm.org//show_bug.cgi?id=33065#c5 it seems that this is indeed a sequence bug in the previous version of this code and not a

Re: [Patch v2] mm/vmscan: fix unsequenced modification and access warning

2017-05-16 Thread Nick Desaulniers
> I guess it is worth reporting this to clang bugzilla. Could you take > care of that Nick? Done: https://bugs.llvm.org//show_bug.cgi?id=33065

Re: [Patch v2] mm/vmscan: fix unsequenced modification and access warning

2017-05-16 Thread Michal Hocko
I have discussed this with our gcc guys and here is what they say: On Wed 10-05-17 10:38:44, Michal Hocko wrote: [...] > But I > still do not understand which part of the code is undefined and why. My > reading and understanding of the C specification is that > struct A { > int a; > in

Re: [Patch v2] mm/vmscan: fix unsequenced modification and access warning

2017-05-10 Thread Michal Hocko
On Wed 10-05-17 01:27:34, Nick Desaulniers wrote: > Clang flags this file with the -Wunsequenced error that GCC does not > have. > > unsequenced modification and access to 'gfp_mask' > > It seems that gfp_mask is both read and written without a sequence point > in between, which is undefined beha

[Patch v2] mm/vmscan: fix unsequenced modification and access warning

2017-05-10 Thread Nick Desaulniers
Clang flags this file with the -Wunsequenced error that GCC does not have. unsequenced modification and access to 'gfp_mask' It seems that gfp_mask is both read and written without a sequence point in between, which is undefined behavior. Signed-off-by: Nick Desaulniers --- Changes in v2: - don