mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
selftests/futex: Give circular-list nodes static storage
The registered robust-list head has static storage but points at three automatic lock nodes. GCC warns about storing the address of a local variable in the static head when building the selftest with -Wall. Give the nodes static storage as well. This keeps every object in the circular list alive through child exit without changing the list topology. Signed-off-by: Miles Krause <mileskrause5200@gmail.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: André Almeida <andrealmeid@igalia.com> Link: https://patch.msgid.link/20260711-futex-robust-list-static-nodes-v1-1-723754d75cf5@gmail.com
This commit is contained in:
committed by
Thomas Gleixner
parent
23dd3f8849
commit
d1c656df36
@@ -536,8 +536,8 @@ static int child_circular_list(void *arg)
|
||||
{
|
||||
struct child_args *cargs = arg;
|
||||
struct __test_metadata *_metadata = cargs->_metadata;
|
||||
static struct lock_struct a, b, c;
|
||||
struct robust_list_head head;
|
||||
struct lock_struct a, b, c;
|
||||
int ret;
|
||||
|
||||
free(cargs);
|
||||
|
||||
Reference in New Issue
Block a user