diff mbox series

[-next,1/2] nbd: allow genl access outside init_net

Message ID 20230224021301.1630703-1-kuba@kernel.org (mailing list archive)
State New, archived
Headers show
Series [-next,1/2] nbd: allow genl access outside init_net | expand

Commit Message

Jakub Kicinski Feb. 24, 2023, 2:13 a.m. UTC
NBD doesn't have much to do with networking, allow users outside
init_net to access the family.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 drivers/block/nbd.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Chaitanya Kulkarni March 2, 2023, 6:29 p.m. UTC | #1
On 2/23/23 18:13, Jakub Kicinski wrote:
> NBD doesn't have much to do with networking, allow users outside
> init_net to access the family.
> 
> Reviewed-by: Josef Bacik <josef@toxicpanda.com>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck
Jens Axboe March 8, 2023, 2:36 p.m. UTC | #2
On Thu, 23 Feb 2023 18:13:00 -0800, Jakub Kicinski wrote:
> NBD doesn't have much to do with networking, allow users outside
> init_net to access the family.
> 
> 

Applied, thanks!

[1/2] nbd: allow genl access outside init_net
      commit: 6a650ef04718aff580d6b352c38ca839991fd3ae
[2/2] nbd: use the structured req attr check
      commit: d09b3a9ff6c6ef74298e19b22b362bc0a6e4e9dd

Best regards,
diff mbox series

Patch

diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 592cfa8b765a..53e4bb754fd9 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -2325,6 +2325,7 @@  static struct genl_family nbd_genl_family __ro_after_init = {
 	.n_small_ops	= ARRAY_SIZE(nbd_connect_genl_ops),
 	.resv_start_op	= NBD_CMD_STATUS + 1,
 	.maxattr	= NBD_ATTR_MAX,
+	.netnsok	= 1,
 	.policy = nbd_attr_policy,
 	.mcgrps		= nbd_mcast_grps,
 	.n_mcgrps	= ARRAY_SIZE(nbd_mcast_grps),