lkml.org 
[lkml]   [2020]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: linux-next: build warning after merge of the tip tree
Date
Stephen,

Stephen Rothwell <sfr@canb.auug.org.au> writes:
> On Thu, 02 Apr 2020 00:39:55 +0200 Thomas Gleixner <tglx@linutronix.de> wrote:
>> and the below proves it:
>>
>> diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h
>> index e133da303a98..a9151884bc85 100644
>> --- a/arch/arm/include/asm/futex.h
>> +++ b/arch/arm/include/asm/futex.h
>> @@ -165,8 +165,13 @@ arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr)
>> preempt_enable();
>> #endif
>>
>> - if (!ret)
>> - *oval = oldval;
>> + /*
>> + * Store unconditionally. If ret != 0 the extra store is the least
>> + * of the worries but GCC cannot figure out that __futex_atomic_op()
>> + * is either setting ret to -EFAULT or storing the old value in
>> + * oldval which results in a uninitialized warning at the call site.
>> + */
>> + *oval = oldval;
>>
>> return ret;
>> }
>>
>> I think that's the right thing to do anyway. The conditional is pointless.
>
> Thanks for the analysis.
>
> I am still getting this warning, now from Linus' tree builds.

Yeah. Just noticed that both of us failed to CC the arm folks. :(

Let me send out a proper patch.

Thanks,

tglx

\
 
 \ /
  Last update: 2020-04-14 10:43    [W:0.082 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site