From: Marek Roszko Date: Tue, 7 Jan 2014 10:45:07 +0000 (+0100) Subject: tty/serial: at91: fix race condition in atmel_serial_remove X-Git-Tag: v3.14-rc1~149^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f50c995f9ebf064cea1368bf361c4e29679415b4;p=pandora-kernel.git tty/serial: at91: fix race condition in atmel_serial_remove The _remove callback could be called when a tasklet is scheduled. tasklet_kill was called inside the function in order to free up any scheduled tasklets. However it was called after uart_remove_one_port which destroys tty references needed in the port for atmel_tasklet_func. Simply putting the tasklet_kill at the start of the function will prevent this conflict. Signed-off-by: Marek Roszko Acked-by: Leilei Zhao Cc: # v3.12 Signed-off-by: Nicolas Ferre Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed