From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (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 F220B326D4A for ; Tue, 5 May 2026 09:34:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777973686; cv=none; b=R40pfAtzfs07k80skejfEOW62h6EPUFOmMifdlfsW4emM3/dYCD+Tbr7couRoKpGZmaxyc9LCoyos/7+7j4Lvgjy8JGyK+6zFpnVrWYde/YUzHoUPQhB00XFYKuMB9glmtAmxuCGiR43+uD43sfHACKEXZ49p7ijaNbEIxr8P7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777973686; 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=R0xJv4TmfyaP7EuwUScPl4J5GyA1imJvX2IHGwHHovHd8VTnDs6TdUdxEclSpH61CnWFZWk4KtkyafADcarEQ7shb+MzIkL3OVZ3tI8ZLnHocKi8RyDvOHs5z2Vf8dt2L6n0qlH4ieAndNOg93ysgUWlKn/QOB8hdcL/O+1GASs= 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.172 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: linux-kernel@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