> I think you might like to read the following documents: > http://kernelnewbies.org/documents/kdoc/kernel-locking/lklockingguide.html > http://lwn.net/Articles/21064/
Right, I gave'em a glance, peeked at some real code in kernel and found that: tasklet locking is not done as suggested by the doc. in sw_demux, locking is based on hardware interrput spin_lock_irq(), instead of tasklet spin_lock_bh(). Locking on hard irq is not correct, because hard irq doesn't access any sw_demux data. data is accessed outside of hard irq, later in tasklet. I *GUESS/COMMENTS_PLEASE* vpeirq() only reads (doesnt write) sw_demux structure, so it can call sw_demux_packets_whatever with read-only lock request: read_lock(demux) while ioctl, while updating sw_demux should request write-lock with write_lock_bh(demux) Emard -- Info: To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as subject.
