lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181210180002.4440-1-enric.balletbo@collabora.com>
Date:   Mon, 10 Dec 2018 19:00:02 +0100
From:   Enric Balletbo i Serra <enric.balletbo@...labora.com>
To:     lee.jones@...aro.org
Cc:     groeck@...omium.org, gwendal@...omium.org, kernel@...labora.com,
        bleung@...omium.org, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Subject: [PATCH] mfd: cros_ec_dev: Add missing mfd_remove_devices() call in remove

The driver adds different MFD child devices via mfd_add_devices() and
hence it is required to call mfd_remove_devices() to remove MFD child
devices.

Fixes: 5e0115581bbc ("cros_ec: Move cros_ec_dev module to drivers/mfd")
Cc: stable@...r.kernel.org
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
---
Hi Lee,

I saw that you send a mfd-fixes pull request this morning, so sorry in
advance for sending this too late. This was broken since the driver
moved from platform/chrome to mfd (and probably before that), so
it's an old problem. Note that I plan to send a patch series that depends
on this to apply cleanly. If the patch is fine with you and there is any
possibility to go in this version that will be good, if not, let me know
if you prefer queue this in your for-next branch or if you prefer I
include the patch on the series I plan to send on top of it to not mess
things.

Thanks,
 Enric

 drivers/mfd/cros_ec_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
index b99a194ce5a4..2d0fee488c5a 100644
--- a/drivers/mfd/cros_ec_dev.c
+++ b/drivers/mfd/cros_ec_dev.c
@@ -499,6 +499,7 @@ static int ec_device_remove(struct platform_device *pdev)
 
 	cros_ec_debugfs_remove(ec);
 
+	mfd_remove_devices(ec->dev);
 	cdev_del(&ec->cdev);
 	device_unregister(&ec->class_dev);
 	return 0;
-- 
2.19.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ