From: Andreas Oberritter Date: Thu, 4 Aug 2011 15:33:13 +0000 (-0300) Subject: [media] DVB: dvb_frontend: avoid possible race condition on first event X-Git-Tag: next-20110927~67^2~4^2~169 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5c9f480bdb584944b5af390ccdd8c3e586bdafdb;p=karo-tx-linux.git [media] DVB: dvb_frontend: avoid possible race condition on first event enqueued before the frontend thread wakes up. Signed-off-by: Andreas Oberritter Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 23d79d0f25ee..45ea843d93de 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -1891,8 +1891,8 @@ static int dvb_frontend_ioctl_legacy(struct file *file, /* Request the search algorithm to search */ fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; - dvb_frontend_wakeup(fe); dvb_frontend_add_event(fe, 0); + dvb_frontend_wakeup(fe); fepriv->status = 0; err = 0; break;