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: <BLU437-SMTP21FE1EDAB2F11E7F1FE0EC953A0@phx.gbl>
Date:	Wed, 4 Feb 2015 08:49:01 +0800
From:	Junjie Mao <junjie.mao@...mail.com>
To:	Doug Thompson <dougthompson@...ssion.com>
CC:	Borislav Petkov <bp@...en8.de>,
	Mauro Carvalho Chehab <mchehab@....samsung.com>,
	linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org,
	Junjie Mao <junjie.mao@...mail.com>
Subject: [PATCH v2] edac: remove dev_attr_sdram_scrub_rate on failure and destory path

v2: also remove the sysfs node in edac_remove_sysfs_mci_device

Signed-off-by: Junjie Mao <junjie.mao@...mail.com>
---
 drivers/edac/edac_mc_sysfs.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index 8e48d32efe37..97eefc409cac 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -1068,6 +1068,8 @@ fail_unregister_dimm:
 			continue;
 		device_unregister(&dimm->dev);
 	}
+	if (mci->set_sdram_scrub_rate || mci->get_sdram_scrub_rate)
+		device_remove_file(&mci->dev, &dev_attr_sdram_scrub_rate);
 fail_unregister_dev:
 	device_unregister(&mci->dev);
 fail_unregister_bus:
@@ -1100,6 +1102,9 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
 		edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev));
 		device_unregister(&dimm->dev);
 	}
+
+	if (mci->set_sdram_scrub_rate || mci->get_sdram_scrub_rate)
+		device_remove_file(&mci->dev, &dev_attr_sdram_scrub_rate);
 }

 void edac_unregister_sysfs(struct mem_ctl_info *mci)
--
1.9.3
--
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