ublk: add missing DEL_DEV_ASYNC to unprivileged permission check
Subsystems (3)
PATCH 1/1 ublk: add missing DEL_DEV_ASYNC to unprivileged permission check
ublk_ctrl_uring_cmd_permission() is missing the UBLK_CMD_DEL_DEV_ASYNC case, causing the command to always return -EINVAL for unprivileged ublk devices. Fix it by adding the missing case.
--- drivers/block/ublk_drv.c | 1 + 1 file changed, 1 insertion(+)
drivers/block/ublk_drv.c +1 -0
@@ -5716,6 +5716,7 @@ static int ublk_ctrl_uring_cmd_permission(struct ublk_device *ub,case UBLK_CMD_STOP_DEV :case UBLK_CMD_ADD_DEV :case UBLK_CMD_DEL_DEV : +case UBLK_CMD_DEL_DEV_ASYNC :case UBLK_CMD_SET_PARAMS :case UBLK_CMD_START_USER_RECOVERY :case UBLK_CMD_END_USER_RECOVERY :
Signature · 1 line
2.43.0
Quoted 17 lines · Yitang Yang
ublk_ctrl_uring_cmd_permission()is missing theUBLK_CMD_DEL_DEV_ASYNCcase, causing the command to always return-EINVALfor unprivileged ublk devices. Fix it by adding the missing case.Fixes 13fe8e6825e4 ("ublk: add UBLK_CMD_DEL_DEV_ASYNC")Signed-off-by Yitang Yang <[email protected]>--- drivers/block/ublk_drv.c | 1 + 1 file changed, 1 insertion(+)drivers/block/ublk_drv.c +0
-0
drivers/block/ublk_drv.c static int ublk_ctrl_uring_cmd_permission(struct ublk_device *ub, · line 5722
Quoted 7 lines
drivers/block/ublk_drv.c +1
-0@@ -5716,6 +5716,7 @@ static int ublk_ctrl_uring_cmd_permission(struct ublk_device *ub,case UBLK_CMD_STOP_DEV :case UBLK_CMD_ADD_DEV :case UBLK_CMD_DEL_DEV : +case UBLK_CMD_DEL_DEV_ASYNC :case UBLK_CMD_SET_PARAMS :case UBLK_CMD_START_USER_RECOVERY :case UBLK_CMD_END_USER_RECOVERY :
Thanks,
Ming Lei
Quoted 3 lines · Yitang Yang
ublk_ctrl_uring_cmd_permission()is missing theUBLK_CMD_DEL_DEV_ASYNCcase, causing the command to always return-EINVALfor unprivileged ublk devices. Fix it by adding the missing case.
Applied, thanks!
[1/1] ublk: add missing DEL_DEV_ASYNC to unprivileged permission check
commit: e6ac1da6a53c5f670bf09e60a2500d15be68d2fc
Best regards,
Signature · 1 line
Jens Axboe