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: <1377783892-13226-1-git-send-email-grant.likely@linaro.org>
Date:	Thu, 29 Aug 2013 14:44:52 +0100
From:	Grant Likely <grant.likely@...aro.org>
To:	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Cc:	Grant Likely <grant.likely@...aro.org>,
	Wladislav Wiebe <wladislav.kw@...il.com>
Subject: [PATCH] of/fdt: Remove duplicate memory clearing on FDT unflattening

Patch 9e4012752, "of: fdt: fix memory initialization for expanded DT"
fixed incomplete clearing of memory when unflattening the device tree.
However the code was already clearing some of the memory, it just wasn't
doing so for all allocations. Now that the memory is cleared right at
the point of allocation, the memset after unflatten_dt_alloc() is
redundant. Remove it.

Signed-off-by: Grant Likely <grant.likely@...aro.org>
Cc: Wladislav Wiebe <wladislav.kw@...il.com>
---
 drivers/of/fdt.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 55b028f..9d9be9617 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -202,7 +202,6 @@ static void * unflatten_dt_node(struct boot_param_header *blob,
 				__alignof__(struct device_node));
 	if (allnextpp) {
 		char *fn;
-		memset(np, 0, sizeof(*np));
 		np->full_name = fn = ((char *)np) + sizeof(*np);
 		if (new_format) {
 			/* rebuild full path for new format */
-- 
1.8.1.2

--
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