Re: [PATCH] Btrfs: add a check of whether fs_info->fs_root is NULL in btrfs_async_reclaim_metadata_space()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 21, 2015 at 04:20:00PM +0900, Tsutomu Itoh wrote:
> Kernel panic occurred due to NULL pointer reference in can_overcommit().
> Because btrfs_async_reclaim_metadata_space() passed NULL pointer to
> btrfs_calc_reclaim_metadata_size().

> fs_info->fs_root is referred in btrfs_async_reclaim_metadata_space()
> when mount kicked kworker(btrfs_async_reclaim_metadata_space).
> 
> But at this time, fs_info->fs_root had not been initialized yet,
> so NULL pointer passed to btrfs_calc_reclaim_metadata_size().

I don't think it's the right fix, the initialization sequence should
take care of such situations. The fs_tree must exist at the time we
reach the point where it crashed, the code expects it.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux