Patch "selftests: net: lib: kill PIDs before del netns" has been added to the 6.10-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: net: lib: kill PIDs before del netns

to the 6.10-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-net-lib-kill-pids-before-del-netns.patch
and it can be found in the queue-6.10 subdirectory.

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



commit 2b2048e20d2882808c391b4a15fa3b6d47770159
Author: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
Date:   Tue Aug 13 15:39:34 2024 +0200

    selftests: net: lib: kill PIDs before del netns
    
    [ Upstream commit 7965a7f32a53d9ad807ce2c53bdda69ba104974f ]
    
    When deleting netns, it is possible to still have some tasks running,
    e.g. background tasks like tcpdump running in the background, not
    stopped because the test has been interrupted.
    
    Before deleting the netns, it is then safer to kill all attached PIDs,
    if any. That should reduce some noises after the end of some tests, and
    help with the debugging of some issues. That's why this modification is
    seen as a "fix".
    
    Fixes: 25ae948b4478 ("selftests/net: add lib.sh")
    Acked-by: Mat Martineau <martineau@xxxxxxxxxx>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
    Acked-by: Florian Westphal <fw@xxxxxxxxx>
    Reviewed-by: Hangbin Liu <liuhangbin@xxxxxxxxx>
    Link: https://patch.msgid.link/20240813-upstream-net-20240813-selftests-net-lib-kill-v1-1-27b689b248b8@xxxxxxxxxx
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh
index b2572aff6286f..93de05fedd91a 100644
--- a/tools/testing/selftests/net/lib.sh
+++ b/tools/testing/selftests/net/lib.sh
@@ -132,6 +132,7 @@ cleanup_ns()
 
 	for ns in "$@"; do
 		[ -z "${ns}" ] && continue
+		ip netns pids "${ns}" 2> /dev/null | xargs -r kill || true
 		ip netns delete "${ns}" &> /dev/null || true
 		if ! busywait $BUSYWAIT_TIMEOUT ip netns list \| grep -vq "^$ns$" &> /dev/null; then
 			echo "Warn: Failed to remove namespace $ns"




[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