lkml.org 
[lkml]   [2004]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectSignal 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/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.021 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site