The patch titled parport: ieee1284: use del_timer_sync() in parport_wait_event() has been added to the -mm tree. Its filename is parport-ieee1284-use-del_timer_sync-in-parport_wait_event.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: parport: ieee1284: use del_timer_sync() in parport_wait_event() From: Michael Buesch <mb@xxxxxxxxx> Use del_timer_sync() instead of del_timer() to make sure the timer won't be running when we return from parport_wait_event(), because this would crash due to destruction of timer_list. This is untested and just based on a code review. Just think about the following sequence of events: - add_timer() - down_interruptible() is interrupted by a signal. - we enter the timer callback handler on another CPU. - del_timer(), but the timer callback is still running. - eturn from parport_wait_even, which destroys the automatic variable "timer" while the callback is running on another CPU. Signed-off-by: Michael Buesch <mb@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/parport/ieee1284.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/parport/ieee1284.c~parport-ieee1284-use-del_timer_sync-in-parport_wait_event drivers/parport/ieee1284.c --- a/drivers/parport/ieee1284.c~parport-ieee1284-use-del_timer_sync-in-parport_wait_event +++ a/drivers/parport/ieee1284.c @@ -84,7 +84,7 @@ int parport_wait_event (struct parport * add_timer (&timer); ret = down_interruptible (&port->physport->ieee1284.irq); - if (!del_timer (&timer) && !ret) + if (!del_timer_sync (&timer) && !ret) /* Timed out. */ ret = 1; _ Patches currently in -mm which might be from mb@xxxxxxxxx are linux-next.patch parport-ieee1284-use-del_timer_sync-in-parport_wait_event.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html