This repository has been archived by the owner on May 2, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iomap: fix a use after free in iomap_dio_rw
[ Upstream commit 4ea899e ] Introduce a local wait_for_completion variable to avoid an access to the potentially freed dio struture after dropping the last reference count. Also use the chance to document the completion behavior to make the refcounting clear to the reader of the code. Fixes: ff6a929 ("iomap: implement direct I/O") Reported-by: Chandan Rajendra <[email protected]> Reported-by: Darrick J. Wong <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Tested-by: Chandan Rajendra <[email protected]> Tested-by: Darrick J. Wong <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
- Loading branch information