2010-11-10 20:16:48

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [tip:core/urgent] futex: Address compiler warnings in exit_robust_list

Hallo Thomas,

On Wed, Nov 10, 2010 at 12:30:44PM +0000, tip-bot for Darren Hart wrote:
> Commit-ID: 4c115e951d80aff126468adaec7a6c7854f61ab8
> Gitweb: http://git.kernel.org/tip/4c115e951d80aff126468adaec7a6c7854f61ab8
> Author: Darren Hart <[email protected]>
> AuthorDate: Thu, 4 Nov 2010 15:00:00 -0400
> Committer: Thomas Gleixner <[email protected]>
> CommitDate: Wed, 10 Nov 2010 13:27:50 +0100
>
> futex: Address compiler warnings in exit_robust_list
>
> Since commit 1dcc41bb (futex: Change 3rd arg of fetch_robust_entry()
> to unsigned int*) some gcc versions decided to emit the following
> warning:
>
> kernel/futex.c: In function ‘exit_robust_list’:
> kernel/futex.c:2492: warning: ‘next_pi’ may be used uninitialized in this function
>
> The commit did not introduce the warning as gcc should have warned
> before that commit as well. It's just gcc being silly.
>
> The code path really can't result in next_pi being unitialized (or
> should not), but let's keep the build clean. Annotate next_pi as an
> uninitialized_var.
>
> [ tglx: Addressed the same issue in futex_compat.c and massaged the
> changelog ]
>
> Signed-off-by: Darren Hart <[email protected]>
> Tested-by: Matt Fleming <[email protected]>
> Tested-by: Uwe Kleine-König <[email protected]>
I don't care much (at least until someone claims this change to
introduce a regression), but I didn't test it. I only suggested to use
uninitialized_var instead of = 0.

Thanks
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |


2010-11-10 20:21:26

by Darren Hart

[permalink] [raw]
Subject: Re: [tip:core/urgent] futex: Address compiler warnings in exit_robust_list

2010/11/10 Uwe Kleine-K?nig <[email protected]>:
> Hallo Thomas,
>
> On Wed, Nov 10, 2010 at 12:30:44PM +0000, tip-bot for Darren Hart wrote:
>> Commit-ID: ?4c115e951d80aff126468adaec7a6c7854f61ab8
>> Gitweb: ? ? http://git.kernel.org/tip/4c115e951d80aff126468adaec7a6c7854f61ab8
>> Author: ? ? Darren Hart <[email protected]>
>> AuthorDate: Thu, 4 Nov 2010 15:00:00 -0400
>> Committer: ?Thomas Gleixner <[email protected]>
>> CommitDate: Wed, 10 Nov 2010 13:27:50 +0100
>>
>> futex: Address compiler warnings in exit_robust_list
>>
>> Since commit 1dcc41bb (futex: Change 3rd arg of fetch_robust_entry()
>> to unsigned int*) some gcc versions decided to emit the following
>> warning:
>>
>> kernel/futex.c: In function ?exit_robust_list?:
>> kernel/futex.c:2492: warning: ?next_pi? may be used uninitialized in this function
>>
>> The commit did not introduce the warning as gcc should have warned
>> before that commit as well. It's just gcc being silly.
>>
>> The code path really can't result in next_pi being unitialized (or
>> should not), but let's keep the build clean. Annotate next_pi as an
>> uninitialized_var.
>>
>> [ tglx: Addressed the same issue in futex_compat.c and massaged the
>> ? ? ? changelog ]
>>
>> Signed-off-by: Darren Hart <[email protected]>
>> Tested-by: Matt Fleming <[email protected]>
>> Tested-by: Uwe Kleine-K?nig <[email protected]>
> I don't care much (at least until someone claims this change to
> introduce a regression), but I didn't test it. ?I only suggested to use
> uninitialized_var instead of = 0.
>

Uwe, I added you after you said I could add the ARM platform and
compiler to the list. I took that to mean you had confirmed that the
patch fixed the warning on that platform. I apologize as this is
apparently not the case.

--
Darren

2010-11-10 20:22:44

by Darren Hart

[permalink] [raw]
Subject: Re: [tip:core/urgent] futex: Address compiler warnings in exit_robust_list

On 11/10/2010 12:16 PM, Uwe Kleine-König wrote:
> Hallo Thomas,
>
> On Wed, Nov 10, 2010 at 12:30:44PM +0000, tip-bot for Darren Hart wrote:
>> Commit-ID: 4c115e951d80aff126468adaec7a6c7854f61ab8
>> Gitweb: http://git.kernel.org/tip/4c115e951d80aff126468adaec7a6c7854f61ab8
>> Author: Darren Hart<[email protected]>
>> AuthorDate: Thu, 4 Nov 2010 15:00:00 -0400
>> Committer: Thomas Gleixner<[email protected]>
>> CommitDate: Wed, 10 Nov 2010 13:27:50 +0100
>>
>> futex: Address compiler warnings in exit_robust_list
>>
>> Since commit 1dcc41bb (futex: Change 3rd arg of fetch_robust_entry()
>> to unsigned int*) some gcc versions decided to emit the following
>> warning:
>>
>> kernel/futex.c: In function ‘exit_robust_list’:
>> kernel/futex.c:2492: warning: ‘next_pi’ may be used uninitialized in this function
>>
>> The commit did not introduce the warning as gcc should have warned
>> before that commit as well. It's just gcc being silly.
>>
>> The code path really can't result in next_pi being unitialized (or
>> should not), but let's keep the build clean. Annotate next_pi as an
>> uninitialized_var.
>>
>> [ tglx: Addressed the same issue in futex_compat.c and massaged the
>> changelog ]
>>
>> Signed-off-by: Darren Hart<[email protected]>
>> Tested-by: Matt Fleming<[email protected]>
>> Tested-by: Uwe Kleine-König<[email protected]>
> I don't care much (at least until someone claims this change to
> introduce a regression), but I didn't test it. I only suggested to use
> uninitialized_var instead of = 0.


Uwe,

I added you after you said I could add the ARM platform and compiler to
the list. I took that to mean you had confirmed that the patch fixed the
warning on that platform. I apologize as this is apparently not the case.

--
Darren