]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
mmc: mxs: Initialize the spinlock prior to using it
authorFabio Estevam <fabio.estevam@nxp.com>
Sat, 5 Nov 2016 19:45:07 +0000 (17:45 -0200)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 6 Dec 2016 16:53:02 +0000 (16:53 +0000)
commite52186066421908a89b9bfe6de639e65f2f972a3
tree0878f781913f14aedbc3fc4b668ecc2fc4e67b8e
parentfe8b2bf5c5d61f12e8f21386fec028bb5a06ca1f
mmc: mxs: Initialize the spinlock prior to using it

BugLink: http://bugs.launchpad.net/bugs/1642968
commit f91346e8b5f46aaf12f1df26e87140584ffd1b3f upstream.

An interrupt may occur right after devm_request_irq() is called and
prior to the spinlock initialization, leading to a kernel oops,
as the interrupt handler uses the spinlock.

In order to prevent this problem, move the spinlock initialization
prior to requesting the interrupts.

Fixes: e4243f13d10e (mmc: mxs-mmc: add mmc host driver for i.MX23/28)
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/mmc/host/mxs-mmc.c