Hi, 2012/10/9 Thomas Gleixner <tglx@xxxxxxxxxxxxx>: > > __tty_buffer_flush() can call tty_buffer_free() which in turn can call > kfree(), which is a nono on RT with preemption and interrupts > disabled. Enabling CONFIG_DEBUG_ATOMIC_SLEEP and extensive testing > should have told you that. > > I did not look at the other places where this lock is used, but I > suspect there is more fallout lurking. > > Thanks, > > tglx OK, this is a big lesson for me to start using the Kernel Hacking options more in the future, and especially before sending patches to the mailing list... Sorry for bothering you with a patch that I could find out myself was incorrect. After your remarks, I had some more discussion & reviews with a colleague of mine. And we finally came to the point where we figured out that this patch actually tries to solve an issue that is not there at all... All RX flip buffer handling is initiated from the threaded IRQ handling: filling the buffer, pushing the buffer and in case of the low_latency handling (always enabled for PREEMP_RT) also the copying of the buffer to the line discipline. Therefore the spin lock was only locked/unlocked by the RX irq thread during "normal" read operation. So I skrewed up: I thought I had seen measurements that this patch improved performance, but after reverting this changeset and redoing the measurements it proves it has no performance impact at all. I'll abandon this patch Thank you very much for reviewing Regards, Ivo Sieben -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html