]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: fix possible tid_t sequence overflows
authorLuis Henriques (SUSE) <luis.henriques@linux.dev>
Wed, 29 May 2024 09:20:30 +0000 (10:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2024 09:11:37 +0000 (11:11 +0200)
commit3236afd1a2fa35c60a9b3a2bcf23b6699f909387
treeb325e9aa2934bcd76281a758895df08c77138742
parent077c7e5fee4b4b3fea29fd3a951a6b01f2802d9e
ext4: fix possible tid_t sequence overflows

[ Upstream commit 63469662cc45d41705f14b4648481d5d29cf5999 ]

In the fast commit code there are a few places where tid_t variables are
being compared without taking into account the fact that these sequence
numbers may wrap.  Fix this issue by using the helper functions tid_gt()
and tid_geq().

Signed-off-by: Luis Henriques (SUSE) <luis.henriques@linux.dev>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Link: https://patch.msgid.link/20240529092030.9557-3-luis.henriques@linux.dev
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/fast_commit.c