Re: [PATCH V2] kthread: zero the kthread data structure

From: Jens Axboe
Date: Tue Nov 07 2017 - 14:45:46 EST


On 11/07/2017 12:09 PM, Shaohua Li wrote:
> kthread() could bail out early before we initialize blkcg_css (if the
> kthread is killed very early. Please see xchg() statement in kthread()),
> which confuses free_kthread_struct. Instead of moving the blkcg_css
> initialization early, we simply zero the whole 'self' data structure,
> which doesn't sound much overhead.

Applied, thanks Shaohua.

--
Jens Axboe