mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
dm delay: fix a crash when invalid device is specified
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 <[email protected]> Cc: [email protected] Signed-off-by: Mike Snitzer <[email protected]>
This commit is contained in:
parent
514cf4f881
commit
81bc6d150a
1 changed files with 2 additions and 1 deletions
|
|
@ -121,7 +121,8 @@ static void delay_dtr(struct dm_target *ti)
|
|||
{
|
||||
struct delay_c *dc = ti->private;
|
||||
|
||||
destroy_workqueue(dc->kdelayd_wq);
|
||||
if (dc->kdelayd_wq)
|
||||
destroy_workqueue(dc->kdelayd_wq);
|
||||
|
||||
if (dc->read.dev)
|
||||
dm_put_device(ti, dc->read.dev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue