public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Matthew Bullock <matthew.bullock@tadpole.com>
To: intel-gfx@lists.freedesktop.org
Subject: oops in i915_driver_irq_handler
Date: Fri, 15 Apr 2011 05:54:30 -0700	[thread overview]
Message-ID: <4DA84006.1030309@tadpole.com> (raw)

Hi,

I've just had an oops in i915_driver_irq_handler. It's a NULL pointer 
dereference at line 1179 in i915_irq.c (the bit that's about to call
READ_BREADCRUMB().

This is on 2.6.38. It's a dual core GM45 machine running a totally 
custom EGL application running directly on KMS with no X.

The system has no local storage so I haven't captured the oops output (I 
have a bad photo if you really want it) but it's very clear where it fails.

The code is:
                 if (dev->primary->master) {
                         master_priv = dev->primary->master->driver_priv;
                         if (master_priv->sarea_priv)
                                 master_priv->sarea_priv->last_dispatch =
                                         READ_BREADCRUMB(dev_priv);
                 }

dev->primary->master is not NULL.
dev->primary->master->driver_priv is NULL.
So reading sarea_priv triggers the oops.

The oops occurred sometime overnight and the owner of the machine is not 
entirely sure what state it was left in. However the most likely is that 
it was repeatedly restarting the application every 30 seconds so would 
have been opening and closing the drm device.

 From very briefly looking at the code it seems that the path through 
drm_release that sets driver_priv to NULL has no locking against the 
irq. Seems to me that the irq handler should also be checking 
driver_priv for NULL to cover this case? Or should the ordering be 
changed higher up so that master gets set to NULL before freeing the 
driver_priv?

I have this same code running on quite a few (20+) identical machines 
and haven't seen this before so I doubt I can reproduce it...

Matthew

                 reply	other threads:[~2011-04-15 13:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4DA84006.1030309@tadpole.com \
    --to=matthew.bullock@tadpole.com \
    --cc=intel-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox