linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] [media] xc5000: use after free in release()
@ 2014-09-25 11:40 Dan Carpenter
  2014-09-25 14:00 ` Shuah Khan
  2014-10-15 13:40 ` Dan Carpenter
  0 siblings, 2 replies; 5+ messages in thread
From: Dan Carpenter @ 2014-09-25 11:40 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Shuah Khan
  Cc: Fabian Frederick, linux-media, kernel-janitors

I moved the call to hybrid_tuner_release_state(priv) after
"priv->firmware" dereference.

Fixes: 5264a522a597 ('[media] media: tuner xc5000 - release firmwware from xc5000_release()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/media/tuners/xc5000.c b/drivers/media/tuners/xc5000.c
index e44c8ab..803a0e6 100644
--- a/drivers/media/tuners/xc5000.c
+++ b/drivers/media/tuners/xc5000.c
@@ -1333,9 +1333,9 @@ static int xc5000_release(struct dvb_frontend *fe)
 
 	if (priv) {
 		cancel_delayed_work(&priv->timer_sleep);
-		hybrid_tuner_release_state(priv);
 		if (priv->firmware)
 			release_firmware(priv->firmware);
+		hybrid_tuner_release_state(priv);
 	}
 
 	mutex_unlock(&xc5000_list_mutex);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-15 16:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-25 11:40 [patch] [media] xc5000: use after free in release() Dan Carpenter
2014-09-25 14:00 ` Shuah Khan
2014-10-15 13:40 ` Dan Carpenter
2014-10-15 15:12   ` Shuah Khan
2014-10-15 16:15     ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).