]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
io_uring: fix off-by-one in BUILD_BUG_ON check of __REQ_F_LAST_BIT
authorHao Xu <haoxu@linux.alibaba.com>
Tue, 7 Sep 2021 03:22:43 +0000 (11:22 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 5 Nov 2021 09:20:04 +0000 (10:20 +0100)
commite7e805b1afaa53c4f4b9e2b8c83481db3f52a63d
treecd8c68048f9f17dcc57e8651be4de77d0676f6b5
parent60cb0a85d8f38751825cfed8b5655d08327801f9
io_uring: fix off-by-one in BUILD_BUG_ON check of __REQ_F_LAST_BIT

BugLink: https://bugs.launchpad.net/bugs/1949397
[ Upstream commit 32c2d33e0b7c4ea53284d5d9435dd022b582c8cf ]

Build check of __REQ_F_LAST_BIT should be larger than, not equal or larger
than. It's perfectly valid to have __REQ_F_LAST_BIT be 32, as that means
that the last valid bit is 31 which does fit in the type.

Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
Link: https://lore.kernel.org/r/20210907032243.114190-1-haoxu@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
fs/io_uring.c