linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/11] Fix broken usage of driver_override (and kfree of static memory)
@ 2022-02-23 19:12 Krzysztof Kozlowski
  2022-02-23 19:13 ` [PATCH v2 01/11] driver: platform: add and use helper for safer setting of driver_override Krzysztof Kozlowski
                   ` (10 more replies)
  0 siblings, 11 replies; 25+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-23 19:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Stuart Yoder,
	Laurentiu Tudor, Abel Vesa, Shawn Guo, Sascha Hauer,
	Fabio Estevam, K. Y. Srinivasan, Haiyang Zhang,
	Stephen Hemminger, Wei Liu, Dexuan Cui, Bjorn Helgaas,
	Bjorn Andersson, Mathieu Poirier, Vineeth Vijayan,
	Peter Oberparleiter, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
	Andy Gross, Srinivas Kandagatla, Mark Brown, Michael S. Tsirkin,
	Jason Wang, linux-kernel, linux-clk, NXP Linux Team,
	linux-arm-kernel, linux-hyperv, linux-pci, linux-remoteproc,
	linux-s390, linux-arm-msm, alsa-devel, linux-spi, virtualization,
	Linus Torvalds
  Cc: Rasmus Villemoes, Krzysztof Kozlowski

Hi,

This is a continuation of my old patchset from 2019. [1]
Back then, few drivers set driver_override wrong. I fixed Exynos
in a different way after discussions. QCOM NGD was not fixed
and a new user appeared - IMX SCU.

It seems "char *" in driver_override looks too consty, so we
tend to make a mistake of storing there string literals.

Changes of latest since v1 (not the old 2019 solution):
=======================================================
https://lore.kernel.org/all/708eabb1-7b35-d525-d4c3-451d4a3de84f@rasmusvillemoes.dk/
1. Add helper for setting driver_override.
2. Use the helper.

Dependencies (and stable):
==========================
1. All patches, including last three fixes, depend on first patch
   introducing the helper.
2. The last three commits - fixes - are probably not backportable
   directly, because of this dependency. I don't know how to express
   it here, since stable-kernel-rules.rst mentions only commits as
   possible dependencies.

[1] https://lore.kernel.org/all/1550484960-2392-3-git-send-email-krzk@kernel.org/

Best regards,
Krzysztof

Krzysztof Kozlowski (11):
  driver: platform: add and use helper for safer setting of
    driver_override
  amba: use helper for safer setting of driver_override
  fsl-mc: use helper for safer setting of driver_override
  hv: vmbus: use helper for safer setting of driver_override
  pci: use helper for safer setting of driver_override
  s390: cio: use helper for safer setting of driver_override
  spi: use helper for safer setting of driver_override
  vdpa: use helper for safer setting of driver_override
  clk: imx: scu: fix kfree() of static memory on setting driver_override
  slimbus: qcom-ngd: fix kfree() of static memory on setting
    driver_override
  rpmsg: fix kfree() of static memory on setting driver_override

 drivers/amba/bus.c              | 24 +++---------------
 drivers/base/driver.c           | 44 +++++++++++++++++++++++++++++++++
 drivers/base/platform.c         | 24 +++---------------
 drivers/bus/fsl-mc/fsl-mc-bus.c | 22 +++--------------
 drivers/clk/imx/clk-scu.c       |  7 +++++-
 drivers/hv/vmbus_drv.c          | 24 +++---------------
 drivers/pci/pci-sysfs.c         | 24 +++---------------
 drivers/rpmsg/rpmsg_internal.h  | 13 ++++++++--
 drivers/rpmsg/rpmsg_ns.c        | 14 +++++++++--
 drivers/s390/cio/css.c          | 24 +++---------------
 drivers/slimbus/qcom-ngd-ctrl.c | 12 ++++++++-
 drivers/spi/spi.c               | 20 +++------------
 drivers/vdpa/vdpa.c             | 25 +++----------------
 include/linux/device/driver.h   |  1 +
 include/linux/platform_device.h |  6 ++++-
 include/linux/spi/spi.h         |  2 +-
 16 files changed, 123 insertions(+), 163 deletions(-)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-02-25 17:13 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 19:12 [PATCH v2 00/11] Fix broken usage of driver_override (and kfree of static memory) Krzysztof Kozlowski
2022-02-23 19:13 ` [PATCH v2 01/11] driver: platform: add and use helper for safer setting of driver_override Krzysztof Kozlowski
2022-02-23 21:33   ` Michael S. Tsirkin
2022-02-24  7:46     ` Krzysztof Kozlowski
2022-02-23 21:53   ` Bjorn Helgaas
2022-02-24  7:47     ` Krzysztof Kozlowski
2022-02-24  8:43       ` Krzysztof Kozlowski
2022-02-23 19:13 ` [PATCH v2 02/11] amba: " Krzysztof Kozlowski
2022-02-23 19:13 ` [PATCH v2 03/11] fsl-mc: " Krzysztof Kozlowski
2022-02-23 19:13 ` [PATCH v2 04/11] hv: vmbus: " Krzysztof Kozlowski
2022-02-23 19:13 ` [PATCH v2 05/11] pci: " Krzysztof Kozlowski
2022-02-23 21:51   ` Bjorn Helgaas
2022-02-24  7:49     ` Krzysztof Kozlowski
2022-02-24 23:52       ` Bjorn Helgaas
2022-02-25  9:36         ` Krzysztof Kozlowski
2022-02-25 17:13           ` Bjorn Helgaas
2022-02-23 19:13 ` [PATCH v2 06/11] s390: cio: " Krzysztof Kozlowski
2022-02-23 19:14 ` [PATCH v2 07/11] spi: " Krzysztof Kozlowski
2022-02-23 20:04   ` Mark Brown
2022-02-23 20:13     ` Krzysztof Kozlowski
2022-02-23 19:14 ` [PATCH v2 08/11] vdpa: " Krzysztof Kozlowski
2022-02-23 19:14 ` [PATCH v2 09/11] clk: imx: scu: fix kfree() of static memory on setting driver_override Krzysztof Kozlowski
2022-02-23 19:19   ` Krzysztof Kozlowski
2022-02-23 19:14 ` [PATCH v2 10/11] slimbus: qcom-ngd: " Krzysztof Kozlowski
2022-02-23 19:14 ` [PATCH v2 11/11] rpmsg: " Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).