Re: [PATCH v5 2/8] nbd: disallow NBD_SET_SOCK on an active device

"yu kuai" <[email protected]> Sun, 2 Aug 2026 19:27:51 +0800
Newsgroups org.kernel.vger.linux-block
Message-ID <[email protected]>
=E5=9C=A8 2026/7/30 16:20, Yang Erkun =E5=86=99=E9=81=93:

> We cannot add a socket to an already running nbd device, the reconfigure
> for netlink can only active an inactive socket. But for ioctl path, we ca=
n
> call NBD_SET_SOCK after NBD_DO_IT, reject this using nbd->pid which has
> been setted when NBD_DO_IT. Besides, it is the root cause for commit
> b98e762e3d71 ("nbd: freeze the queue while we're adding connections").
>
> Signed-off-by: Yang Erkun<[email protected]>
> ---
>   drivers/block/nbd.c | 7 +++++++
>   1 file changed, 7 insertions(+)
Reviewed-by: Yu Kuai <[email protected]>

--=20
Thanks,
Kuai