Emard wrote:
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.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.