projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7171511
)
spi: sh-sci: fix use-after-free in sh_sci_spi_remove()
author
Jürg Billeter
<j@bitron.ch>
Mon, 16 Jun 2014 14:39:29 +0000
(16:39 +0200)
committer
Mark Brown
<broonie@linaro.org>
Tue, 17 Jun 2014 14:47:31 +0000
(15:47 +0100)
setbits() uses sp->membase.
Signed-off-by: Jürg Billeter <j@bitron.ch>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-sh-sci.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/spi/spi-sh-sci.c
b/drivers/spi/spi-sh-sci.c
index 1f56ef651d1a7a694cf90960f6b5f999f4415504..b83dd733684ca5d8f2566d579d0ecf7056848a66 100644
(file)
--- a/
drivers/spi/spi-sh-sci.c
+++ b/
drivers/spi/spi-sh-sci.c
@@
-175,9
+175,9
@@
static int sh_sci_spi_remove(struct platform_device *dev)
{
struct sh_sci_spi *sp = platform_get_drvdata(dev);
- iounmap(sp->membase);
- setbits(sp, PIN_INIT, 0);
spi_bitbang_stop(&sp->bitbang);
+ setbits(sp, PIN_INIT, 0);
+ iounmap(sp->membase);
spi_master_put(sp->bitbang.master);
return 0;
}