From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Dave Airlie <airlied@gmail.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: Locking question for DRM
Date: Fri, 23 Apr 2010 11:37:17 +0100 [thread overview]
Message-ID: <20100423113717.1188415d@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <s2l21d7e9971004230324me3de75b0w58a9907999b7872a@mail.gmail.com>
> > and I can't see what makes this safe if the drm_release for the master
> > and a client occur at the same time ?
>
> lock_kernel in drm_release. We probably need to clean that up.
I don't think that works. drm_open_helper doesn't appear to be under the
BKL merely the struct mutex.
> > 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 ?
>
> These ioctls are also under the BKL.
But setmaster can sleep so the BKL is dropped on contention of the
struct_mutex, ditto dropmaster
Alan
next prev parent reply other threads:[~2010-04-23 10:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 10:22 Alan Cox
2010-04-23 10:24 ` Dave Airlie
2010-04-23 10:37 ` Alan Cox [this message]
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=20100423113717.1188415d@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=airlied@gmail.com \
--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®