From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C861DC282C4 for ; Mon, 4 Feb 2019 10:54:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8CCB62082E for ; Mon, 4 Feb 2019 10:54:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549277689; bh=Tg0357/nuUCysWXY2ZoO3HZnp0hAAk+Y2eX0pCFOP9Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=neRu7SmwiHDOxFByTKpxQzfC/zMFPFv9T4hFWjz4XxghFbBVf5G7Q6nesGgoyT7sw DX7qcgAp6u9BkBsp3o+6CQ7EbJzKIunVVLsGDw+xGaAs4OJVPH6KMU3gx3KFe1LzQL DYF7wGDWfqUG+OvAcJ6/2ZiIe3YCbLEW/EBZfZEY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732490AbfBDKys (ORCPT ); Mon, 4 Feb 2019 05:54:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:52140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730124AbfBDKyV (ORCPT ); Mon, 4 Feb 2019 05:54:21 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A54932184B; Mon, 4 Feb 2019 10:54:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549277661; bh=Tg0357/nuUCysWXY2ZoO3HZnp0hAAk+Y2eX0pCFOP9Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xOmaiEfqbwzSOnGt4De6GkDEixXoO0zYPuF+QQo8JLZUnSt3BcX9449ItOT2xGN39 dwWEjFJakAV29BqrU2zykLev5XsMR0/FjiSScOJV2TQMt57yMNrSzf9nIZYFnYSnux ZYxLI1KSjrtdQ6AccICjPwhq4EP3ch8u3R8QbV7I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Tull , Frank Rowand , Guenter Roeck Subject: [PATCH 4.20 78/80] of: overlay: do not duplicate properties from overlay for new nodes Date: Mon, 4 Feb 2019 11:37:38 +0100 Message-Id: <20190204103630.788254089@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190204103620.287366543@linuxfoundation.org> References: <20190204103620.287366543@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Frank Rowand commit 8814dc46bd9e347d4de55ec5bf8f16ea54470499 upstream. 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 Cc: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- drivers/of/overlay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -393,7 +393,7 @@ static int add_changeset_node(struct ove break; if (!tchild) { - tchild = __of_node_dup(node, node_kbasename); + tchild = __of_node_dup(NULL, node_kbasename); if (!tchild) return -ENOMEM;