Re: [BUG] fs: f2fs: Possible null-pointer dereferences in update_general_status()

From: Jia-Ju Bai
Date: Thu Jul 25 2019 - 23:39:09 EST




On 2019/7/26 11:19, Chao Yu wrote:
Hi Jiaju,

Thanks for the report, I checked the code, and found it doesn't need to check
SM_I(sbi) pointer, this is because in fill_super() and put_super(), we will call
f2fs_destroy_stats() in prior to f2fs_destroy_segment_manager(), so if current
sbi can still be visited in global stat list, SM_I(sbi) should be released yet.
So anyway, let's remove unneeded check in line 70/78. :)

Okay, I will send a patch to remove unneeded checks.


Best wishes,
Jia-Ju Bai