All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/4] clk/driver: platform: Fix kfree() of const memory on setting driver_override
@ 2019-02-18 10:15 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 29+ messages in thread
From: Krzysztof Kozlowski @ 2019-02-18 10:15 UTC (permalink / raw)
  To: Russell King, Mark Brown, linux-kernel, linux-spi,
	Greg Kroah-Hartman, Rafael J. Wysocki, Sylwester Nawrocki,
	Tomasz Figa, Chanwoo Choi, Michael Turquette, Stephen Boyd,
	Kukjin Kim, Krzysztof Kozlowski, Andy Gross, David Brown,
	Srinivas Kandagatla, linux-samsung-soc, linux-clk,
	linux-arm-kernel, linux-arm-msm, alsa-devel

Hi,

The problem
===========
Several device types (platform, amba, spi etc.) provide a driver_override
field.  On sysfs store or during device removal, they kfree() the
existing value.

However the users are unaware of this and set the driver_override like:

 	pdev->driver_override = "exynos5-subcmu";

which obviously leads to error.

Solution
========
I provided simple helper for platform device.  If this approach is
acceptable, I can convert also other buses, like AMBA, SPI.


Dependencies and pick up order
==============================
Patch 1: please pick it as is through clock tree
Patch 3: Depends on patch 1 (merge conflict) and 2.
Patch 4: Depends on patch 2.

Best regards,
Krzysztof


Krzysztof Kozlowski (4):
  clk: samsung: exynos5: Fix possible NULL pointer exception on
    platform_device_alloc() failure
  driver: platform: Provide helper for safer setting of driver_override
  clk: samsung: exynos5: Fix kfree() of const memory on setting
    driver_override
  slimbus: ngd: Fix kfree() of const memory on setting driver_override

 drivers/base/platform.c                  | 63 ++++++++++++++++++++++----------
 drivers/clk/samsung/clk-exynos5-subcmu.c | 12 ++++--
 drivers/slimbus/qcom-ngd-ctrl.c          |  2 +-
 include/linux/platform_device.h          |  9 ++++-
 4 files changed, 61 insertions(+), 25 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2019-02-21 11:43 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 10:15 [RFC 0/4] clk/driver: platform: Fix kfree() of const memory on setting driver_override Krzysztof Kozlowski
2019-02-18 10:15 ` Krzysztof Kozlowski
2019-02-18 10:15 ` Krzysztof Kozlowski
2019-02-18 10:15 ` [RFC 1/4] clk: samsung: exynos5: Fix possible NULL pointer exception on platform_device_alloc() failure Krzysztof Kozlowski
2019-02-18 10:15   ` Krzysztof Kozlowski
2019-02-18 10:15   ` Krzysztof Kozlowski
2019-02-18 10:15 ` [RFC 2/4] driver: platform: Provide helper for safer setting of driver_override Krzysztof Kozlowski
2019-02-18 10:15   ` Krzysztof Kozlowski
2019-02-18 10:15 ` [RFC 3/4] clk: samsung: exynos5: Fix kfree() of const memory on setting driver_override Krzysztof Kozlowski
2019-02-18 10:15   ` Krzysztof Kozlowski
2019-02-18 10:15   ` Krzysztof Kozlowski
2019-02-18 10:16 ` [RFC 4/4] slimbus: ngd: " Krzysztof Kozlowski
2019-02-18 10:16   ` Krzysztof Kozlowski
2019-02-18 10:16   ` Krzysztof Kozlowski
2019-02-18 10:40 ` [RFC 0/4] clk/driver: platform: " Geert Uytterhoeven
2019-02-18 10:40   ` Geert Uytterhoeven
2019-02-18 10:40   ` Geert Uytterhoeven
2019-02-18 11:14   ` Krzysztof Kozlowski
2019-02-18 11:14     ` Krzysztof Kozlowski
2019-02-18 11:14     ` Krzysztof Kozlowski
2019-02-18 11:14     ` Krzysztof Kozlowski
2019-02-20 22:01     ` Stephen Boyd
2019-02-20 22:01       ` Stephen Boyd
2019-02-20 22:01       ` Stephen Boyd
2019-02-20 22:01       ` Stephen Boyd
2019-02-21 11:43       ` Krzysztof Kozlowski
2019-02-21 11:43         ` Krzysztof Kozlowski
2019-02-21 11:43         ` Krzysztof Kozlowski
2019-02-21 11:43         ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.