Patch "selftests/bpf: Use pid_t consistently in test_progs.c" has been added to the 6.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests/bpf: Use pid_t consistently in test_progs.c

to the 6.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-bpf-use-pid_t-consistently-in-test_progs.c.patch
and it can be found in the queue-6.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7283dd1a620ed88c554c873417a17719ecb22cb0
Author: Tony Ambardar <tony.ambardar@xxxxxxxxx>
Date:   Mon Jul 22 22:54:28 2024 -0700

    selftests/bpf: Use pid_t consistently in test_progs.c
    
    [ Upstream commit ec4fe2f0fa12fd2d0115df7e58414dc26899cc5e ]
    
    Use pid_t rather than __pid_t when allocating memory for 'worker_pids' in
    'struct test_env', as this is its declared type and also avoids compile
    errors seen building against musl libc on mipsel64:
    
      test_progs.c:1738:49: error: '__pid_t' undeclared (first use in this function); did you mean 'pid_t'?
       1738 |                 env.worker_pids = calloc(sizeof(__pid_t), env.workers);
            |                                                 ^~~~~~~
            |                                                 pid_t
      test_progs.c:1738:49: note: each undeclared identifier is reported only once for each function it appears in
    
    Fixes: 91b2c0afd00c ("selftests/bpf: Add parallelism to test_progs")
    Signed-off-by: Tony Ambardar <tony.ambardar@xxxxxxxxx>
    Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Acked-by: Geliang Tang <geliang@xxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/c6447da51a94babc1931711a43e2ceecb135c93d.1721713597.git.tony.ambardar@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c
index 89ff704e9dad5..60c5ec0f6abf6 100644
--- a/tools/testing/selftests/bpf/test_progs.c
+++ b/tools/testing/selftests/bpf/test_progs.c
@@ -1731,7 +1731,7 @@ int main(int argc, char **argv)
 	/* launch workers if requested */
 	env.worker_id = -1; /* main process */
 	if (env.workers) {
-		env.worker_pids = calloc(sizeof(__pid_t), env.workers);
+		env.worker_pids = calloc(sizeof(pid_t), env.workers);
 		env.worker_socks = calloc(sizeof(int), env.workers);
 		if (env.debug)
 			fprintf(stdout, "Launching %d workers.\n", env.workers);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux