Re: [PATCH] scsi: 53c700: fix invalid frees in m68k driver remove paths
From: Geert Uytterhoeven
Date: Mon Nov 23 2026 - 03:21:22 EST
CC Kars
On Sun, 22 Nov 2026 at 17:05, Ziheng Wei <zihengw03@xxxxxxx> wrote:
> NCR_700_detect() stores the allocated host parameters in
> host->hostdata[0]. The m68k remove paths instead use shost_priv(host),
> which returns the address of the pointer slot and causes an interior free.
>
> Free the pointer stored in host->hostdata[0], as the other 53c700 drivers
> do.
>
> Found by LLM-assisted static analysis. Cross-compiled for m68k; no
> runtime test on the affected hardware.
>
> Fixes: a16efc1cbf0a ("[SCSI] 53c700: Amiga 4000T NCR53c710 SCSI")
> Fixes: 8276b58af4dd ("[SCSI] 53c700: m68k BVME6000 NCR53C710 SCSI")
> Fixes: 506c7bbcd9bc ("[SCSI] 53c700: m68k MVME16x NCR53C710 SCSI")
> Fixes: 45804fbb00ee ("[SCSI] 53c700: Amiga Zorro NCR53c710 SCSI")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Ziheng Wei <zihengw03@xxxxxxx>
LGTM, so
Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
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