Commit:     d0a34f98d1da66a5b4e02171854e6c04c9916016
Parent:     3052246c815fe17ff3a9fcb5601c6688b523e5f5
Author:     Ursula Braun <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 11:26:52 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 06:52:57 2007 -0400

    qeth: ungrouping a device must not be interruptible
    A recovery thread must not be active when device is removed.
    In qeth_remove_device() an interruptible wait operation is used
    to wait until a qeth recovery thread is finished. If a user really
    interrupts the ungroup operation of a qeth device while a recovery
    is running, cio and qeth are out of sync (device already removed
    from cio, but kept in qeth). A following module unload of qeth
    results in a kernel OOPS here.
    Do not allow interruption of ungroup operation to guarantee
    finishing of a potentially running qeth recovery thread.
    Signed-off-by: Ursula Braun <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/s390/net/qeth_main.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 57f6943..ba10d42 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -561,7 +561,7 @@ qeth_set_offline(struct ccwgroup_device *cgdev)
 static int
-qeth_wait_for_threads(struct qeth_card *card, unsigned long threads);
+qeth_threads_running(struct qeth_card *card, unsigned long threads);
 static void
@@ -576,8 +576,7 @@ qeth_remove_device(struct ccwgroup_device *cgdev)
        if (!card)
-       if (qeth_wait_for_threads(card, 0xffffffff))
-               return;
+       wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0);
        if (cgdev->state == CCWGROUP_ONLINE){
                card->use_hard_stop = 1;
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