Brian Foster 4d09807f20 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>
2019-04-14 18:15:56 -07:00
..
2019-03-17 09:10:56 -07:00
2019-03-28 08:54:20 -07:00
2019-04-11 14:19:02 -07:00
2019-03-09 10:54:24 -08:00
\n
2019-03-07 09:01:33 -08:00
2019-03-15 13:42:53 -07:00
2018-11-30 14:56:14 -08:00
2018-08-17 16:20:28 -07:00
2018-09-29 22:47:48 -04:00
2018-10-29 14:29:58 -07:00
2019-03-01 17:24:48 -08:00
2019-03-07 18:32:01 -08:00
2019-03-08 14:48:40 -08:00
2019-03-18 10:44:48 -06:00
2019-01-30 17:44:07 -05:00
2019-02-07 16:38:35 +01:00