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: <20170609095910.4090-4-srinivas.kandagatla@linaro.org>
Date:   Fri,  9 Jun 2017 10:59:08 +0100
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     gregkh@...uxfoundation.org
Cc:     srinivas.kandagatla@...aro.org, linux-kernel@...r.kernel.org,
        Andrey Smirnov <andrew.smirnov@...il.com>, cphealy@...il.com,
        Maxime Ripard <maxime.ripard@...e-electrons.com>
Subject: [PATCH 3/5] nvmem: core: Call put_device() in nvmem_unregister()

From: Andrey Smirnov <andrew.smirnov@...il.com>

Call put_device() in nvmem_unregister() to make sure nvmem_release
gets called freeing up allocated resources.

Cc: cphealy@...il.com
Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc: Maxime Ripard <maxime.ripard@...e-electrons.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov@...il.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
---
 drivers/nvmem/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 6cf916d9db6d..0cbac71195b5 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -532,6 +532,7 @@ int nvmem_unregister(struct nvmem_device *nvmem)
 
 	nvmem_device_remove_all_cells(nvmem);
 	device_del(&nvmem->dev);
+	put_device(&nvmem->dev);
 
 	return 0;
 }
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ