Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4887396pxb; Thu, 14 Oct 2021 14:06:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUJuA89tSt8ouj0UIK2wKDfKXfaUXdPvM51BnFPYaGo5GXt8qye9ly7ozcICrflBPZa633 X-Received: by 2002:a17:906:2b90:: with SMTP id m16mr1769033ejg.344.1634245599720; Thu, 14 Oct 2021 14:06:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634245599; cv=none; d=google.com; s=arc-20160816; b=In+cjkOU6chn8ynaY8PO1DUk9onOmPVbe6018euhzBBr9ItfJCwX4Sz6LDG7x0y+0l y2eqehXQL2mdgcSFgeUcwQxz5QakvJDqxJowFkqaxyCKb4qe/flEnfLDdkzv2iiVOFNS +rdKirQvV6BumIv4QW+i6MzyZLDUMtCj/OKvHQokXCG6LDO2sMm7R7skt29mPlUbCpff 50MgfX5ZLqyll+4AaihrKxSiR6DSBhlxRFwEr0Xevm4ttDtjAuGqsLT6r8xxdbwp3/0R ZnLLRARAzLn2Xx0uJu5mrN9qtCSzEPUgEX51+nJnffFzVMb7wmSrdJ234/yH6FUKZWnS WcAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nCjSrgHZmKOVAdrKCnmUBpdugUK0T0BY++sW/F6Q1jo=; b=jdbKDTSbQY45Rl4P5E/C2L2grvrEkQK8xf7k/qckc9e3UHvglu3omdPbC/sKJ229hA PTqXEDJyGvdpKD0hRtnWuV56GJ6IKN5Nl3C3WQAX/HR5g2VEirgg2ulTit1N/iwO1Jy6 uwEMHDinS7fSz/wQjkbeoEat4zreb5qlt2vtHuHlueM7YHKNyguAbkssWCov2NvKZioa gQAobIS3cehCeVnvSIWsWr0TJnojfPVYbFWwpY0yPuVhigtArcPRh4apFn4FfsktYgT4 /+LV73m8oagNgfk74ru24vW3nK/vjFET0nKolN/kCe996fwcphARQgZ8vLHqqcz5LdiB m5hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=aK8KU6bw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si5048085edb.568.2021.10.14.14.06.15; Thu, 14 Oct 2021 14:06:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=aK8KU6bw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231715AbhJNP5L (ORCPT + 99 others); Thu, 14 Oct 2021 11:57:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231652AbhJNP5L (ORCPT ); Thu, 14 Oct 2021 11:57:11 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 581A1C061570 for ; Thu, 14 Oct 2021 08:55:06 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id ls14-20020a17090b350e00b001a00e2251c8so5076137pjb.4 for ; Thu, 14 Oct 2021 08:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nCjSrgHZmKOVAdrKCnmUBpdugUK0T0BY++sW/F6Q1jo=; b=aK8KU6bwWTdisuYtuFQyuEhM4tDiueBvfPud37Z7IBLRRvNGmoFkSb9IWCBeKGup/S S8T6JZ3m8e4c76oFVYz4+wqBfxSg7Esz0qiMhk77BRzNvIZ4E/7KGvS3BvaOMpr+HQeM rwu2dy7yl6nkFdM7oU3r9oBb5TOfOF4Nj+P/6mgZlOVm70JnHS1jDYZBqYO1IxjgNcOY z/Hlpn5O9FDrc0Yl+IfjCrlETo+ThsRRURqAh/gXuO22p7zjU3JTV8UFvZeT6ZlehHS3 yU5N+I6Wld6ZgvtXVKrMPIAB2g9DuTbMw+5HlQsQ2AtzVExFO7QjZkKONlJc2uucIVih FrRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nCjSrgHZmKOVAdrKCnmUBpdugUK0T0BY++sW/F6Q1jo=; b=L6zZC6vTgQ3wNWBy3bvVvlMj+fwBjGdcxwCKbhUp1/jCh6Ht0vEUfPRVNBDsk9QMca yYXEv1Lw/r0heV+7XxdGhu9/9xIFBRc8VjCQhmTFH457blKhmxgjrZGWHS6utzmSP6wl 0Y/QV/1L/S0UwnxTljrAQrUGNy7pzyLIkpRonGiu9vhJyPw5nlaAzuTDgSGzdtm5Wsnc lCDPVItcWFUnI9TGU2LZBD+oXsjuHzcbWb8heHxgf7thIksEDKDUWvrDmKFORNtDG3VX Tg1jhHTqmoRK8ROuSxA/ZDIH7YMMgd1pBdx9427s1AEko4HBqiItDJCLMhnuSI4rUkkQ j21g== X-Gm-Message-State: AOAM530ilBlvex4oT8VtsE6Gxp14Y/uhhvO+SeJ2pGbqSP5O5CEr3qlz e4G8SiujPepSjxEns1aBUIE7Ag== X-Received: by 2002:a17:902:b583:b0:13d:e495:187a with SMTP id a3-20020a170902b58300b0013de495187amr5688436pls.9.1634226905538; Thu, 14 Oct 2021 08:55:05 -0700 (PDT) Received: from google.com ([2401:fa00:1:10:1564:8387:11bc:4e82]) by smtp.gmail.com with ESMTPSA id h1sm3058100pfh.183.2021.10.14.08.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Oct 2021 08:55:05 -0700 (PDT) Date: Thu, 14 Oct 2021 23:55:02 +0800 From: Tzung-Bi Shih To: Fei Shao Cc: Jassi Brar , Chun-Kuang Hu , Jassi Brar , Matthias Brugger , "jason-jh.lin" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v2 2/2] mailbox: mtk-cmdq: Fix local clock ID usage Message-ID: References: <20211014120352.1506321-1-fshao@chromium.org> <20211014120352.1506321-3-fshao@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211014120352.1506321-3-fshao@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 14, 2021 at 08:03:52PM +0800, Fei Shao wrote: > In the probe function, the clock IDs were pointed to local variables > which should only be used in the same code block, and any access to them > after the probing stage becomes an use-after-free case. > > Since there are only limited variants of the gce clock names so far, we > can just declare them as static constants to fix the issue. > > Fixes: 85dfdbfc13ea ("mailbox: cmdq: add multi-gce clocks support for > mt8195") > Signed-off-by: Fei Shao Reviewed-by: Tzung-Bi Shih