]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
block: reject invalid operation in submit_bio_noacct
authorChristoph Hellwig <hch@lst.de>
Fri, 15 Aug 2025 22:07:58 +0000 (18:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:40 +0000 (16:28 +0200)
commit6c77d4e0f6ad48c6739d103eb1d31c199b001029
tree3b199ecc8397b2945b29cf67527ef5d9488962a0
parent3bbd52a413fc6f668cb7380aaff9947edb90e1c5
block: reject invalid operation in submit_bio_noacct

[ Upstream commit 1c042f8d4bc342b7985b1de3d76836f1a1083b65 ]

submit_bio_noacct allows completely invalid operations, or operations
that are not supported in the bio path.  Extent the existing switch
statement to rejcect all invalid types.

Move the code point for REQ_OP_ZONE_APPEND so that it's not right in the
middle of the zone management operations and the switch statement can
follow the numerical order of the operations.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20231221070538.1112446-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Stable-dep-of: 3f66ccbaaef3 ("block: Make REQ_OP_ZONE_FINISH a write operation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-core.c
include/linux/blk_types.h