Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp717887pxr; Mon, 11 Apr 2022 05:33:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJzsQ4igRT3uqhzYeUklpesTpY0Ppiwb5sLCreMooj9mnn6PD7wIkCAUnzCQV9PLU6VaP7 X-Received: by 2002:a17:902:7686:b0:156:47a4:fc8f with SMTP id m6-20020a170902768600b0015647a4fc8fmr32522190pll.98.1649680398060; Mon, 11 Apr 2022 05:33:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649680398; cv=none; d=google.com; s=arc-20160816; b=xc8S7/CyLMTOfY4WBdy4i8PPYgXCUTuhVNGfz2TgzfqlPpSfL13twR6/ny1NYpVRP1 UIaZpSIB4qPKqDaNLjLHwfzlGfd8tzPIKhMFLAKgjT1kFnaBLAftDcUEsKWurBYl3cdQ q5gWV3kJPR0bhbTLDiuGatKp6/7n5oIXSqnkCvgsGYz8Jhk70MmDZyB2Y3rEONLZdhXt pNF58kQOVuTXOUBPzockw43nGCI2ZbsUVCPlO867X9xonk3fSTgCEIZkbcBSPaHAsQ1L 57Y40HJstgJ/RFOF6QLzJ+DGnFI3oM+6ChfPU5uG1bt8laDMIoAcqQ5tttFdUGPRhosO 2QSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=aEGMMSoqzQV29Yb3vuyxXwWYzXUyMcWqjEt/8PwjhP4=; b=X0LCsKKQ/d1EdVHJIcHimjVg/I1HIKdfv5T6ddobM/f9F+RMlu9fCpHMqFSeqbJ0pU UBGtaU/LPP0aTYzxS+H/Drf+lcK0foIQ7HX1nc8nA352OvZoSm3PRmwcqdtQGTS4gTNe rmSCmAkUrfvsGOB84r/8aRRj7fkAPYpYhY67+HBEpNdcGW0dkyrqhAczGbg2Bk4m6vKs fZIMmOGyVs688VAeb3U818FpfluQ9fnSsxzPEZD9UbAFPqCZ0Fn/ddEgfzk4fqty0M45 i0sX6A+71aTJVo+PGxi0bmvgUGVKeNr6wU6hwEQnKSUVzl5NeP7zAPlRVk9R53g3JUvD vx1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=f5+kjuwk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id me6-20020a17090b17c600b001cba3085ef9si1661154pjb.27.2022.04.11.05.33.04; Mon, 11 Apr 2022 05:33:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=f5+kjuwk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238381AbiDHRnF (ORCPT + 99 others); Fri, 8 Apr 2022 13:43:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238372AbiDHRnC (ORCPT ); Fri, 8 Apr 2022 13:43:02 -0400 Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7941690FC3; Fri, 8 Apr 2022 10:40:58 -0700 (PDT) Received: by mail-qk1-x72b.google.com with SMTP id b19so5390228qkk.12; Fri, 08 Apr 2022 10:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=aEGMMSoqzQV29Yb3vuyxXwWYzXUyMcWqjEt/8PwjhP4=; b=f5+kjuwksQh4ROVlTCgr6Bmrfuh7tv7d2sKBntQaNA9RkEEG/8YHNYJS8Lm3GaAKLY 6wiVB3nqxEc8RbW6j+ID+7Yg3t/yvgZSEZ4R3D8Bt7rlKw6khDqNF62CGtWSYv3EsoZ5 3JTkkN1Nil0CUHRORoOWuBcWsowiQTlEiM18fOEOvijFXgSVbAnQVgny63DENrr8gyic LZhYITb1UhHZsijwT+h8De5Ur9GSKjlTeynpZdblz186EU5fDuv+IHnfXHyTrtg0m9Rt NhgW4DzGPdP5EEStA/ZyOVWilT+cYDIGy96rU4Yq7PY4AJ72cI9ZwohsK4kgn6s4wkVs GKNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=aEGMMSoqzQV29Yb3vuyxXwWYzXUyMcWqjEt/8PwjhP4=; b=vU2s3vgiveMFdxRRoajOMel5tmtox9AjEi0prK+pL38f6DcTWlRxXj5fp1zQ8iOSec B0i2IOadn/r1Eg+DvxRz/Tl6FY8NUuC6BL8fwbQaUr/ssl6Pll4L3ECX9zKVATS/cb5n La7nxEPBxPJ3CNkTr2kR4Qv0KIA9cY5NE1Cwzo176Yot3xDGzZ+aEnSzOFrSfyJrvTDh jANlpV9IaTjQDWgGvpm7lxn8Xd6OFrgfcseIZCGlIC1wF1Mm4TZUVgMm/wf8zBnru1EW 1TTJqFGaYZa0jGs7Uq5sCrXrYekBJZav2aBwFSyC3KOqxpGwSSNbQTd/iMOsZkDk+6cY r+KQ== X-Gm-Message-State: AOAM530+PWfllESFvAz7ne7JrOw8l3b4y+muR0UVaMmDwykxLLaQWrGF iuoGYUS/xJMhT7LGm1PJDqu8a9vAbDY= X-Received: by 2002:a37:554:0:b0:69b:ef36:cd6f with SMTP id 81-20020a370554000000b0069bef36cd6fmr1454823qkf.129.1649439657667; Fri, 08 Apr 2022 10:40:57 -0700 (PDT) Received: from ?IPV6:2600:1700:2442:6db0:6d2d:3351:3e49:3378? ([2600:1700:2442:6db0:6d2d:3351:3e49:3378]) by smtp.gmail.com with ESMTPSA id h186-20020a376cc3000000b00699c789a757sm9336207qkc.132.2022.04.08.10.40.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Apr 2022 10:40:57 -0700 (PDT) Message-ID: <1ed7ea01-b515-7c0b-4b3e-547d19717deb@gmail.com> Date: Fri, 8 Apr 2022 12:40:56 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 1/1] of: overlay: of_overlay_apply() kfree() errors Content-Language: en-US To: Rob Herring Cc: Pantelis Antoniou , Slawomir Stepien , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Slawomir Stepien , Geert Uytterhoeven , Alan Tull References: <20220408172103.371637-1-frowand.list@gmail.com> From: Frank Rowand In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/8/22 12:34, Rob Herring wrote: > On Fri, Apr 8, 2022 at 12:21 PM wrote: >> >> From: Frank Rowand > > The subject needs a verb. > >> >> Fix various kfree() issues related to of_overlay_apply(). >> - Double kfree() of fdt and tree when init_overlay_changeset() >> returns an error. >> - free_overlay_changeset() free of the root of the unflattened >> overlay (variable tree) instead of the memory that contains >> the unflattened overlay. >> - Move similar kfree()s from multiple error locations to a >> common error path (err_free_tree_unlocked:). > > What about my question/suggestion on the original patch from Slawomir? > I lost track of your email while investigating the problem. I'll go back and look at your suggestion and question. -Frank