On Wed, Feb 08, 2023 at 03:38:40PM +0800, Ming Lei wrote: > > This now can cause a case where disk_release is called on a disk > > that hasn't been added. That's mostly harmless, except for a case > > in blk_throttl_exit that now needs to check for a NULL ->td pointer. > > With this way, blkcg_init_disk() could be called before q->root_blkg > is released in disk unbind & rebind use case, then memory leak? q->root_blkg is now disk->root_blkg. So in an unind and rebind case a different disk will be involved.