From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F16542E3AFB; Tue, 15 Jul 2025 13:46:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752587193; cv=none; b=TDiDq53es1eZ/EEOGNEYdtph9MbPjleEHdLl+f1AzTZM0rIpwbldgYSzJcWajwEQjR26tFWvqDHFsodl5jmdECD8b4WDY8TDsaEvdllVMFq6tUWqIg0W7vswhs7UvipvjliIj9wo7rYTe0+N1SLoWmB3nXAW9r0QIyXvsocxJek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752587193; c=relaxed/simple; bh=mJcSiD9cVE7fXrXapqq7T9f7PibXw8zKEmtLRkQSO6Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j5pntvr58Zx9cvoWJySyZt6lwImYj+JAazeWBwSthHeMFLUlfnXgeYJf/1jytYWFFrA+5+EonPVP+bXvJ4mlhhUnWuYvBm8nutKcEtj72ucVE9NYQJkLlQXTmOkyD92D7Y0SYOwu4gneZ8DTe6S2d58AFz9a8U6nIUGQQEoGKwo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mUOzalCd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mUOzalCd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EAE4C4CEE3; Tue, 15 Jul 2025 13:46:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752587192; bh=mJcSiD9cVE7fXrXapqq7T9f7PibXw8zKEmtLRkQSO6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mUOzalCdkuU8bZJ7FqHWnlzdbu1B5oY4xLbxf5lX/yBithYHhXAoOLOSMRrCtwggb 34AKzKW5jBgSJgUFsw+czZ2n0xPmiV4HbHpH8NzO8INXPjJMj5Ar3AwIbB+9M36sGa RseyTWoGNpz1FA9C3bAiYdJYibC2vJhM7D+TeHlg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kaustabh Chakraborty , Inki Dae Subject: [PATCH 6.1 01/88] drm/exynos: exynos7_drm_decon: add vblank check in IRQ handling Date: Tue, 15 Jul 2025 15:13:37 +0200 Message-ID: <20250715130754.558826544@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250715130754.497128560@linuxfoundation.org> References: <20250715130754.497128560@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kaustabh Chakraborty commit b846350aa272de99bf6fecfa6b08e64ebfb13173 upstream. If there's support for another console device (such as a TTY serial), the kernel occasionally panics during boot. The panic message and a relevant snippet of the call stack is as follows: Unable to handle kernel NULL pointer dereference at virtual address 000000000000000 Call trace: drm_crtc_handle_vblank+0x10/0x30 (P) decon_irq_handler+0x88/0xb4 [...] Otherwise, the panics don't happen. This indicates that it's some sort of race condition. Add a check to validate if the drm device can handle vblanks before calling drm_crtc_handle_vblank() to avoid this. Cc: stable@vger.kernel.org Fixes: 96976c3d9aff ("drm/exynos: Add DECON driver") Signed-off-by: Kaustabh Chakraborty Signed-off-by: Inki Dae Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c @@ -602,6 +602,10 @@ static irqreturn_t decon_irq_handler(int if (!ctx->drm_dev) goto out; + /* check if crtc and vblank have been initialized properly */ + if (!drm_dev_has_vblank(ctx->drm_dev)) + goto out; + if (!ctx->i80_if) { drm_crtc_handle_vblank(&ctx->crtc->base);