linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Linux DVB frontend issue
       [not found] <832879218.6141.1401112530064.JavaMail.root@abilis.com>
@ 2014-05-26 14:17 ` Romain Baeriswyl
  2014-05-26 16:03   ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Romain Baeriswyl @ 2014-05-26 14:17 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Christian Ruppert, Ole Ernst, linux-media

Dear Mauro,

We are using the Linux DVB frontend module on our platform and 
we are facing an issue when having concurrent calls with FE_SET_FRONTEND
and FE_GET_FRONTEND ioctl.

Issue is that both ioctls are using the same dtv_property_cache buffer.
If a FE_SET_FRONTEND ioctl is interrupted by a FE_GET_FRONTEND then the 
dtv_property_cache is overwritten with the result of the FE_GET_FRONTEND. 
When the FE_SET_FRONTEND operation resumes, the dtv_property_cache may
not be accurate anymore.

Did you already face this issue?

Up to now I tried, without success, to think on a fix that does not impact
too much the existing code.

One solution could be to have one cache for reading properties and one other 
cache for writing properties, but this will impact all the drivers below 
the DVB frontend.

Do you see another less impacting solution?

Best regards,

Romain Baeriswyl

Abilis Systems 
3, chemin Pré Fleuri
CH-1228 Plan-Les-Ouates
Geneva





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

* Re: Linux DVB frontend issue
  2014-05-26 14:17 ` Linux DVB frontend issue Romain Baeriswyl
@ 2014-05-26 16:03   ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2014-05-26 16:03 UTC (permalink / raw)
  To: Romain Baeriswyl; +Cc: Christian Ruppert, Ole Ernst, linux-media

Hi Romain,

Em Mon, 26 May 2014 16:17:48 +0200 (CEST)
Romain Baeriswyl <Romain.Baeriswyl@abilis.com> escreveu:

> Dear Mauro,
> 
> We are using the Linux DVB frontend module on our platform and 
> we are facing an issue when having concurrent calls with FE_SET_FRONTEND
> and FE_GET_FRONTEND ioctl.
> 
> Issue is that both ioctls are using the same dtv_property_cache buffer.
> If a FE_SET_FRONTEND ioctl is interrupted by a FE_GET_FRONTEND then the 
> dtv_property_cache is overwritten with the result of the FE_GET_FRONTEND. 
> When the FE_SET_FRONTEND operation resumes, the dtv_property_cache may
> not be accurate anymore.
> 
> Did you already face this issue?

No. Never tried to do it in practice, but I don't think it is even
possible to have two concurrent ioctl calls ATM, because there is a
semaphore at dvb_frontend_ioctl() preventing it.

> Up to now I tried, without success, to think on a fix that does not impact
> too much the existing code.
> 
> One solution could be to have one cache for reading properties and one other 
> cache for writing properties, but this will impact all the drivers below 
> the DVB frontend.
> 
> Do you see another less impacting solution?

Are you sure that the corruption you're seeing is not at userspace
sharing the same buffer for both ioctl's?

> 
> Best regards,
> 
> Romain Baeriswyl
> 
> Abilis Systems 
> 3, chemin Pré Fleuri
> CH-1228 Plan-Les-Ouates
> Geneva
> 
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-05-26 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <832879218.6141.1401112530064.JavaMail.root@abilis.com>
2014-05-26 14:17 ` Linux DVB frontend issue Romain Baeriswyl
2014-05-26 16:03   ` Mauro Carvalho Chehab

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).