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:23:39 +0000 (18:23 +0200)
commit3b92ff729cb35d1421bfeacbd3a9ebcab6b3e71d
tree25dd794eb639374947f89726026876983672b4b0
parent90cc71127a3c5d9254da78e691ca76c68fa42748
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