]> asedeno.scripts.mit.edu Git - linux.git/commit
xfs: fix transaction leak on remote attr set/remove failure
authorBrian Foster <bfoster@redhat.com>
Tue, 24 Jul 2018 20:43:08 +0000 (13:43 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 26 Jul 2018 17:15:12 +0000 (10:15 -0700)
commitdcbd44f79986e55691600b969c14db004d741883
tree32b8b60d85893bf71e87ea52bfcd10b559aa1bcb
parenta61acc3c78df14bb9b7bfefb2cc771fcda15b8fe
xfs: fix transaction leak on remote attr set/remove failure

The xattr remote value set/remove handlers both clear args.trans in
the error path without having cancelled the transaction. This leaks
the transaction, causes warnings around returning to userspace with
locks held and leads to system lockups or other general problems.

The higher level xfs_attr_[set|remove]() functions already detect
and cancel args.trans when set in the error path. Drop the NULL
assignments from the rmtval handlers and allow the callers to clean
up the transaction correctly.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_attr_remote.c