Re: [PATCH] add device node locking possibility to dvbcore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/11/07, Trent Piepho <xyzzy@xxxxxxxxxxxxx> wrote:
> On Thu, 9 Aug 2007, Markus Rechberger wrote:
> > On 8/9/07, Markus Rechberger <mrechberger@xxxxxxxxx> wrote:
> > > On 8/9/07, Steven Toth <stoth@xxxxxxxxxxxxx> wrote:
> > > > Markus Rechberger wrote:
> > > > > Following patch adds a rather primitive way to temporary lock dvb
> > > > > devicenodes, this can be useful for hybrid devices which use the
> > > > > video4linux framework for the analogue TV part and the dvb framework
> for
> > > > > digital TV if only one mode can be accessed at a time.
> > > > >
> > >
> >
> > I  want to allow a user to use one mode at a time, so either DVB or V4L.
> > The device requires a different firmware for V4L and DVB also
> > different GPIO values and some special register writes.
>
> This code looks like it's full of race conditions.  How do you prevent the
> dvb
> code and the v4l code from accessing the lock field at the same time?  For
> example, in your em28xx code, what happens if the dvb devices is opened
> after
> the call to ->get_status on line 230 and before the call to ->dvb_lock on
> line
> 234?
>

Well it's a primitive lock, a lock could be added for atomical
operations. Even though I do not expect that any user would be able to
trigger a race condition there.

> Why do you need to add locks to the frontend, dvr, demux, and net devices?
> Is
> it necessary to lock anything besides the frontend?
>

I intended to lock the whole DTV part, it doesn't work if ATV is used.

> Some devices, like the demux device, are multiple open.  How do you know
> when
> to lock and unlock them?
>

by checking the usercounters when someone tries to open the ATV devicenodes.

Markus

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux