Commit:     13fdc9a74df0fec70f421c6891e184ed8c3b9088
Parent:     da7de31cc50796a53593785d4508b7b7ffa9a9b2
Author:     Ursula Braun <[EMAIL PROTECTED]>
AuthorDate: Sat Jul 14 19:03:41 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Sat Jul 14 19:03:41 2007 -0700

    [AF_IUCV]: Avoid deadlock between iucv_path_connect and tasklet.
    An iucv deadlock may occur, where one CPU is spinning on the
    iucv_table_lock for iucv_tasklet_fn(), while another CPU is holding
    the iucv_table_lock for an iucv_path_connect() and is waiting for
    the first CPU in an smp_call_function.
    Solution: replace spin_lock in iucv_tasklet_fn by spin_trylock and
    reschedule tasklet in case of non-granted lock.
    Signed-off-by: Ursula Braun <[EMAIL PROTECTED]>
    Acked-by: Frank Pavlic <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/iucv/iucv.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index b733306..ad5150b 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -1494,7 +1494,10 @@ static void iucv_tasklet_fn(unsigned long ignored)
        struct iucv_irq_list *p, *n;
        /* Serialize tasklet, iucv_path_sever and iucv_path_connect. */
-       spin_lock(&iucv_table_lock);
+       if (!spin_trylock(&iucv_table_lock)) {
+               tasklet_schedule(&iucv_tasklet);
+               return;
+       }
        iucv_active_cpu = smp_processor_id();
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to