* [PATCH] spi: sh-sci: fix use-after-free in sh_sci_spi_remove()
@ 2014-06-16 14:39 Jürg Billeter
2014-06-16 16:06 ` Geert Uytterhoeven
2014-06-17 14:47 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Jürg Billeter @ 2014-06-16 14:39 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi, linux-kernel, Jürg Billeter
setbits() uses sp->membase.
Signed-off-by: Jürg Billeter <j@bitron.ch>
---
drivers/spi/spi-sh-sci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-sh-sci.c b/drivers/spi/spi-sh-sci.c
index 1f56ef6..b83dd73 100644
--- 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;
}
--
2.0.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] spi: sh-sci: fix use-after-free in sh_sci_spi_remove()
2014-06-16 14:39 [PATCH] spi: sh-sci: fix use-after-free in sh_sci_spi_remove() Jürg Billeter
@ 2014-06-16 16:06 ` Geert Uytterhoeven
2014-06-17 14:47 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2014-06-16 16:06 UTC (permalink / raw)
To: Jürg Billeter; +Cc: Mark Brown, linux-spi, linux-kernel, Magnus Damm
On Mon, Jun 16, 2014 at 4:39 PM, Jürg Billeter <j@bitron.ch> wrote:
> setbits() uses sp->membase.
>
> Signed-off-by: Jürg Billeter <j@bitron.ch>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> drivers/spi/spi-sh-sci.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-sh-sci.c b/drivers/spi/spi-sh-sci.c
> index 1f56ef6..b83dd73 100644
> --- 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;
> }
> --
> 2.0.0
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] spi: sh-sci: fix use-after-free in sh_sci_spi_remove()
2014-06-16 14:39 [PATCH] spi: sh-sci: fix use-after-free in sh_sci_spi_remove() Jürg Billeter
2014-06-16 16:06 ` Geert Uytterhoeven
@ 2014-06-17 14:47 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2014-06-17 14:47 UTC (permalink / raw)
To: Jürg Billeter; +Cc: linux-spi, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 115 bytes --]
On Mon, Jun 16, 2014 at 04:39:29PM +0200, Jürg Billeter wrote:
> setbits() uses sp->membase.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-17 14:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-16 14:39 [PATCH] spi: sh-sci: fix use-after-free in sh_sci_spi_remove() Jürg Billeter
2014-06-16 16:06 ` Geert Uytterhoeven
2014-06-17 14:47 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®