[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-20 Thread Andy Whitcroft
On Fri, Apr 20, 2012 at 11:34:43AM +0100, Dave Airlie wrote: > > > > I may be reading things wrong but the initialisation does indeed hold > > drm_global_mutex, but and back when this first occured we would have > > been using kernel_lock() which was at least partially reentrant right? > > Yup if

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-20 Thread Dave Airlie
> > I may be reading things wrong but the initialisation does indeed hold > drm_global_mutex, but and back when this first occured we would have > been using kernel_lock() which was at least partially reentrant right? Yup if we slept with the BKL held we'd have allowed others to get past it, but

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-20 Thread Andy Whitcroft
On Fri, Apr 20, 2012 at 10:40:35AM +0100, Dave Airlie wrote: > I've just revisited this, maybe I'm going insane but why does > drm_global_mutex not stop this? > > drm_get_pci_dev takes drm_global_mutex before calling drm_fill_in_dev > and drm_get_minor. > > Now the fops should be pointing at stu

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-20 Thread Dave Airlie
On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft wrote: > We have been carrying a (rather poor) patch for an issue we identified in > the DRM driver. ?This issue is triggered when a DRM device is initialising > and userspace attempts to open it, typically in response to the sysfs > device added eve

Re: [PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-20 Thread Andy Whitcroft
On Fri, Apr 20, 2012 at 11:34:43AM +0100, Dave Airlie wrote: > > > > I may be reading things wrong but the initialisation does indeed hold > > drm_global_mutex, but and back when this first occured we would have > > been using kernel_lock() which was at least partially reentrant right? > > Yup if

Re: [PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-20 Thread Dave Airlie
> > I may be reading things wrong but the initialisation does indeed hold > drm_global_mutex, but and back when this first occured we would have > been using kernel_lock() which was at least partially reentrant right? Yup if we slept with the BKL held we'd have allowed others to get past it, but

Re: [PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-20 Thread Andy Whitcroft
On Fri, Apr 20, 2012 at 10:40:35AM +0100, Dave Airlie wrote: > I've just revisited this, maybe I'm going insane but why does > drm_global_mutex not stop this? > > drm_get_pci_dev takes drm_global_mutex before calling drm_fill_in_dev > and drm_get_minor. > > Now the fops should be pointing at stu

Re: [PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-20 Thread Dave Airlie
On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft wrote: > We have been carrying a (rather poor) patch for an issue we identified in > the DRM driver.  This issue is triggered when a DRM device is initialising > and userspace attempts to open it, typically in response to the sysfs > device added eve

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Daniel Vetter
On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote: > On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft wrote: > > We have been carrying a (rather poor) patch for an issue we identified in > > the DRM driver. ?This issue is triggered when a DRM device is initialising > > and userspace attem

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Dave Airlie
>> >>> On Thu, Apr 19, 2012 at 5:47 PM, Dave Airlie wrote: >>> > On Thu, Apr 19, 2012 at 5:41 PM, Andy Whitcroft >>> > wrote: >>> >> On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote: >>> >>> On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft >>> >>> wrote: >>> >>> > We have been carryi

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Dave Airlie
On Thu, Apr 19, 2012 at 5:55 PM, Jesse Barnes wrote: > On Thu, 19 Apr 2012 17:52:39 +0100 > Dave Airlie wrote: > >> On Thu, Apr 19, 2012 at 5:47 PM, Dave Airlie wrote: >> > On Thu, Apr 19, 2012 at 5:41 PM, Andy Whitcroft >> > wrote: >> >> On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Dave Airlie
On Thu, Apr 19, 2012 at 5:47 PM, Dave Airlie wrote: > On Thu, Apr 19, 2012 at 5:41 PM, Andy Whitcroft wrote: >> On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote: >>> On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft >>> wrote: >>> > We have been carrying a (rather poor) patch for an is

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Dave Airlie
On Thu, Apr 19, 2012 at 5:41 PM, Andy Whitcroft wrote: > On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote: >> On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft wrote: >> > We have been carrying a (rather poor) patch for an issue we identified in >> > the DRM driver. ?This issue is trigge

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Andy Whitcroft
On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote: > On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft wrote: > > We have been carrying a (rather poor) patch for an issue we identified in > > the DRM driver. ?This issue is triggered when a DRM device is initialising > > and userspace attem

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Dave Airlie
On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft wrote: > We have been carrying a (rather poor) patch for an issue we identified in > the DRM driver. ?This issue is triggered when a DRM device is initialising > and userspace attempts to open it, typically in response to the sysfs > device added eve

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Andy Whitcroft
We have been carrying a (rather poor) patch for an issue we identified in the DRM driver. This issue is triggered when a DRM device is initialising and userspace attempts to open it, typically in response to the sysfs device added event. Basically we allocate the minor numbers making the device a

Re: [PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Andy Whitcroft
On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote: > On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft wrote: > > We have been carrying a (rather poor) patch for an issue we identified in > > the DRM driver.  This issue is triggered when a DRM device is initialising > > and userspace attem

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Andy Whitcroft
We have been carrying a (rather poor) patch for an issue we identified in the DRM driver. This issue is triggered when a DRM device is initialising and userspace attempts to open it, typically in response to the sysfs device added event. Basically we allocate the minor numbers making the device a

Re: [PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Dave Airlie
>> >>> On Thu, Apr 19, 2012 at 5:47 PM, Dave Airlie wrote: >>> > On Thu, Apr 19, 2012 at 5:41 PM, Andy Whitcroft >>> > wrote: >>> >> On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote: >>> >>> On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft >>> >>> wrote: >>> >>> > We have been carryi

Re: [PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Dave Airlie
On Thu, Apr 19, 2012 at 5:55 PM, Jesse Barnes wrote: > On Thu, 19 Apr 2012 17:52:39 +0100 > Dave Airlie wrote: > >> On Thu, Apr 19, 2012 at 5:47 PM, Dave Airlie wrote: >> > On Thu, Apr 19, 2012 at 5:41 PM, Andy Whitcroft wrote: >> >> On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote:

Re: [PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Jesse Barnes
On Thu, 19 Apr 2012 17:52:39 +0100 Dave Airlie wrote: > On Thu, Apr 19, 2012 at 5:47 PM, Dave Airlie wrote: > > On Thu, Apr 19, 2012 at 5:41 PM, Andy Whitcroft wrote: > >> On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote: > >>> On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft > >>>

[PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Jesse Barnes
On Thu, 19 Apr 2012 17:52:39 +0100 Dave Airlie wrote: > On Thu, Apr 19, 2012 at 5:47 PM, Dave Airlie wrote: > > On Thu, Apr 19, 2012 at 5:41 PM, Andy Whitcroft > > wrote: > >> On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote: > >>> On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft >

Re: [PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Dave Airlie
On Thu, Apr 19, 2012 at 5:47 PM, Dave Airlie wrote: > On Thu, Apr 19, 2012 at 5:41 PM, Andy Whitcroft wrote: >> On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote: >>> On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft wrote: >>> > We have been carrying a (rather poor) patch for an issue w

Re: [PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Dave Airlie
On Thu, Apr 19, 2012 at 5:41 PM, Andy Whitcroft wrote: > On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote: >> On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft wrote: >> > We have been carrying a (rather poor) patch for an issue we identified in >> > the DRM driver.  This issue is trigge

Re: [PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Daniel Vetter
On Thu, Apr 19, 2012 at 05:30:03PM +0100, Dave Airlie wrote: > On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft wrote: > > We have been carrying a (rather poor) patch for an issue we identified in > > the DRM driver.  This issue is triggered when a DRM device is initialising > > and userspace attem

Re: [PATCH 0/1] [RFC] DRM locking issues during early open

2012-04-19 Thread Dave Airlie
On Thu, Apr 19, 2012 at 5:22 PM, Andy Whitcroft wrote: > We have been carrying a (rather poor) patch for an issue we identified in > the DRM driver.  This issue is triggered when a DRM device is initialising > and userspace attempts to open it, typically in response to the sysfs > device added eve