OSDN Git Service

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>
Tue, 11 Jun 2019 10:23:48 +0000 (12:23 +0200)
commitdaea41651d4346a79ceb05312a8ee40fd2318f70
tree7e356c8ffb6d9a87937171b3e750b996ead7ef76
parent566004721c905a64626d221c45725cab5d4586c4
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