[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250403043001.GA22526@lst.de>
Date: Thu, 3 Apr 2025 06:30:01 +0200
From: Christoph Hellwig <hch@....de>
To: shaopeijie@...tc.cn
Cc: kbusch@...nel.org, sagi@...mberg.me, axboe@...nel.dk, hch@....de,
linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org,
gechangzhong@...tc.cn, zhang.guanghui@...tc.cn
Subject: Re: [PATCH] Fix netns UAF introduced by commit 1be52169c348
On Tue, Apr 01, 2025 at 02:19:34PM +0800, shaopeijie@...tc.cn wrote:
> + /* sock_create_kern() does not take a reference to
> + * current->nsproxy->net_ns, use init_net instead.
> + * This also avoid changing sock's netns from previous
> + * creator's netns to init_net when sock is re-created
> + * by nvme recovery path.
> + */
Kernel comment style is
/*
* ....
*/
> + ret = sock_create_kern(&init_net,
> ctrl->addr.ss_family, SOCK_STREAM,
> IPPROTO_TCP, &queue->sock);
This can be realigned:
ret = sock_create_kern(&init_net, ctrl->addr.ss_family, SOCK_STREAM,
IPPROTO_TCP, &queue->sock);
Powered by blists - more mailing lists