TTY: pdc_cons, fix open vs timer race
authorJiri Slaby <jslaby@suse.cz>
Mon, 5 Mar 2012 13:52:51 +0000 (14:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Mar 2012 20:51:13 +0000 (12:51 -0800)
commit52b762f7a94c88e5a8aa2be67a06a6f01020cc82
tree637b42adc531c7cfd1e5b3c374fa19b84e5864ba
parente380a81e34375a38f253b42394ef06ca3127559f
TTY: pdc_cons, fix open vs timer race

The timer is initialized too late. tty->open may fire an invalid
timer. So initialize the timer earlier using DEFINE_TIMER.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/parisc/kernel/pdc_cons.c