All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: "Daniel Díaz" <daniel.diaz@linaro.org>,
	kv-team <kv-team@linaro.org>,
	"Naresh Kamboju" <naresh.kamboju@linaro.org>,
	dri-devel@lists.freedesktop.org,
	"Arthur Grillo" <arthurgrillo@riseup.net>,
	kunit-dev@googlegroups.com
Subject: Re: [bug report] drm: Warn about negative sizes when calculating scale factor
Date: Fri, 20 Oct 2023 14:55:37 +0300	[thread overview]
Message-ID: <ZTJquc5Gtu2fg4GV@intel.com> (raw)
In-Reply-To: <2ad54714-b1b2-4454-95d4-c46fae4c9404@kadam.mountain>

On Fri, Oct 20, 2023 at 02:39:04PM +0300, Dan Carpenter wrote:
> On Wed, Oct 18, 2023 at 05:17:42PM +0300, Dan Carpenter wrote:
> > drivers/gpu/drm/drm_rect.c
> >    134  static int drm_calc_scale(int src, int dst)
> >    135  {
> >    136          int scale = 0;
> >    137  
> >    138          if (WARN_ON(src < 0 || dst < 0))
> >                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > These days, with automated fuzz testing, this WARN_ON() is problematic.
> > WARN() is considered a kernel bug, and pr_warn() is the hip new way to
> > alert the user about issues.
> 
> Btw, a lot of people (Greg claims it's the majority of Linux users)
> these days have run kernels with panic on warn enabled so that's another
> reason to avoid using WARN_ON() for stuff that it known to be possible.

This is not possible, unless there is a serious bug somewhere else.

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2023-10-20 11:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18 14:17 [bug report] drm: Warn about negative sizes when calculating scale factor Dan Carpenter
2023-10-20 11:39 ` Dan Carpenter
2023-10-20 11:55   ` Ville Syrjälä [this message]
2023-10-20 14:11     ` Dan Carpenter

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=ZTJquc5Gtu2fg4GV@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=arthurgrillo@riseup.net \
    --cc=dan.carpenter@linaro.org \
    --cc=daniel.diaz@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kunit-dev@googlegroups.com \
    --cc=kv-team@linaro.org \
    --cc=naresh.kamboju@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.