diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-23 15:41:17 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-23 22:10:54 +0300 |
commit | 8a26a258bdb82db241cdc35f332f88dd67bdb9c9 (patch) | |
tree | ad61d35b481f8f1fdeda923b683921ec47e51029 /drivers/media/dvb-core | |
parent | 99a85b901eb54f62ff0c3fd6eb56e60b7b9f15c8 (diff) | |
download | linux-8a26a258bdb82db241cdc35f332f88dd67bdb9c9.tar.xz |
[media] dvb core: only start media entity if not NULL
The logic there tries to start the media entity even if it
doesn't exist, causing this bug:
[ 314.356162] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
[ 314.356202] IP: [<ffffffffa02ef74c>] media_entity_pipeline_start+0x1c/0x390 [media]
Reported-by: Gert-Jan van der Stroom <gjstroom@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-core')
-rw-r--r-- | drivers/media/dvb-core/dvb_frontend.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index aa5306908193..79d2fac5075c 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -712,7 +712,7 @@ static int dvb_frontend_thread(void *data) /* FIXME: return an error if it fails */ dev_info(fe->dvb->device, "proceeding with FE task\n"); - } else { + } else if (fepriv->pipe_start_entity) { ret = media_entity_pipeline_start(fepriv->pipe_start_entity, &fepriv->pipe); if (ret) @@ -830,7 +830,8 @@ restart: } #ifdef CONFIG_MEDIA_CONTROLLER_DVB - media_entity_pipeline_stop(fepriv->pipe_start_entity); + if (fepriv->pipe_start_entity) + media_entity_pipeline_stop(fepriv->pipe_start_entity); fepriv->pipe_start_entity = NULL; #endif |