ublk: fix error code for unsupported command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ming Lei <ming.lei@xxxxxxxxxx>

commit 34c1227035b3ab930a1ae6ab6f22fec1af8ab09e upstream.

ENOTSUPP is for kernel use only, and shouldn't be sent to userspace.

Fix it by replacing it with EOPNOTSUPP.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: bfbcef036396 ("ublk_drv: move ublk_get_device_from_id into ublk_ctrl_uring_cmd")
Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20241119030646.2319030-1-ming.lei@xxxxxxxxxx
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/block/ublk_drv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -2975,7 +2975,7 @@ static int ublk_ctrl_uring_cmd(struct io
 		ret = ublk_ctrl_end_recovery(ub, cmd);
 		break;
 	default:
-		ret = -ENOTSUPP;
+		ret = -EOPNOTSUPP;
 		break;
 	}
 


Patches currently in stable-queue which might be from ming.lei@xxxxxxxxxx are

queue-6.11/block-fix-ordering-between-checking-queue_flag_quiesced-request-adding.patch
queue-6.11/block-fix-missing-dispatching-request-when-queue-is-started-or-unquiesced.patch
queue-6.11/block-fix-ordering-between-checking-blk_mq_s_stopped-request-adding.patch
queue-6.11/ublk-fix-error-code-for-unsupported-command.patch
queue-6.11/ublk-fix-ublk_ch_mmap-for-64k-page-size.patch
queue-6.11/blk-mq-make-blk_mq_quiesce_tagset-hold-the-tag-list-mutex-less-long.patch
queue-6.11/loop-fix-type-of-block-size.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux