On 12/9/21 1:55 PM, Xiao Ni wrote:
Now it alloc acct bioset in md_run and only raid0/raid5 need acct bioset. For example, it doesn't create acct bioset when creating raid1. Then reshape from raid1 to raid0/raid5, it will access acct bioset after reshaping. It can panic because of NULL pointer reference.
Thanks, I think the previous commit didn't think of the reshape scenario. Could you paste the relevant info into commit header?
We can move alloc/free jobs to personality. pers->run alloc acct bioset and pers->clean free it.
In the reshape case, the caller of pers->run is level_store, so. Acked-by: Guoqing Jiang <guoqing.jiang@xxxxxxxxx> Thanks, Guoqing