From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9980D606A6BF for ; Wed, 2 Dec 2026 10:11:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=aJp97LF5; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=GPfYN+PD; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=mXY/iV/H DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=Ar7rTl5RUxrOHac/jjMlyZTTV8/eUW9BFEmNyPSUFJw=; b=aJp97LF56Wg50+C/PW3YGhv9Ke ifTX82Uyl1IGt2tWBUeplTCxUKHUtJEtMhbJvj/vNzQW6YFuMCvox943YjreZeJUyvcTDjIcoI/cf 4lM/KersFNiOk31zSwsHqQiio5oflSxEL+c2eaohZbgfiQKe0sGk90tFT0+PNFrY3e3CaKbuGMhv1 cJlSGthRS3qRnaSWHdcldItvwY93gjvDKcom4gmdcK6pbc3HKMooCBQSM0AeOIrJIZPepe5pVba5t xtK7/ihYJqDbrYH3X/a9ZqOQTomwP0yORhpf4+NrLYaGAgUtw3b4GZJahrsLDuoAgEnUf0bMwtjSK kjKcV5Gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYhJ0-0000000B5Hc-2psv; Wed, 02 Dec 2026 10:11:18 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYhIv-0000000B54b-2FqU for linux-amlogic@bombadil.infradead.org; Wed, 02 Dec 2026 10:11:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=hqMSGuBj26UwscbivlLAHNnjUeduQB43CmsZb4rhibM=; b=GPfYN+PDgJP7KWFxRsLKQd/r+w 4Kp8QXQ0qeweGycrD0/+70BmFY17HsfphE/HcxmmZom0UImMZ4iWEVhoJUpxqtTz9K3q2KcGPKDYo oEneZVj1WuvXm2BngQfccKh+j29IPRMEI6pPUofNKG6pEu2FseWqksUV0CECUSFY5IZanZCT24QqG nMa6bSPLTUzEC3gmE48psQWOzdnlLjnZlkabON9qTYhw0WH8Vo2fAbYYlQH9ICESR25VKjhP2LfDU ppXIkjIGrK4UeToQeD58DpiNTxoN29mksCweDmgVslztjacCu+gfs/oAh2qoJpYqTeh1U3jBpB1lJ sSKOf7Cg==; Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by desiato.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYhIq-0000000C8hy-0MwZ for linux-amlogic@lists.infradead.org; Wed, 02 Dec 2026 10:11:11 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4bba5e17728so65202645e9.2 for ; Wed, 02 Dec 2026 02:11:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796206266; x=1796811066; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=hqMSGuBj26UwscbivlLAHNnjUeduQB43CmsZb4rhibM=; b=mXY/iV/H+KClbKR1FsgTHlf/RyBvEqcu1SCa1Ylfr6Nhb/7RXTln6CC3DuDeavnj48 AGD8SpaVMZwzrgXkvvb4RCMRKGPX1rg4JGQCz42pW4rWkfcuKQ9gc4pS5MeAd4TAUlW0 DQpNmXm4ZQnaUhPjz/FW9BrjbQ8KRefpmLhcojRZmK5sfAiqz79EWWvKIJi2Jws3xndI wZhNFS5+WJnFHX/zc0bo5hNsHcOf1gg2T7vlUyI26n5s6tvRZn1UAHLSslqteLQU8af2 1hnNRECmzofAmiEBQkF7/0Tz4xNYUmBBFAhQ9T0iY2xjgmSZTsgOnGuCUYu4HwdNo1Ae j8jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796206266; x=1796811066; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=hqMSGuBj26UwscbivlLAHNnjUeduQB43CmsZb4rhibM=; b=Id8jPtwTxjqd13iO9srfOnLx9wsDc5cRXBGqmHd6vc2N1tdbTBn2slV1/tj+W0iuBc 1dzdkfVSqZoajDH38Uu4Y5J5JIaEU5/4QLv6CZZ6PQ72Znj091oslHf9Kcw4L14P29um BGJW5MrbnvAyCi6gp6PxE0UBLUDNot+ZQBSZsf/As4e0Z7FphDadu5jWh/k5tttnNvuz Q0nDTUnL5jiafFkU2IpjWnyICwQ0S/4ZZ6NMOIFWMpR97y0hfxVQ0xqFoRy8o4K/cm/K 3yFBmeIjeDyEuCLZWk3YYU/sxp9FtvPKmN/wPM3rsaZWFOTODkjx1v1dNEwc6q+d1/Yf 522w== X-Forwarded-Encrypted: i=1; AL+hErFPplTyeGfAvWmPUbvD9eZKGNnewHadT3sjPuqiXLptbmnoxVFWaX66smNI5d4qHnWl4MdmeCQE+epYRler@lists.infradead.org X-Gm-Message-State: APuU4Z8C5FZCGU29hKldYXZ7d07VZh2XWw8rWb+Y1Cg+DSCwmQXb6oQj neBq5rlc8OeG3e/p72ECsLuQU5kx1ixeqzoWi4wS0u9Tmz2BD67YWIS/ X-Gm-Gg: AZFdTZd9h4xt1ERtzXSQsMQCB/VldRs85ydnliM3bnXMHUTgZoXQ6mEuL+4wVIp1btz w5SLW7YrJeMFFKMy4MGhl6khVONkWhyKgjzsqdVaBLMnyRHjr4sUV/HhYDOLwn4OoWZ3b9QsDQb ZmCYKWLeOYV0Ij1GtcLW6IXkLsFWx1nsQiB7umcpEUzFt5if0o9vinxAaM0SCwqIalap14vadwL UMxTVyMMTcq/o6WuByoX5GcGjI1NuZ5IGlREBvZ5qaR7LZ6jInR+cGFjSNOUzrp6bJ12jHcMUob mx1lsv+d9bvvO1VYmO06YDJFSoGc3j7eGCtA+xf+bq0aUGdo45vtOpnUG6wGLPpDRdkwJftOj8/ s9FUz0SMgAN+gPRi7+VB+VCwg+nVoETvLrF7HqokaHQOnswZm4kPwkmXBOS5xfq7eVk2tW1WpNy 6wrPbKCYWxoo+MUfKJfZo9o6vk0ueHAce7B7ddabrEriUJ3MKvTVdh6AyH/d8D0zC4+MsGP9yug x/mf0mQYAUygeUkSgTy1fmx7lQ7gVr1qs07ff/ihkPy2QK7T8BcaeZpWW76UVn0RIsOPoyX8OjK xDlu0sesIIW3trbwj70F7fHJMz391ws3Y7o/J3lAAeyz6LaNK3UbJAmXCvsCeYq3hTIM X-Received: by 2002:a05:600c:470a:b0:4a1:d459:db4b with SMTP id 5b1f17b1804b1-4bb8893071fmr760722505e9.24.1796206266387; Wed, 02 Dec 2026 02:11:06 -0800 (PST) Received: from localhost.localdomain ([79.117.198.103]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb88402ce9sm899268965e9.0.2026.12.02.02.11.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 02:11:05 -0800 (PST) From: Jose Nieto To: Corentin Labbe , Herbert Xu , "David S . Miller" Cc: linux-crypto@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Rob Herring , Krzysztof Kozlowski , Conor Dooley Subject: [PATCH v15 33/35] crypto: amlogic: initialize flow completion before requesting IRQ Date: Wed, 2 Dec 2026 11:10:34 +0100 Message-ID: <20261202101036.116145-13-jnieto.alaber@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261202101036.116145-1-jnieto.alaber@gmail.com> References: <20261202100714.115460-1-jnieto.alaber@gmail.com> <20261202101036.116145-1-jnieto.alaber@gmail.com> X-Archived-By: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_101110_458055_6BB8B004 X-CRM114-Status: GOOD ( 12.71 ) X-Spam-Score: -0.2 (/) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 meson_allocate_chanlist() installs the per-flow interrupt handler with devm_request_irq() before init_completion() runs on that flow. A pending interrupt reaching meson_irq_handler() in that window calls complete() on a zero-initialized completion whose wait-list pointers are still NULL, leading to a NULL pointer dereference. Initialize the completion before enabling the interrupt. Signed-off-by: Jose Nieto --- drivers/crypto/amlogic/amlogic-gxl-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c index a464a8b76211..18c1edad9475 100644 --- a/drivers/crypto/amlogic/amlogic-gxl-core.c +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c @@ -125,6 +125,8 @@ static int meson_allocate_chanlist(struct meson_dev *mc) goto error_engine; } + init_completion(&mc->chanlist[i].complete); + err = devm_request_irq(mc->dev, mc->chanlist[i].irq, meson_irq_handler, 0, "aml-crypto", mc); if (err < 0) { @@ -133,8 +135,6 @@ static int meson_allocate_chanlist(struct meson_dev *mc) goto error_engine; } - init_completion(&mc->chanlist[i].complete); - mc->chanlist[i].engine = crypto_engine_alloc_init(mc->dev, true); if (!mc->chanlist[i].engine) { dev_err(mc->dev, "Cannot allocate engine\n"); -- 2.47.3 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic