lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s2l21d7e9971004230324me3de75b0w58a9907999b7872a@mail.gmail.com>
Date:	Fri, 23 Apr 2010 20:24:28 +1000
From:	Dave Airlie <airlied@...il.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: Locking question for DRM

On Fri, Apr 23, 2010 at 8:22 PM, Alan Cox <alan@...rguk.ukuu.org.uk> wrote:
>
> 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 ?

lock_kernel in drm_release. We probably need to clean that up.

>
> 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.

So yes its nasty, and we should probably grow a minor lock to protect that.

Dave.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ