diff options
author | Brian Foster <bfoster@redhat.com> | 2019-04-12 16:39:19 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-04-15 03:15:56 +0200 |
commit | 4d09807f20462d6edf04f6e98d3d47bcdf7a5e2f (patch) | |
tree | a9cc42a695f26db2fee2fa03fe1749bacd5cefb8 /fs/xfs/xfs_log_cil.c | |
parent | Linux 5.1-rc5 (diff) | |
download | linux-4d09807f20462d6edf04f6e98d3d47bcdf7a5e2f.tar.xz linux-4d09807f20462d6edf04f6e98d3d47bcdf7a5e2f.zip |
xfs: fix use after free in buf log item unlock assert
The xfs_buf_log_item ->iop_unlock() callback asserts that the buffer
is unlocked when either non-stale or aborted. This assert occurs
after the bli refcount has been dropped and the log item potentially
freed. The aborted check is thus a potential use after free. This
problem has been reproduced with KASAN enabled via generic/475.
Fix up xfs_buf_item_unlock() to query aborted state before the bli
reference is dropped to prevent a potential use after free.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_log_cil.c')
0 files changed, 0 insertions, 0 deletions