Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: sashiko-reviews@lists.linux.dev
Cc: tj@kernel.org, linux-s390@vger.kernel.org,
	 Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	hannes@cmpxchg.org,  mkoutny@suse.com,
	Heiko Carstens <hca@linux.ibm.com>
Subject: Re: [PATCH rdma-next v3 03/14] RDMA/core: Support renaming a device when changing its net namespace
Date: Wed, 22 Jul 2026 13:02:32 +0200	[thread overview]
Message-ID: <amCjGk45wKDz5Z2u@FV6GYCPJ69> (raw)
In-Reply-To: <20260717132428.686441F00A3A@smtp.kernel.org>

Fri, Jul 17, 2026 at 03:24:28PM +0200, sashiko-bot@kernel.org wrote:
>Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
>- [Medium] The netlink handler fails to pass the requested device name to `ib_device_set_netns_put` during a network namespace change, and ignores namespace moves entirely if a rename is also requested.
>--
>
>--- Patch [3]: [PATCH rdma-next v3 03/14] RDMA/core: Support renaming a device when changing its net namespace ---
>commit 65e19be4bcb60d41b06e567081d99cee8fd2722c
>Author: Jiri Pirko <jiri@resnulli.us>
>
>RDMA/core: Support renaming a device when changing its net namespace
>
>This commit adds support for renaming a device at the same time it is moved
>to a new network namespace. It allows namespace moves to request a specific
>destination device name, falling back to a trusted kernel-controlled pattern
>if none is provided.
>
>> diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
>> index 32b6c4d68ca0a..77a7580801486 100644
>> --- a/drivers/infiniband/core/nldev.c
>> +++ b/drivers/infiniband/core/nldev.c
>> @@ -1195,7 +1195,7 @@ static int nldev_set_doit(struct sk_buff *skb, struct nlmsghdr *nlh,
>>  		u32 ns_fd;
>>  
>>  		ns_fd = nla_get_u32(tb[RDMA_NLDEV_NET_NS_FD]);
>> -		err = ib_device_set_netns_put(skb, device, ns_fd);
>> +		err = ib_device_set_netns_put(skb, device, ns_fd, NULL);
>
>[Severity: Medium]
>Does this hardcoded NULL prevent the core feature from being reached?
>
>It appears the newly added name parameter in ib_device_set_netns_put() is 
>never populated with the requested device name from the netlink attributes 
>in nldev_set_doit(). 
>
>If a user provides both RDMA_NLDEV_ATTR_DEV_NAME and RDMA_NLDEV_NET_NS_FD,
>the rename-during-move functionality cannot be used. Additionally, if the
>name attribute is parsed in a separate block, the function appears to take
>an early exit path, bypassing the namespace move entirely.
>
>Could this be updated to properly process both attributes and pass the
>requested device name during the move?

False possitive. Next patch changes this.


>
>>  		if (err == -EEXIST)
>>  			NL_SET_ERR_MSG(extack,
>>  				       "Device name already exists in the target net namespace");
>
>-- 
>Sashiko AI review · https://sashiko.dev/#/patchset/20260716132316.1495242-1-jiri@resnulli.us?part=3

  reply	other threads:[~2026-07-22 11:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16 13:23 [PATCH rdma-next v3 00/14] RDMA: Make device names unique per net namespace Jiri Pirko
2026-07-16 13:23 ` [PATCH rdma-next v3 01/14] RDMA/core: Pass the net namespace to the device name lookups Jiri Pirko
2026-07-16 13:23 ` [PATCH rdma-next v3 02/14] RDMA/core: Handle device name conflicts when changing net namespace Jiri Pirko
2026-07-17 13:24   ` sashiko-bot
2026-07-17 14:06     ` Jiri Pirko
2026-07-16 13:23 ` [PATCH rdma-next v3 03/14] RDMA/core: Support renaming a device when changing its " Jiri Pirko
2026-07-17 13:24   ` sashiko-bot
2026-07-22 11:02     ` Jiri Pirko [this message]
2026-07-16 13:23 ` [PATCH rdma-next v3 04/14] RDMA/nldev: Report net namespace move errors through extack Jiri Pirko
2026-07-17 13:24   ` sashiko-bot
2026-07-22 11:17     ` Jiri Pirko
2026-07-16 13:23 ` [PATCH rdma-next v3 05/14] RDMA/nldev: Allow setting the device name while changing net namespace Jiri Pirko
2026-07-16 13:23 ` [PATCH rdma-next v3 06/14] net/smc: Look up the pnetid ib device within the " Jiri Pirko
2026-07-17 13:24   ` sashiko-bot
2026-07-17 14:08     ` Jiri Pirko
2026-07-16 13:23 ` [PATCH rdma-next v3 07/14] RDMA/srp: Make the SRP sysfs class net namespace aware Jiri Pirko
2026-07-30 18:34   ` Bart Van Assche
2026-07-16 13:23 ` [PATCH rdma-next v3 08/14] RDMA/cgroup: Disambiguate devices across net namespaces Jiri Pirko
2026-08-24 18:29   ` Michal Koutný
2026-07-16 13:23 ` [PATCH rdma-next v3 09/14] RDMA/cma: Document that CM configfs cannot be net namespace scoped Jiri Pirko
2026-07-16 13:23 ` [PATCH rdma-next v3 10/14] RDMA/core: Document the SELinux ibendport net namespace limitation Jiri Pirko
2026-07-16 13:23 ` [PATCH rdma-next v3 11/14] RDMA/core: Make device names unique per net namespace Jiri Pirko
2026-07-16 13:23 ` [PATCH rdma-next v3 12/14] RDMA/rxe: Allow queue VMAs to outlive ucontexts Jiri Pirko
2026-07-16 13:23 ` [PATCH rdma-next v3 13/14] RDMA/rxe: Implement disassociate_ucontext callback Jiri Pirko
2026-07-16 13:23 ` [PATCH rdma-next v3 14/14] RDMA/selftests: Add rxe_netns_names test Jiri Pirko
2026-07-17  4:22   ` Zhu Yanjun
2026-07-17 13:24   ` sashiko-bot
2026-07-17 14:09     ` Jiri Pirko
2026-07-22 11:19 ` [PATCH rdma-next v3 00/14] RDMA: Make device names unique per net namespace Jiri Pirko
2026-07-22 11:53   ` Leon Romanovsky
2026-07-22 13:01     ` Jiri Pirko
2026-07-26  7:32 ` Leon Romanovsky

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=amCjGk45wKDz5Z2u@FV6GYCPJ69 \
    --to=jiri@resnulli.us \
    --cc=agordeev@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hannes@cmpxchg.org \
    --cc=hca@linux.ibm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox