Files
linux/fs
Filipe Manana 2dcf838cf5 btrfs: fix invalid inode pointer dereferences during log replay
In a few places where we call read_one_inode(), if we get a NULL pointer
we end up jumping into an error path, or fallthrough in case of
__add_inode_ref(), where we then do something like this:

   iput(&inode->vfs_inode);

which results in an invalid inode pointer that triggers an invalid memory
access, resulting in a crash.

Fix this by making sure we don't do such dereferences.

Fixes: b4c50cbb01 ("btrfs: return a btrfs_inode from read_one_inode()")
CC: stable@vger.kernel.org # 6.15+
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2025-06-19 15:20:42 +02:00
..
2025-03-25 15:57:58 +01:00
2025-04-04 11:31:42 -07:00
2025-04-24 10:58:59 +02:00
2024-12-03 10:40:36 +01:00
2025-01-27 19:25:45 -05:00
2024-12-09 11:34:29 +01:00
2024-12-17 09:16:11 +01:00
2025-02-21 10:32:47 +01:00
2025-05-09 18:06:27 -04:00
2025-05-09 18:06:27 -04:00
2025-05-09 18:06:27 -04:00
2024-11-03 01:28:07 -05:00
2024-11-03 01:28:06 -05:00
2024-11-03 01:28:06 -05:00