mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Dave Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Locking question for DRM
Date: Fri, 23 Apr 2010 11:22:22 +0100	[thread overview]
Message-ID: <20100423112222.67cfcbb2@lxorguk.ukuu.org.uk> (raw)


Various bits of the DRM deal with minor->master:

In the case of the open helper its protected by the struct mutex.

In the release path it's protected on some paths, but not this one ...

     /* if the master has gone away we can't do anything with the lock */
        if (file_priv->minor->master)
                drm_master_release(dev, filp);

and I can't see what makes this safe if the drm_release for the master
and a client occur at the same time ?

The setmaster/dropmaster ioctl seems similar - the various conditional
checks are not protected from parallel changes occuring during their
execution.

Is this a bug or is something clever afoot ?

Alan

             reply	other threads:[~2010-04-23 10:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-23 10:22 Alan Cox [this message]
2010-04-23 10:24 ` Dave Airlie
2010-04-23 10:37   ` Alan Cox
2010-04-23 10:44     ` Dave Airlie
2010-04-23 11:00       ` Alan Cox

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=20100423112222.67cfcbb2@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®