[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cfed2906-291f-41e9-a6ba-4884a7380d17@igalia.com>
Date: Wed, 19 Nov 2025 12:28:37 -0300
From: André Almeida <andrealmeid@...lia.com>
To: Ankit Khushwaha <ankitkhushwaha.linux@...il.com>
Cc: Darren Hart <dvhart@...radead.org>, Peter Zijlstra
<peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Shuah Khan <shuah@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
Davidlohr Bueso <dave@...olabs.net>
Subject: Re: [PATCH v2] selftests/futex: Fix storing address of local variable
Hi Ankit,
Em 18/11/2025 14:08, Ankit Khushwaha escreveu:
> In "child_circular_list()" address of local variable ‘lock_struct a’
> is assigned to "" raising the following warning.
>
> robust_list.c: In function ‘child_circular_list’:
> robust_list.c:522:24: warning: storing the address of local variable ‘a’
> in ‘head.list.next’ [-Wdangling-pointer=]
>
> 522 | head.list.next = &a.list;
> | ~~~~~~~~~~~~~~~^~~~~~~~~
> robust_list.c:513:28: note: ‘a’ declared here
> 513 | struct lock_struct a, b, c;
> | ^
> robust_list.c:512:40: note: ‘head’ declared here
> 512 | static struct robust_list_head head;
> | ^~~~
>
> removing the static keyword of "head" to fix this.
>
This should be "Remove the static..." as noted in the kernel documentation:
"Describe your changes in imperative mood, e.g. “make xyzzy do frotz”
instead of “[This patch] makes xyzzy do frotz” or “[I] changed xyzzy to
do frotz”, as if you are giving orders to the codebase to change its
behaviour."
Please have a look on this page here:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html
Powered by blists - more mailing lists