]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs: fix repair deadlock due to failed inode flushes.
authorDave Chinner <dchinner@redhat.com>
Thu, 28 Mar 2019 23:04:51 +0000 (18:04 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 28 Mar 2019 23:04:51 +0000 (18:04 -0500)
commit6570dc5d6d21315220f3a3652c344b9bf516ae7e
treeecf730bea667b6cb15890055ac165fa18f3d642a
parent7c3bcec76694e7e9742448bfd9424d55c692deb0
libxfs: fix repair deadlock due to failed inode flushes.

If inode_item_done() fails to flush an inode after we've grabbed a
reference to the underlying buffer during a transaction commit, we
fail to put the buffer and hence leak it. We then deadlock on the
next lookup ofthe inode buffer as it is still locked and no-one owns
it.

To fix it, put the buffer on error so that it gets unlocked and
can be recovered appropriately in a later phase of repair.

Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Fixes: d15188a1ec14 ("xfs: rework the inline directory verifiers")
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/trans.c