diff options
author | Shaohua Li <shli@fb.com> | 2017-11-07 20:09:50 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-11-11 03:53:25 +0100 |
commit | e10237cc76ef9a4066a84aa2cc710bfd708cc341 (patch) | |
tree | 6e096297e263119d7c6b80f7e8ff538827e04e3f /block | |
parent | nvmet: fix comment typos in admin-cmd.c (diff) | |
download | linux-e10237cc76ef9a4066a84aa2cc710bfd708cc341.tar.xz linux-e10237cc76ef9a4066a84aa2cc710bfd708cc341.zip |
kthread: zero the kthread data structure
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.
Reported-by: syzbot <syzkaller@googlegroups.com>
Fixes: 05e3db95ebfc ("kthread: add a mechanism to store cgroup info")
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions