All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: drm/atomic: track bitmask of planes attached to crtc
Date: Thu, 27 Nov 2014 23:04:11 +0300	[thread overview]
Message-ID: <20141127200411.GD4911@mwanda> (raw)
In-Reply-To: <20141127171130.GZ32117@phenom.ffwll.local>

On Thu, Nov 27, 2014 at 06:11:30PM +0100, Daniel Vetter wrote:
> btw not sure whether checker should just look through WARN_ON, we have
> lots of places where we've historically screwed up and added a WARN_ON +
> early return to make sure we'll in the future somewhat recover. This is
> really important for gfx since at boot-up (due to fbcon locking bonghits)
> the entire intial modeset is run with console_lock held. And that's a few
> 10k lines of code depending upon platform :(
> 
> So we absolutely have to handle failures robustely, but if checkers assume
> that it's ok to pass crap caught by WARN_ONs around then that's might
> reduce checker usefulness quite a bit.

If you do:

	if (WARN_ON(xxx))
		return -ESOMETHING;

Then that's important because it affects code flow and Smatch does the
right thing, but if it's:

	WARN_ON(xxx);

then Smatch ignores that.  I guess I could hack it so WARN_ON() was
treated like BUG_ON()...

> >    251          if (!plane_state)
> >    252                  return ERR_PTR(-ENOMEM);
> >    253  
> >    254          state->plane_states[index] = plane_state;
> 
> This statement here should make sure that drm_atomic_state_free cleans
> everthing up. So I still don't see a leak ... where does the checker see
> one?

Oh.  The checker doesn't complain, that was just me looking at the code.
I see my mistake now.

regards,
dan carpenter

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-11-27 20:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27  6:41 drm/atomic: track bitmask of planes attached to crtc Dan Carpenter
2014-11-27  9:55 ` Daniel Vetter
2014-11-27 15:54   ` Dan Carpenter
2014-11-27 17:11     ` Daniel Vetter
2014-11-27 20:04       ` Dan Carpenter [this message]
2014-11-28 10:39         ` Daniel Vetter

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=20141127200411.GD4911@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.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.