Mailing List archive

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

[linux-dvb] Re: [PATCH] support for multiple feeds per pid



Emard wrote:
I mean race condition of vpeirq() using sw_demux while other
process updates the list... aiieee?
Do you see an obvious lock that's not hold while processing a list?

No, but lock is problem in itself. If ioctl locks the sw_demux, wanting
to update something, during that very moment, vpeirq wants to use sw_demux it will find it locked and would be forced to sleep but as tasklets can't
sleep that would lead to oops schedule() in interrupt i guess.

Maybe I'm too cautious, or don't know the completeness of the source
that's something Ralph was talking about regarding stability issues.
you must not use semaphores but spinlocks for locking data accessed from irq handlers. Places where lists are altered have to use irq safe spinlocks, which switch off interrupts while the lists are modified.

All the other code can use readonly spinlocks. In any case you want to keep this locking as fine-grained as possible.

Holger



--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index