tty: fix BKL related leak and crash
authorIngo Molnar <mingo@elte.hu>
Wed, 14 May 2008 15:11:46 +0000 (17:11 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 May 2008 17:19:30 +0000 (10:19 -0700)
commit487ad7efbf6b0ec338cdfc2a7b0fbeb53f17a94c
treee2bc37cc97680403bf664a5944b10cdd907b9f10
parent8568dae21e186fbb111bbe6583033a33fe26f83d
tty: fix BKL related leak and crash

Enabling the BKL to be lockdep tracked uncovered the following
upstream kernel bug in the tty code, which caused a BKL
reference leak:

  ================================================
  [ BUG: lock held when returning to user space! ]
  ------------------------------------------------
  dmesg/3121 is leaving the kernel with locks still held!
  1 lock held by dmesg/3121:
   #0:  (kernel_mutex){--..}, at: [<c02f34d9>] opost+0x24/0x194

this might explain some of the atomicity warnings and crashes
that -tip tree testing has been experiencing since the BKL
was converted back to a spinlock.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/n_tty.c