diff options
author | Ernst Martin Witte <emw-linux-kernel@nocabal.de> | 2016-01-09 18:18:43 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-02-01 09:41:38 -0200 |
commit | 01d1d714e26624bc50ba95c49cf6e15bb215c150 (patch) | |
tree | 3284fad1a1149b814a51afd90a05dba0d1b1af2f | |
parent | 4bdcaa054e1c73697b390c32c434d96836121306 (diff) | |
download | op-kernel-dev-01d1d714e26624bc50ba95c49cf6e15bb215c150.zip op-kernel-dev-01d1d714e26624bc50ba95c49cf6e15bb215c150.tar.gz |
[media] si2157: cancel_delayed_work_sync before device removal / kfree
si2157_remove was calling kfree(dev) with possibly still active
schedule_delayed_work(dev->stat_work). This caused kernel panics in
call_timer_fn e.g. after rmmod cx23885.
Signed-off-by: Ernst Martin Witte <emw-linux-kernel@nocabal.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/tuners/si2157.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c index 5da5b42..3450dfb 100644 --- a/drivers/media/tuners/si2157.c +++ b/drivers/media/tuners/si2157.c @@ -458,6 +458,9 @@ static int si2157_remove(struct i2c_client *client) dev_dbg(&client->dev, "\n"); + /* stop statistics polling */ + cancel_delayed_work_sync(&dev->stat_work); + memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops)); fe->tuner_priv = NULL; kfree(dev); |