dm delay: fix a crash when invalid device is specified
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 25 Apr 2019 16:07:54 +0000 (12:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 May 2019 16:26:54 +0000 (18:26 +0200)
commit1f4195f9e78f452cf042844bc5a14174347185a9
treeea6451fbfd94dabb751ea2eaa3d87687448d5934
parentd0a3f25d63855d37d453ca009483aeae08b1c1dc
dm delay: fix a crash when invalid device is specified

commit 81bc6d150ace6250503b825d9d0c10f7bbd24095 upstream.

When the target line contains an invalid device, delay_ctr() will call
delay_dtr() with NULL workqueue.  Attempting to destroy the NULL
workqueue causes a crash.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-delay.c