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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1348278070-22202-2-git-send-email-peterhuewe@gmx.de>
Date:	Sat, 22 Sep 2012 03:41:10 +0200
From:	Peter Huewe <peterhuewe@....de>
To:	MyungJoo Ham <myungjoo.ham@...sung.com>
Cc:	Chanwoo Choi <cw00.choi@...sung.com>, linux-kernel@...r.kernel.org,
	Peter Huewe <peterhuewe@....de>, stable@...r.kernel.org
Subject: [PATCH 2/2] extcon: unregister compat link on cleanup

Since extcon registers this compat link at device registration
(extcon_dev_register), we should probably remove them at deregistration/cleanup.

Cc: stable@...r.kernel.org
Signed-off-by: Peter Huewe <peterhuewe@....de>
---
 drivers/extcon/extcon_class.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c
index 6e914d0..7610b4e 100644
--- a/drivers/extcon/extcon_class.c
+++ b/drivers/extcon/extcon_class.c
@@ -575,6 +575,11 @@ static void extcon_cleanup(struct extcon_dev *edev, bool skip)
 			kfree(edev->cables);
 		}
 
+#if defined(CONFIG_ANDROID)
+		if (switch_class)
+			ret = class_compat_remove_link(switch_class, edev->dev,
+						       NULL);
+#endif /* CONFIG_ANDROID */
 		device_unregister(edev->dev);
 		put_device(edev->dev);
 	}
-- 
1.7.8.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ