Messages in this thread | | | Date | Thu, 18 Nov 2004 09:21:04 -0500 (EST) | From | linux-os <> | Subject | Signal handler deadlock |
| |
Hello,
If I have a MUTEX in a driver and the driver can also be called from a signal handler, will the MUTEX deadlock when the signal handler calls the driver?
Code --->----> driver-->MUTEX-taken-->***SIGNAL***
Signal handler --->driver--->MUTEX-waiting (will it deadlock?)
I use 'down()' and 'up()' in the driver. With Linux-2.4.22 the code does not deadlock. With Linux-2.6.9, it does.
Is this the expected behavior? FYI I wrote the driver, not the dumb code that calls it from a signal handler. I would never have called anything by printf() from such a handler, so don't preach to the choir. I just need to know if it should work, before I tell somebody to rewrite some code.
Cheers, Dick Johnson Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips). Notice : All mail here is now cached for review by John Ashcroft. 98.36% of all statistics are fiction. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |