Re: [PATCH] dm crypt: fix crash on exit

2016-09-22 Thread Mikulas Patocka
Reviewed-by: Mikulas Patocka On Wed, 21 Sep 2016, Rabin Vincent wrote: > From: Rabin Vincent > > As the documentation for kthread_stop() says, "if threadfn() may call > do_exit() itself, the caller must ensure task_struct can't go away". > dm-crypt does not ensure this and therefore crashes w

[PATCH] dm crypt: fix crash on exit

2016-09-21 Thread Rabin Vincent
From: Rabin Vincent As the documentation for kthread_stop() says, "if threadfn() may call do_exit() itself, the caller must ensure task_struct can't go away". dm-crypt does not ensure this and therefore crashes when crypt_dtr() calls kthread_stop(). The crash is trivially reproducible by adding