Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5040692rdb; Tue, 12 Dec 2023 17:59:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnPPL1aTMZCCuqlpOPWWiDdsH2dS7mR8uL8F8+NnCp8inlZBnvhDPYaUAvFJXuzsjQUNoM X-Received: by 2002:a05:6808:6541:b0:3ba:f08:6d23 with SMTP id fn1-20020a056808654100b003ba0f086d23mr4565092oib.41.1702432773743; Tue, 12 Dec 2023 17:59:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702432773; cv=none; d=google.com; s=arc-20160816; b=ATp/t6023dDYY3uIBlX0Ujp692O5goXBIt/xW5lnTr3Mt9660hqPCRMzT6Jnc3iIOx 0Mf8DmMGH3nHj6Y5JUa4KuMFMffNDYoDB/5C6aLsJuRBRH71DtuOJnPgZhY9kdZ9QuFd 69+dW3Ba+UpnqpKDWJT50VqRWioOIsA9/cpRNMI40lzIzR01o2Zb8bFXNTG1OO8k8Kvo wDcpYxmQy3jbd17B0q4wXpDMhBULgKBHUoTkRlGdcKCdxi0c2yEy6QA/Uct36ALmyZa4 BowQgVYvixP8PqXIEp8F27UYLWix4ua3COSlVMaNNwZYJt0kSx/6fCoWwqFAJfv5kNwA PzOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=h+rBAEQoN+2M3shJlkzk0yJXe+dflPKE6126HwVLSm4=; fh=uXoL61SBY/Wo2INzslVY3HaJBEx2goGTFRla+HoAlMI=; b=Zw3vqz66+mcc4Xa4SCoURmEW+jTLTP/GQ291ic43E1EVFUWb/JXI1hCcSmpv1xSFDz 0GAvdva/CeeobMbEkVueaymOt2WZQaP7E/0CTGRWzXAUzsPQNRTq1uonqEuNAX7Y/Gv+ wcaVX+/K9vP29rbWrC0J6SQg6TRINFDQjfz3sKzdX0i4zzvlf5IEUiinsMRChML7FfFl bBIoIopvl4iz5y/lpW1RT2SsPyaomSJ6My5w49YxeBmhhHyO5LMcwdyor9bjQGoXhOya GIPApy+Q+ZVIHdzhD7AZI/LJHRzpSUpQLXSG0NQQI9cP4m2EHI1Caf08vdKVndiHBlG/ oPsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=NE5fVrqW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id 19-20020a631753000000b005c668dc242asi8686903pgx.162.2023.12.12.17.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 17:59:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=NE5fVrqW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 0A1648045980; Tue, 12 Dec 2023 17:59:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232805AbjLMB7O (ORCPT + 99 others); Tue, 12 Dec 2023 20:59:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232096AbjLMB7O (ORCPT ); Tue, 12 Dec 2023 20:59:14 -0500 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75D6ABC for ; Tue, 12 Dec 2023 17:59:18 -0800 (PST) Received: from mail-oo1-f72.google.com (mail-oo1-f72.google.com [209.85.161.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 021163F286 for ; Wed, 13 Dec 2023 01:59:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1702432757; bh=h+rBAEQoN+2M3shJlkzk0yJXe+dflPKE6126HwVLSm4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=NE5fVrqWUXRYhsOj4zyOzg2/7QLlal6ases/cSn5rjYT2a59xV8Jio0U3cui45zMk kIvX9WjrG6PJhbTJvs7ZV8nSLMKGWlkrGOB9k9eIcfs5HUSlcUx6JXip8JNBKpP01G 0XEMQoHnAr0+pwR/jFk3B6HVbDelXEpVvdDtWyqh4B833wQbuxVNCkSOcQd7s+IgTT TW7BwUSepkvuV/3RL5y6vNiy0c8F4EE09W2VfncpYjYtlpohA6jOS8qBw4bE9CRzF+ /3yDgVMTR/BtL1g/BSNZBoYFptfkmQhYw7x/BFMHY7GbVeuZGm1zuIPAjnGCho31YB 5AkWlvW/TYNwA== Received: by mail-oo1-f72.google.com with SMTP id 006d021491bc7-58e2b7e4f94so8344229eaf.2 for ; Tue, 12 Dec 2023 17:59:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702432756; x=1703037556; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h+rBAEQoN+2M3shJlkzk0yJXe+dflPKE6126HwVLSm4=; b=TLjaaj90e0TX47w5dRIUynhJ7ZeOFGsdTGsWZVuNWEo/yAVqwMZaDRvGbqIhwuLYkl 9I4d82w5b9d14cm39bOvuKlFVle0ChgmRjbFid3aWXt42ukTjCiYUE5XJhmLGLFwkEYh JwHZGohPpJP5X0RA9sqV5cqqBDv9rim6/7Afdrrc3yB3ImVLTH7kCxXXUGeZihbgahpP Tw/Dh0eqJS2b8ALAR/YwlCg7GjbMtoqs+wk5fyhrGa5YOjZzQIk8Zmu0ls89Mm9wv5Ln qGng43dLCF/K1ad9k6ocCS0HM/p6RPx45+1NQYEIHssWo0jgica85QSvFzsFwVawvlgf qyNw== X-Gm-Message-State: AOJu0YzvbFbPL01YLJ66x0Al28K6vvKLqo2pwyvRjWsUCmW7K7PMr4H0 jaUgagONkTE7gfHalQMwviKAnrNE7duZUEMWNTKz+NrADfuppbzkkOLMMFJnDO8C+Wk4nwuV9fj GoUVHmfuBT6ht2Z2sJnzE6XNTNhw222XS9cIMsqPVmhi9vs2gn79CDznXNg== X-Received: by 2002:a05:6358:27a3:b0:170:17eb:9c45 with SMTP id l35-20020a05635827a300b0017017eb9c45mr9970513rwb.38.1702432755815; Tue, 12 Dec 2023 17:59:15 -0800 (PST) X-Received: by 2002:a05:6358:27a3:b0:170:17eb:9c45 with SMTP id l35-20020a05635827a300b0017017eb9c45mr9970502rwb.38.1702432755499; Tue, 12 Dec 2023 17:59:15 -0800 (PST) MIME-Version: 1.0 References: <20231212064533.233748-1-kai.heng.feng@canonical.com> In-Reply-To: From: Kai-Heng Feng Date: Wed, 13 Dec 2023 09:59:03 +0800 Message-ID: Subject: Re: [PATCH] ASoC: hdac_hda: Fix NULL pointer dereference when hda_pvt is not set To: Kai Vehmanen Cc: lgirdwood@gmail.com, broonie@kernel.org, Jaroslav Kysela , Takashi Iwai , Bard Liao , Pierre-Louis Bossart , Peter Ujfalusi , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 12 Dec 2023 17:59:31 -0800 (PST) Hi, On Tue, Dec 12, 2023 at 8:45=E2=80=AFPM Kai Vehmanen wrote: > > Hi, > > On Tue, 12 Dec 2023, Kai-Heng Feng wrote: > > > Kernel splat can be found on boot: > > [ 7.906438] BUG: kernel NULL pointer dereference, address: 000000000= 0000078 > > [ 7.906449] #PF: supervisor read access in kernel mode > > [ 7.906455] #PF: error_code(0x0000) - not-present page > [...] > > This is caused by attempting to dereference hda_pvt, so check if it's > > NULL before using it. > > > > Fixes: a0575b4add21 ("ASoC: hdac_hda: Conditionally register dais for H= DMI and Analog") > > can you try this fix already merged to Mark's tree (merged on 7th Dec): > > "ASoC: SOF: Intel: hda-codec: Delay the codec device registration" > https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/= ?id=3Dce17aa4cf2db7d6b95a3f854ac52d0d49881dd49 Yes this commit fixes the issue. Thanks! Kai-Heng > > Br, Kai