Patch "selftests/bpf: Fix fclose/pclose mismatch in test_progs" has been added to the 5.14-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: Fix fclose/pclose mismatch in test_progs

to the 5.14-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-fix-fclose-pclose-mismatch-in-test_pro.patch
and it can be found in the queue-5.14 subdirectory.

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



commit c6b9debb63ab8b065275a35e14bec819f0dec22d
Author: Andrea Righi <andrea.righi@xxxxxxxxxxxxx>
Date:   Tue Oct 26 16:34:09 2021 +0200

    selftests/bpf: Fix fclose/pclose mismatch in test_progs
    
    [ Upstream commit f48ad69097fe79d1de13c4d8fef556d4c11c5e68 ]
    
    Make sure to use pclose() to properly close the pipe opened by popen().
    
    Fixes: 81f77fd0deeb ("bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID")
    Signed-off-by: Andrea Righi <andrea.righi@xxxxxxxxxxxxx>
    Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
    Reviewed-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
    Acked-by: Martin KaFai Lau <kafai@xxxxxx>
    Link: https://lore.kernel.org/bpf/20211026143409.42666-1-andrea.righi@xxxxxxxxxxxxx
    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 bfbf2277b61a6..f381253902274 100644
--- a/tools/testing/selftests/bpf/test_progs.c
+++ b/tools/testing/selftests/bpf/test_progs.c
@@ -348,7 +348,7 @@ int extract_build_id(char *build_id, size_t size)
 
 	if (getline(&line, &len, fp) == -1)
 		goto err;
-	fclose(fp);
+	pclose(fp);
 
 	if (len > size)
 		len = size;
@@ -357,7 +357,7 @@ int extract_build_id(char *build_id, size_t size)
 	free(line);
 	return 0;
 err:
-	fclose(fp);
+	pclose(fp);
 	return -1;
 }
 



[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