From: sashiko-bot@kernel.org
To: "Jiri Pirko" <jiri@resnulli.us>
Cc: hannes@cmpxchg.org, mkoutny@suse.com, linux-s390@vger.kernel.org,
tj@kernel.org, "Heiko Carstens" <hca@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>
Subject: Re: [PATCH rdma-next v2 14/14] RDMA/selftests: Add rxe_netns_names test
Date: Wed, 15 Jul 2026 14:30:45 +0000 [thread overview]
Message-ID: <20260715143046.020451F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260714142927.1298897-15-jiri@resnulli.us>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Asynchronous RXE device deletion causes race conditions and test failures.
- [Medium] Asynchronous network namespace deletion causes test teardown to permanently leak the exclusive netns mode.
--
--- Patch [14]: [PATCH rdma-next v2 14/14] RDMA/selftests: Add rxe_netns_names test ---
commit dcc30384e696a4047f319e3b7139b30b3ddc09f4
Author: Jiri Pirko <jiri@resnulli.us>
RDMA/selftests: Add rxe_netns_names test
Add a kselftest script that exercises per-netns RDMA device naming
with RXE. Cover duplicate names across namespaces, move conflict
handling, move-with-rename, and same-namespace rename requests.
> diff --git a/tools/testing/selftests/rdma/rxe_netns_names.sh b/tools/testing/selftests/rdma/rxe_netns_names.sh
> new file mode 100755
> --- /dev/null
> +++ b/tools/testing/selftests/rdma/rxe_netns_names.sh
[ ... ]
> +cleanup_devs()
> +{
> + ip link del "$DUMMY_A" 2>/dev/null
> + ip link del "$DUMMY_B" 2>/dev/null
> +}
[Severity: Medium]
Will this cause race conditions between test iterations?
The ip link del command returns as soon as the netdev reference is dropped,
but the rdma_rxe driver handles the NETDEV_UNREGISTER event by scheduling an
asynchronous unregistration of the RDMA device via
ib_unregister_device_queued().
Could the next test iteration fail with -EEXIST when attempting to create or
rename a device to the exact same name (like $RXE_SAME) if the asynchronous
device_del() from the previous test hasn't finished?
[ ... ]
> +cleanup()
> +{
> + cleanup_devs
> +
> + ip netns del "$NS1" 2>/dev/null
> + ip netns del "$NS2" 2>/dev/null
> +
> + if [ "$MODE_CHANGED" -eq 1 ]; then
> + rdma system set netns "$OLD_MODE" 2>/dev/null
> + fi
[Severity: Medium]
Does this cleanup sequence permanently leak the exclusive netns mode?
The ip netns del command initiates asynchronous teardown by queuing
net_cleanup_work. If rdma system set netns "$OLD_MODE" is executed
immediately afterwards while the namespaces are still in the process of being
destroyed, the kernel might reject the mode change with -EBUSY.
Since the script redirects errors to /dev/null, it seems the system's RDMA
subsystem could permanently be left in exclusive mode instead of being
restored to its original shared mode.
> +
> + for m in "${MODS[@]}"; do
> + modprobe -r "$m" 2>/dev/null
> + done
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260714142927.1298897-1-jiri@resnulli.us?part=14
prev parent reply other threads:[~2026-07-15 14:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 14:29 [PATCH rdma-next v2 00/14] RDMA: Make device names unique per net namespace Jiri Pirko
2026-07-14 14:29 ` [PATCH rdma-next v2 01/14] RDMA/core: Pass the net namespace to the device name lookups Jiri Pirko
2026-07-14 14:29 ` [PATCH rdma-next v2 02/14] RDMA/core: Handle device name conflicts when changing net namespace Jiri Pirko
2026-07-14 14:29 ` [PATCH rdma-next v2 03/14] RDMA/core: Support renaming a device when changing its " Jiri Pirko
2026-07-15 14:30 ` sashiko-bot
2026-07-14 14:29 ` [PATCH rdma-next v2 04/14] RDMA/nldev: Report net namespace move errors through extack Jiri Pirko
2026-07-14 14:29 ` [PATCH rdma-next v2 05/14] RDMA/nldev: Allow setting the device name while changing net namespace Jiri Pirko
2026-07-14 14:29 ` [PATCH rdma-next v2 06/14] net/smc: Look up the pnetid ib device within the " Jiri Pirko
2026-07-15 14:30 ` sashiko-bot
2026-07-14 14:29 ` [PATCH rdma-next v2 07/14] RDMA/srp: Make the SRP sysfs class net namespace aware Jiri Pirko
2026-07-14 14:29 ` [PATCH rdma-next v2 08/14] RDMA/cgroup: Disambiguate devices across net namespaces Jiri Pirko
2026-07-14 14:29 ` [PATCH rdma-next v2 09/14] RDMA/cma: Document that CM configfs cannot be net namespace scoped Jiri Pirko
2026-07-14 14:29 ` [PATCH rdma-next v2 10/14] RDMA/core: Document the SELinux ibendport net namespace limitation Jiri Pirko
2026-07-14 14:29 ` [PATCH rdma-next v2 11/14] RDMA/core: Make device names unique per net namespace Jiri Pirko
2026-07-15 14:30 ` sashiko-bot
2026-07-14 14:29 ` [PATCH rdma-next v2 12/14] RDMA/rxe: Allow queue VMAs to outlive ucontexts Jiri Pirko
2026-07-14 14:29 ` [PATCH rdma-next v2 13/14] RDMA/rxe: Implement disassociate_ucontext callback Jiri Pirko
2026-07-14 14:29 ` [PATCH rdma-next v2 14/14] RDMA/selftests: Add rxe_netns_names test Jiri Pirko
2026-07-15 14:30 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260715143046.020451F00A3D@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hannes@cmpxchg.org \
--cc=hca@linux.ibm.com \
--cc=jiri@resnulli.us \
--cc=linux-s390@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.