Skip to contentSkip to conversation

Failed check_irq_holder() -> ???

HELP Jean Tourrilhes 1 participant 1 message Mar 1, 2002

lore
Share & tools
lore
#0 lore raw
	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