Commit 5de0d01b authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Marcel Holtmann

[Bluetooth] Check for signals while waiting for DLC

This fixes a bug in rfcomm_tty_open() which can end up in an endless
loop using up all CPU time, because signal_pending() is always true.
parent 8867e01d
...@@ -572,6 +572,11 @@ static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp) ...@@ -572,6 +572,11 @@ static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp)
if (dlc->state == BT_CONNECTED) if (dlc->state == BT_CONNECTED)
break; break;
if (signal_pending(current)) {
err = -EINTR;
break;
}
schedule(); schedule();
} }
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment