Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4356492pxb; Thu, 14 Oct 2021 03:48:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLol1SAitFhewqzM0AvSjx7bJ3uXXMVB/U7M33UII1qFvYUw7bl4I+wnRtMK6Myd3zSDNI X-Received: by 2002:aa7:9f05:0:b0:44c:619e:87da with SMTP id g5-20020aa79f05000000b0044c619e87damr4403818pfr.42.1634208531090; Thu, 14 Oct 2021 03:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634208531; cv=none; d=google.com; s=arc-20160816; b=i5k1DaGx3HfL0S8FDrxCKAXrvQuK20hqTgueUGpWKZglbF4gHdMX0CbjxVcWUwHKM4 6U11PP+eFEo8T+riDzJ/eY30oHb553lldP/evLsgwe3PNcXor0q1TO/Th6+BP9nYaKUN 8qAHcbnsWLhE41/Fjpz0iO26tE+AOkyD05aexLQtUWZUmT+ssVUZc8MQ4rmoZkYP6AUe 7RBlDKPOmthAbykd7wRNTRwbu87F2hIOQxN0j2OLTKVkNZmfGzQWSS7K6fWdD9lKYu31 1ERqQY/KoXB5qbEosq0pFUROumyglXoRUIlxKJGTi2TlADlvS4k44H/CZACDIcK9UNAa j5sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=NDHFPubGokMv610+PS+/OMv3n5xorR0TmYr48ehh8fQ=; b=chIhDEvhsw8R2LW35uMeTkeIMWw6dDNloiQ+O/rUhso80UaDgxr6/eT7M3y/lr0F9V wtKFZ+HvS+NCiqfXAZI5Yz1xE7yX9baLQJNDS57O8KmGyJTHqvY3EtHVZGRa9sUhRTKh DpuLVL1zOlKHce539F8YdgVDOOYL6lRc8yoyMhbYTd/lPYRpb3I2U91kQfFgTLu8fHSm CK5KTZRt3kzXiSl1rJ7Qh/i9R5jA4qtMp3dKbBcduVr75RvMC9YQYdsfubhavdz+JZaO we5mXvnQwae8DDEr+Pcv0Zaiiv3hIy2PIUjQXyCTOHPv3nyO8eyspyZHPKQQAsVgC3fG znCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=bjDwtXzp; 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 s4si3713756pfk.108.2021.10.14.03.48.34; Thu, 14 Oct 2021 03:48:51 -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=bjDwtXzp; 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 S230142AbhJNKtS (ORCPT + 99 others); Thu, 14 Oct 2021 06:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbhJNKtR (ORCPT ); Thu, 14 Oct 2021 06:49:17 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B578C061570 for ; Thu, 14 Oct 2021 03:47:13 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id n11so3902318plf.4 for ; Thu, 14 Oct 2021 03:47:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NDHFPubGokMv610+PS+/OMv3n5xorR0TmYr48ehh8fQ=; b=bjDwtXzpCqnuSRQZD6MOVaavAzBjpwMAnFWtZemyDCR5/A9nCz9VyYcMaO+PuwyUB2 2tMBe1RcEWt5Q03VT9my7r6i2EBdY/5bAlqbKH7PY/2jLvuX2tFXomJGmStjyAq9i6bu 8JcfH5f5qePcEyBTZgoN65wnmQFirKACUFYTIGeTRf+XUSNoH4GTJ+qDf/As69ADE09P Wi5DqwNT7QiiANRIgoWexPCgUXWG6FJUAkuqEKtPyl8aRkeJjfeRONBZvF/9H4egUOm4 HRpezQZy5paMRwQKhA2Zu/774G3QklrNqWJ9+OdMPfUhucGS9lhOeUdDoOtq5IeyJqIW yuHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NDHFPubGokMv610+PS+/OMv3n5xorR0TmYr48ehh8fQ=; b=v/JiJRzL1ajpDCGaxCcsI6jBwWhU1O9gJNnz7rjn6S1vsHbq7cC0Wk7hUBSA0MLLET oMX0Z7Ay1IGcfkSyrevNlWf+OwLpYFY1+C32wV05T7AAXTEZla4oqtC1ZsPNp8Kc8daD jmJVsTGjkyCUo+pMz1WFcKatsLlkL+SbErK0YVtH+Sd0JFEZoknmZ6iSPSNhV0Gjcv2h ulj394mC8XArM8z5jQ1ErV5CjsNK22FSvSphHRwBZvgqoRSfkGBviWfgq5IU9DK/4gcB xRKP3atA9WqluZi8ArnLPdswtlsVy3JlLrMTT+vnZoT/c0e7fKGmARga4VCziAGqn6A6 iy6A== X-Gm-Message-State: AOAM532gnSN+j4DDjs+U2GLsC9zlX2jkcOm9F5ueVUgSJwo3jEOvho0M krpDEiVqEAv5GVCAwA9dAMZGjpawNEZqGU1L4KulOg== X-Received: by 2002:a17:902:6b01:b0:13e:50bb:790f with SMTP id o1-20020a1709026b0100b0013e50bb790fmr4251618plk.42.1634208432237; Thu, 14 Oct 2021 03:47:12 -0700 (PDT) MIME-Version: 1.0 References: <20211014093112.3852491-1-fshao@chromium.org> In-Reply-To: <20211014093112.3852491-1-fshao@chromium.org> From: Tzung-Bi Shih Date: Thu, 14 Oct 2021 18:47:01 +0800 Message-ID: Subject: Re: [PATCH 1/2] mailbox: mtk-cmdq: Validate alias_id on probe 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 14, 2021 at 05:31:10PM +0800, Fei Shao wrote: > of_alias_get_id() may return -ENODEV which leads to illegal access to > the cmdq->clocks array. > Adding a check over alias_id to prevent the unexpected behavior. > > Fixes: 85dfdbfc13ea ("mailbox: cmdq: add multi-gce clocks support for > mt8195") > Signed-off-by: Fei Shao Reviewed-by: Tzung-Bi Shih