aboutsummaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorXinyu Chen <xinyu.chen@freescale.com>2012-08-27 09:36:51 +0200
committerBen Hutchings <ben@decadent.org.uk>2012-09-19 15:05:14 +0100
commitc096552004244868391b29f319ea8889d55abe19 (patch)
tree5e0d05167f0dc4afac53b89899ee09f5f7af1eb6 /scripts/patch-kernel
parent2bcd02db4deea25c9a5c8cca03b2fceba6596574 (diff)
tty: serial: imx: console write routing is unsafe on SMP
commit 9ec1882df244c4ee1baa692676fef5e8b0f5487d upstream. The console feature's write routing is unsafe on SMP with the startup/shutdown call. There could be several consumers of the console * the kernel printk * the init process using /dev/kmsg to call printk to show log * shell, which open /dev/console and write with sys_write() The shell goes into the normal uart open/write routing, but the other two go into the console operations. The open routing calls imx serial startup, which will write USR1/2 register without any lock and critical with imx_console_write call. Add a spin_lock for startup/shutdown/console_write routing. This patch is a port from Freescale's Android kernel. Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com> Tested-by: Dirk Behme <dirk.behme@de.bosch.com> CC: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions