Re: [PATCH] jfs: fix uaf in jfs_syncpt

From: Matthew Wilcox
Date: Mon Feb 19 2024 - 23:07:28 EST


On Tue, Feb 20, 2024 at 11:55:18AM +0800, Edward Adam Davis wrote:
> During the execution of the jfs lazy commit, the jfs file system was unmounted,
> causing the sbi and jfs log objects to be released, triggering this issue.
> The solution is to add mutex to synchronize jfs lazy commit and jfs unmount
> operations.

Why is that the solution? LAZY_LOCK with IN_LAZYCOMMIT is supposed to
cover this. Please be more verbose in your commit messages. Describe
what is going wrong and why; that will allow people to understand why
this is the correct solution to the problem.