Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3711476imu; Mon, 28 Jan 2019 09:26:58 -0800 (PST) X-Google-Smtp-Source: ALg8bN5doOzgmaPXmjm57aoaaE9ApDiTK5E0Eh2BlFNnX23duapKdpe2fSXogCEjOsJru8VeHvSW X-Received: by 2002:a62:4c5:: with SMTP id 188mr22988959pfe.130.1548696418774; Mon, 28 Jan 2019 09:26:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696418; cv=none; d=google.com; s=arc-20160816; b=00xSOOF30TFGvQIsQYPKP64ggQcwtYl2wmjDK2TIOJl/SS8eSSyWHMgpRUP4pzXAxe mRi5Mb9wG4uuR7fvpyFx+9zMsZzS2fTLSyHqlM/OcQUFo/0P8L4aPg4EC0JXKmTNBvEF /mXDE82+P3pp2hsO3XOGjk7CbnapmgnN/avb7+uLe//9ua9KESjh9jJdpY/7OPpVvThl sRNtztXd97/Sq3hKs5lzuTBxgKj7KdBiel2w5ChfVL6kYV1vLypo/p8QRqp376GjCPhv ZyeSn6kjRrZyAkaEA4w3GetctA14cXUYXh/5WdC1L4x7bDBGrHMZxoXs3OhbuJepTAuR 9sCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=noPHWKPjumy0YdBY2+xkKhD1OjKMH9HdKN7QOUMVAXA=; b=Clk+UtlhvReZUUmBAo4rdTdF4dYSxHndCMcKEMMpf8zeukV2QFEhMDGaAAZIzdSid/ 6BDn4gcg3tvGIHxgZJg8TGnkMv75lUfZej422fbYBwN33F1zk61MzrkFjxA6OUcD4AkP ADNXkAbUo0wCNdXUHw8IMdHm/nWXBn/hu3q4H5lRF64IHKJkt3K4oOlurUW6XJQMyzFS x47Y9Tyu2+IehX/85TSCIDkb8Wlfd98/RRuqP3/sZbnw39knkyiepnkBMpp8Jb03FWQ8 XxG9dq/4j8Bwv5aptP916LHmHIi8i1tZAcQxYBiX+3TOOYxDNJ/+qmBdyuihGhDfRBUa BHJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SB1o8OBj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 93si32863665plc.2.2019.01.28.09.26.42; Mon, 28 Jan 2019 09:26:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SB1o8OBj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730468AbfA1QAh (ORCPT + 99 others); Mon, 28 Jan 2019 11:00:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:45870 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730274AbfA1QAd (ORCPT ); Mon, 28 Jan 2019 11:00:33 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 343982082E; Mon, 28 Jan 2019 16:00:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691232; bh=VfMUqBrIhtUz7f5JkorF4EfrldSBVxG6udWYl4O43no=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SB1o8OBjXphrw41EIXBlXbMsXZArLQSWGgbfw5C1G2jsxmOXhGvAKyt0QFcKQqkhi iFZaf1219AJUmM9BJ7KznBE2G5xtanTP/uTt10VLjJQr8wGz9fF6VbzBeYCo30yB+G 1Lt8d5PKvObXQ7iMA0d49irwEpv6H31qubsEseWk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Frank Rowand , Sasha Levin , devicetree@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 025/258] of: overlay: do not duplicate properties from overlay for new nodes Date: Mon, 28 Jan 2019 10:55:31 -0500 Message-Id: <20190128155924.51521-25-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Frank Rowand [ Upstream commit 8814dc46bd9e347d4de55ec5bf8f16ea54470499 ] When allocating a new node, add_changeset_node() was duplicating the properties from the respective node in the overlay instead of allocating a node with no properties. When this patch is applied the errors reported by the devictree unittest from patch "of: overlay: add tests to validate kfrees from overlay removal" will no longer occur. These error messages are of the form: "OF: ERROR: ..." and the unittest results will change from: ### dt-test ### end of unittest - 203 passed, 7 failed to ### dt-test ### end of unittest - 210 passed, 0 failed Tested-by: Alan Tull Signed-off-by: Frank Rowand Signed-off-by: Sasha Levin --- drivers/of/overlay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index baa9cee6fa2c..4b834518596f 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -368,7 +368,7 @@ static int add_changeset_node(struct overlay_changeset *ovcs, break; if (!tchild) { - tchild = __of_node_dup(node, node_kbasename); + tchild = __of_node_dup(NULL, node_kbasename); if (!tchild) return -ENOMEM; -- 2.19.1