]> git.baikalelectronics.ru Git - kernel.git/commit
Char: cyclades, fix potential NULL dereference
authorJiri Slaby <jirislaby@gmail.com>
Tue, 23 Oct 2007 03:45:13 +0000 (20:45 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 23 Oct 2007 15:32:06 +0000 (08:32 -0700)
commit9cc44b9fc3d00fda083251367d97688243ea6ac9
treee96e4baa27409ab15daaad10f5ff63fac67e4919
parente8e212f2d3f4c98a7b64bc5f8f3f4f6f25bb21cf
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>
drivers/char/cyclades.c