mbox series

[0/2] btrfs: fix error paths of btrfs_orphan_cleanup()

Message ID cover.1688403622.git.fdmanana@suse.com (mailing list archive)
Headers show
Series btrfs: fix error paths of btrfs_orphan_cleanup() | expand

Message

Filipe Manana July 3, 2023, 5:15 p.m. UTC
From: Filipe Manana <fdmanana@suse.com>

These fix two issues with error paths of btrfs_orphan_cleanup(), a double
iput() on an inode and an iput() against a ERR_PTR(-ENOENT) inode pointer,
resulting in a crash. More details on the changelogs.

Filipe Manana (2):
  btrfs: fix double iput() on inode after an error during orphan cleanup
  btrfs: fix iput() on error pointer after error during orphan cleanup

 fs/btrfs/inode.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

Comments

David Sterba July 11, 2023, 7:59 p.m. UTC | #1
On Mon, Jul 03, 2023 at 06:15:29PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> These fix two issues with error paths of btrfs_orphan_cleanup(), a double
> iput() on an inode and an iput() against a ERR_PTR(-ENOENT) inode pointer,
> resulting in a crash. More details on the changelogs.
> 
> Filipe Manana (2):
>   btrfs: fix double iput() on inode after an error during orphan cleanup
>   btrfs: fix iput() on error pointer after error during orphan cleanup

Added to misc-next, thanks.