[HELP] Failed check_irq_holder() -> ???

From: Jean Tourrilhes (jt@bougret.hpl.hp.com)
Date: Thu Feb 28 2002 - 20:12:28 EST


        Hi,

        Trying to validate IrDA with 2.5.6-pre1 (I guess, that's my
job). I got some socket OOPS in a place where everything was smooth
before.
        It seems that check_irq_holder() in include/asm/smplock.h is
failing and generate the Oops. Basically, it complain when
interruptible_sleep_on() is called with interrupts disabled (fair
enough).

        The offending code in net/irda/af_irda.c look like this :
--------------------------------------
        cli(); /* To avoid races on the sleep */
        
        /* A Connect Ack with Choke or timeout or failed routing will go to
         * closed. */
        while (sk->state == TCP_SYN_SENT) {
                interruptible_sleep_on(sk->sleep);
                if (signal_pending(current)) {
                        sti();
                        return -ERESTARTSYS;
                }
        }
        
        if (sk->state != TCP_ESTABLISHED) {
                sti();
                sock->state = SS_UNCONNECTED;
                return sock_error(sk); /* Always set at this point */
        }
        
        sock->state = SS_CONNECTED;
        
        sti();
--------------------------------------

        Wow ! This is far beyond my usual level of evil !
        My guess is that this was a cut'n'paste of some TCP code (or
else), and while this other code was fixed/cleaned up, IrDA kept the
old version.
        So, if anybody remember having seen that and could tell me how
it was fixed, that would make my day...

        Thanks...

        Jean
-
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/



This archive was generated by hypermail 2b29 : Thu Feb 28 2002 - 21:00:48 EST