mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
xfs: fix null pointer dereference in tracepoint
If dfp is not NULL we exit early here, when dfp is NULL it's allocated
in xfs_defer_alloc() but not assigned. The tracepoint tries to
dereference members of dfp struct.
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
Cc: stable@vger.kernel.org # v6.8
Fixes: 3f3cec0310 ("xfs: force small EFIs for reaping btree extents")
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
committed by
Carlos Maiolino
parent
f88caa121e
commit
9202ee546b
@@ -878,7 +878,7 @@ xfs_defer_add_barrier(
|
||||
if (dfp)
|
||||
return;
|
||||
|
||||
xfs_defer_alloc(&tp->t_dfops, &xfs_barrier_defer_type);
|
||||
dfp = xfs_defer_alloc(&tp->t_dfops, &xfs_barrier_defer_type);
|
||||
|
||||
trace_xfs_defer_add_item(tp->t_mountp, dfp, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user