tty->count is decremented only after ->close() had been called and several tasks can hit it in parallel. As the result, using tty->count to check if you are the last one is broken. We end up leaving line->tty not reset to NULL and the next IRQ on that sucker will blow up trying to dereference pointers from kfree'd struct tty. Fix is obvious: we need to use a counter of our own. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|---|---|---|
| .. | ||
| skas | ||
| aio.h | ||
| arch.h | ||
| as-layout.h | ||
| chan_kern.h | ||
| chan_user.h | ||
| common-offsets.h | ||
| elf_user.h | ||
| frame_kern.h | ||
| init.h | ||
| initrd.h | ||
| irq_kern.h | ||
| irq_user.h | ||
| kern_util.h | ||
| kern.h | ||
| ldt.h | ||
| line.h | ||
| longjmp.h | ||
| mconsole_kern.h | ||
| mconsole.h | ||
| mem_kern.h | ||
| mem_user.h | ||
| mem.h | ||
| net_kern.h | ||
| net_user.h | ||
| os.h | ||
| process.h | ||
| ptrace_user.h | ||
| registers.h | ||
| sigio.h | ||
| skas_ptrace.h | ||
| skas_ptregs.h | ||
| syscall.h | ||
| sysrq.h | ||
| task.h | ||
| tlb.h | ||
| ubd_user.h | ||
| um_malloc.h | ||
| um_mmu.h | ||
| um_uaccess.h | ||
| user.h | ||