[PATCH] Call init_timer() for ISDN PPP CCP reset state timer
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 21 Dec 2006 22:06:24 +0000 (23:06 +0100)
committerLinus Torvalds <torvalds@woody.osdl.org>
Fri, 22 Dec 2006 22:31:24 +0000 (14:31 -0800)
The function isdn_ppp_ccp_reset_alloc_state() sets ->timer.function
and ->timer.data and later on calls add_timer() with no init_timer()
ever done.

Noted by Al Viro.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/isdn/i4l/isdn_ppp.c

index 1726131b20be1ed00e2161515582abc89c4de0b2..4e3f127e4003612106c3b1fa10aab971bd88e69b 100644 (file)
@@ -2339,6 +2339,7 @@ static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_s
                rs->state = CCPResetIdle;
                rs->is = is;
                rs->id = id;
+               init_timer(&rs->timer);
                rs->timer.data = (unsigned long)rs;
                rs->timer.function = isdn_ppp_ccp_timer_callback;
                is->reset->rs[id] = rs;