]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
jfs: add sanity check for agwidth in dbMount
authorEdward Adam Davis <eadavis@qq.com>
Thu, 20 Feb 2025 11:24:19 +0000 (19:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:15 +0000 (10:45 +0200)
commitcc0bc4cb62ce5fa0c383e3bf0765d01f46bd49ac
treea1378f91162c4b9c8e0038cd07f8b65198407bb9
parentb3c4884b987e5d8d0ec061a4d52653c4f4b9c37e
jfs: add sanity check for agwidth in dbMount

[ Upstream commit ddf2846f22e8575d6b4b6a66f2100f168b8cd73d ]

The width in dmapctl of the AG is zero, it trigger a divide error when
calculating the control page level in dbAllocAG.

To avoid this issue, add a check for agwidth in dbAllocAG.

Reported-and-tested-by: syzbot+7c808908291a569281a9@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=7c808908291a569281a9
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/jfs/jfs_dmap.c