summaryrefslogtreecommitdiffstats
path: root/drivers/char/cyclades.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2007-10-23 05:45:13 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-23 17:32:06 +0200
commit7fa57a0cd98bdd163eeb5f15cbe234c3a0cf68a1 (patch)
treee96e4baa27409ab15daaad10f5ff63fac67e4919 /drivers/char/cyclades.c
parentfix mprotect vma_wants_writenotify prot (diff)
downloadlinux-7fa57a0cd98bdd163eeb5f15cbe234c3a0cf68a1.tar.xz
linux-7fa57a0cd98bdd163eeb5f15cbe234c3a0cf68a1.zip
Char: cyclades, fix potential NULL dereference
ztxdone is jumped to even if tty is NULL and tty_wakeup placed after this label doesn't expect NULLed parameter, so this will cause an oops in some situations (why they scheduled a wakeup there before remove bottom half processing patch?). wakeup only in the case when we have non-null tty struct. Spotted by Adrian Bunk. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/cyclades.c')
-rw-r--r--drivers/char/cyclades.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index d1bd0f08a331..e4f579c3e245 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -1602,8 +1602,8 @@ static void cyz_handle_tx(struct cyclades_port *info,
info->icount.tx++;
}
#endif
-ztxdone:
tty_wakeup(tty);
+ztxdone:
/* Update tx_put */
cy_writel(&buf_ctrl->tx_put, tx_put);
}