mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Stanner <phasta@mailbox.org>
To: "Philipp Stanner" <phasta@kernel.org>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Christian König" <ckoenig.leichtzumerken@gmail.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/sched: Remove useless BUG_ON()
Date: Mon, 14 Sep 2026 18:11:48 +0200	[thread overview]
Message-ID: <c57cd3daf458e1868aa468f6e426ac0220c615a8.camel@mailbox.org> (raw)
In-Reply-To: <20260625120151.1757146-2-phasta@kernel.org>

On Thu, 2026-06-25 at 14:01 +0200, Philipp Stanner wrote:
> BUG_ON() should not be used anymore since it crashes the entire
> kernel.
> Its remaining usage is in drm_sched_job_arm() to check the entity
> pointer. If that pointer is NULL, however, the problem will become
> visible through a respective NULL pointer exception anyways.
> 
> There is no advantage in crashing the kernel as a whole.
> 
> Remove the BUG_ON().
> 
> Signed-off-by: Philipp Stanner <phasta@kernel.org>

Can someone review this?


P.

> ---
>  drivers/gpu/drm/scheduler/sched_main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c
> b/drivers/gpu/drm/scheduler/sched_main.c
> index d2ca01b31ee4..4e1b6e79ae19 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -637,7 +637,6 @@ void drm_sched_job_arm(struct drm_sched_job *job)
>  	struct drm_gpu_scheduler *sched;
>  	struct drm_sched_entity *entity = job->entity;
>  
> -	BUG_ON(!entity);
>  	drm_sched_entity_select_rq(entity);
>  	sched = container_of(entity->rq, typeof(*sched), rq);
>  

      reply	other threads:[~2026-09-14 16:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25 12:01 Philipp Stanner
2026-09-14 16:11 ` Philipp Stanner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c57cd3daf458e1868aa468f6e426ac0220c615a8.camel@mailbox.org \
    --to=phasta@mailbox.org \
    --cc=airlied@gmail.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.brost@intel.com \
    --cc=mripard@kernel.org \
    --cc=phasta@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®