Message ID | E1ctBNK-0007Tr-Qx@debutante (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On Wed, Mar 29, 2017 at 1:02 PM, Mark Brown <broonie@kernel.org> wrote: > The patch > > spi: dynamycally allocated message initialization Shouldn't this contain the keyword "fix": spi: Fix dynamically allocated message initialization Else it looks like an innocent change. And a Fixes-tag would be nice, too. > has been applied to the spi tree at > > git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git > > All being well this means that it will be integrated into the linux-next > tree (usually sometime in the next 24 hours) and sent to Linus during > the next merge window (or sooner if it is a bug fix), however if > problems are discovered then the patch may be dropped or reverted. > > You may get further e-mails resulting from automated or manual testing > and review of the tree, please engage with people reporting problems and > send followup patches addressing any issues that are reported if needed. > > If any updates are required or you are submitting further changes they > should be sent as incremental updates against current git, existing > patches will not be replaced. Ugh... > Please add any relevant lists and maintainers to the CCs when replying > to this mail. > > Thanks, > Mark > > From ed77d6bcafd75d247cf3c6ad685aa221cda1b8ba Mon Sep 17 00:00:00 2001 > From: Emiliano Ingrassia <ingrassia@epigenesys.com> > Date: Tue, 28 Mar 2017 09:49:29 +0200 > Subject: [PATCH] spi: dynamycally allocated message initialization > > Invoke the proper function while initializing > a dynamically allocated spi_message to avoid > NULL pointer dereference during resources deallocation. > > Signed-off-by: Emiliano Ingrassia <ingrassia@epigenesys.com> > Signed-off-by: Mark Brown <broonie@kernel.org> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 75c6bd0ac605..3b0070695375 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -891,7 +891,7 @@ static inline struct spi_message *spi_message_alloc(unsigned ntrans, gfp_t flags unsigned i; struct spi_transfer *t = (struct spi_transfer *)(m + 1); - INIT_LIST_HEAD(&m->transfers); + spi_message_init_no_memset(m); for (i = 0; i < ntrans; i++, t++) spi_message_add_tail(t, m); }