[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <95c2ecd1b370d917cf84afbf3120134c0e2d85d3.camel@mailbox.org>
Date: Wed, 12 Nov 2025 13:09:05 +0100
From: Philipp Stanner <phasta@...lbox.org>
To: Tvrtko Ursulin <tursulin@...ulin.net>, Philipp Stanner
<phasta@...nel.org>, Matthew Brost <matthew.brost@...el.com>, Christian
König <ckoenig.leichtzumerken@...il.com>, Maarten
Lankhorst <maarten.lankhorst@...ux.intel.com>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] drm/sched: Don't crash kernel on wrong params
On Wed, 2025-11-12 at 09:46 +0000, Tvrtko Ursulin wrote:
>
> On 12/11/2025 09:18, Philipp Stanner wrote:
> > drm_sched_job_arm() just panics the kernel with BUG_ON() in case of an
> > entity being NULL. If the entity is NULL, subsequent accesses will crash
> > the particular CPU anyways with a NULL pointer exception backtrace.
> >
> > Remove the BUG_ON().
> >
> > Signed-off-by: Philipp Stanner <phasta@...nel.org>
> > ---
> > Changes in v2:
> > - Drop BUG_ON() instead of replacing it. (Tvrtko)
>
> The option of removing the BUG_ON was conditional on brainstorming a bit
> whether we think the null pointer dereference is the worst that can
> happen or not.
>
> Other option was "WARN_ON_ONCE() return" in arm and push.
>
Maybe even WARN_ON() is OK to make it noticable.
I mostly care about getting rid of BUG_ON().
P.
Powered by blists - more mailing lists