Browse Source

Bluetooth: Release BTM while sleeping to avoid deadlock

Signed-off-by: Vladislav P <vladisslav@inbox.ru>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vladislav P 14 years ago
parent
commit
840af824b2
1 changed files with 2 additions and 0 deletions
  1. 2 0
      net/bluetooth/rfcomm/tty.c

+ 2 - 0
net/bluetooth/rfcomm/tty.c

@@ -727,7 +727,9 @@ static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp)
 			break;
 			break;
 		}
 		}
 
 
+		tty_unlock();
 		schedule();
 		schedule();
+		tty_lock();
 	}
 	}
 	set_current_state(TASK_RUNNING);
 	set_current_state(TASK_RUNNING);
 	remove_wait_queue(&dev->wait, &wait);
 	remove_wait_queue(&dev->wait, &wait);