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=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 A3DE1C433E3 for ; Mon, 22 Mar 2021 08:09:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A11361969 for ; Mon, 22 Mar 2021 08:09:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229972AbhCVIIx (ORCPT ); Mon, 22 Mar 2021 04:08:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229879AbhCVIIk (ORCPT ); Mon, 22 Mar 2021 04:08:40 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2AB7C061756 for ; Mon, 22 Mar 2021 01:08:39 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id r10-20020a05600c35cab029010c946c95easo8689699wmq.4 for ; Mon, 22 Mar 2021 01:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=b7CN6JdpOmja3Ya9/8A0Yc6qp4xL6xo6CnNKb5MDcgU=; b=Qw9T73UaV1U8h8LxfGhg+9skYAOyd6FhNRHGzS4USWYsbHsCjClsUwuTZe58023L2x jfJ76qnzVXyYwINInQ3FwPaBMCdLhJfnzwcKrLrSutmCMf9CXDZGsElLC8gML9xnUPjw bUOUnZCl2LhHlq7VjJBqOj0h4nRIlhWnfBccMdDByAvmxboyybHI7vFlZmiKIn+SkhZt 9yWNmGwUZBtkyeg+8y6P+CFg6/7TVQDcZYo6vKNR5TLFVUFr3L7JoLULclDYO+tLcNsX TQQYvgSAnn3l1yzRKXJDsmmFU2xK4XLnD4D1Nc59SPi5RB/isg2iMmCK1pqeopAmq0Ql Dk0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=b7CN6JdpOmja3Ya9/8A0Yc6qp4xL6xo6CnNKb5MDcgU=; b=UaFmi5SujkBMnBSA0sdj2sBBS98Kgf1IQHrJU2kgYsUz+I+xo3JXgwPQR3JcAs5k+u HSu3hiBVMSp3de399PCwrggOMvok0La2JrLhrDTV0ax/qZVHzEOZpc/3jx6XFfRf6LSA e7T9fr3mjPCnuhlrtOLdNoCGaRycwpIag/p4hqEr/PyiD+mR3Y+/bE/nhG5Rrp+Fm8N5 KNMSyHFJ/wfNyQY5I5fBfrSYX5Qh4278vJPc9vp6M9NzyhY9KK+QQ9Qn/q+VBJgp0Vfk zHNhQA3KjXO/4eOw+Fc4+40Bd20+F32fSLDRNDaVoTBaWAtr2fK97Z2gMVgb/S++Srkg RvQQ== X-Gm-Message-State: AOAM530RUZ4syj87LO8NQqsSHd6gGeJz8pq4aZZubdghZpsBwMm6DEZJ RKsd55n9CQg0n2gNMwrsWlLyT3pSOcG07g== X-Google-Smtp-Source: ABdhPJz2mztkkc3xYlJs3i61gDWH1UuGnnW5WMrLPF7qAO52KtghzeIEso0c8MS13TDrtALhC7NbYQ== X-Received: by 2002:a05:600c:2cd8:: with SMTP id l24mr14511400wmc.88.1616400518535; Mon, 22 Mar 2021 01:08:38 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:d8b:d5f9:2138:169c? ([2a01:e34:ed2f:f020:d8b:d5f9:2138:169c]) by smtp.googlemail.com with ESMTPSA id v7sm16067242wme.47.2021.03.22.01.08.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Mar 2021 01:08:38 -0700 (PDT) Subject: Re: [PATCH] thermal/drivers/cpuidle_cooling: Fix use after error To: Viresh Kumar Cc: Dan Carpenter , Amit Daniel Kachhap , Javi Merino , Zhang Rui , Amit Kucheria , "open list:THERMAL/CPU_COOLING" , open list References: <20210319202522.891061-1-daniel.lezcano@linaro.org> <20210322032946.jstyrnc6dctq4fzj@vireshk-i7> From: Daniel Lezcano Message-ID: Date: Mon, 22 Mar 2021 09:08:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210322032946.jstyrnc6dctq4fzj@vireshk-i7> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/03/2021 04:29, Viresh Kumar wrote: > On 19-03-21, 21:25, Daniel Lezcano wrote: >> When the function successfully finishes it logs an information about >> the registration of the cooling device and use its name to build the >> message. Unfortunately it was freed right before: >> >> drivers/thermal/cpuidle_cooling.c:218 __cpuidle_cooling_register() >> warn: 'name' was already freed. >> >> Fix this by freeing after the message happened. >> >> Fixes: 6fd1b186d900 ("thermal/drivers/cpuidle_cooling: Use device name instead of auto-numbering") > > Why not merge this with the Fixes patch itself since it isn't there in Linus's > tree yet ? > > Or is your branch strictly immutable ? Hi Viresh; The changes follow the path: testing -> linux-next -> next The branch next is never rebased. The patch above reached it. This is notified by the thermal-bot [1]. -- Daniel [1] https://lore.kernel.org/linux-pm/20210314111333.16551-3-daniel.lezcano@linaro.org/T/#ma257519efc70ee60faca47dbd458b05de5449bf8 -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog