From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 B2C843290A9 for ; Tue, 5 May 2026 09:34:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777973696; cv=none; b=XQju0WkVpywYFK6FuW/PWdr9/bUxhktP1ElKtDLElO9WWqIgOSivaV2RDkVTW/U21NAPcr6GUAQqP4GGFY/hT72ZhEZjfLtD9sbGQDQgnvba3mUyF/68J/J7XE8PUTTlCBKl4bH6+2U9/LjuiZE7XUlPed4sr7VfEk1JEkpkfE8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777973696; c=relaxed/simple; bh=5/f+PuTgj2epI8CtVBSkOBeeYpHhn9gfhcLMmWMiuNw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FWcpwXR9bX0tsMW16HigpbyXqd9ZCGNyjspj9av5Bi1ITFsjLAqQRfniqinWlw8n/4kBXqq8qZtxj9T8tvrVdaXlSp+WrFsofX7YZvVf8mzpebx1Q2TKSjancfKcPEU4QYN3jSO5H+kgOEQJlr3CLyU8OIwlpEbSDvtzEIjLSpQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=KRRQ3dlW; arc=none smtp.client-ip=91.218.175.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="KRRQ3dlW" Date: Tue, 5 May 2026 11:34:36 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1777973681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CESp6uetEB7khEa9r53J2U2W+2MpllmP1Ap/FFA1vfs=; b=KRRQ3dlWz78ws2rS5TZAMUbrlgY9EF+6HoTPcSO54Vmtw0edRpBn+BZIUR4CiEkUvz/TaU Z2WBOQtcs9xhEvsQrp9OltCN10CSR148F1dMwivvAjeyHe/ZYKL/wWINr6ojccNRI2Lwsp RYbwLicxL1uTYheor8rGgnBSWWodjqs= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Thorsten Blum To: Dave Stevenson Cc: Maxime Ripard , =?iso-8859-1?Q?Ma=EDra?= Canal , Raspberry Pi Kernel Maintenance , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Eric Anholt , stable@vger.kernel.org, Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/vc4: fix NULL dereference in vc4_hvs_unbind Message-ID: References: <20260502121251.39206-3-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT Hi Dave, On Tue, May 05, 2026 at 09:54:53AM +0100, Dave Stevenson wrote: > Hi Thorsten > > On Sat, 2 May 2026 at 13:13, Thorsten Blum wrote: > > > > With 'dtoverlay=vc4-kms-v3d,noaudio' and 'hdmi=off' on Raspberry Pi, > > Mainline doesn't use overlays, so this description isn't valid. > > Which generation of Pi are you using? Whilst they all share the vc4 > driver, the functionality associated differs. If you're disabling HDMI > (and HDMI audio), which display outputs are you using? It's a Pi 500 currently running headless, which is why I turned audio and HDMI off. I ended up using: dtparam=audio=off #dtoverlay=vc4-kms-v3d hdmi=off This prevents the vc4 and snd modules from loading and works for me. > > unloading the vc4 module calls vc4_hvs_unbind() with > > dev_get_drvdata(master) returning NULL. > > > > Return early when 'drm' is NULL before converting it to 'vc4' and before > > dereferencing 'vc4->hvs', preventing a kernel oops. > > That leaves things allocated and clocks running, so bailing out isn't a fix. > I'll have a look to see why dev_get_drvdata is returning NULL. Yes, I realized there are probably other things that need to be fixed. However, the defensive NULL check avoided the kernel oops for me. Thanks, Thorsten