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

2017-11-07 Thread Jens Axboe
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 t

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

2017-11-07 Thread Tejun Heo
On Tue, Nov 07, 2017 at 11:09:50AM -0800, 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

[PATCH V2] kthread: zero the kthread data structure

2017-11-07 Thread Shaohua Li
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 soun