lkml.org 
[lkml]   [2012]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 0/1] [RFC] DRM locking issues during early open
From
>
> 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 also I introduced the global mutex in pci a while back

commit b64c115eb22516ecd187c74ad6de3f1693f1dc7b
Author: Dave Airlie <airlied@redhat.com>
Date: Tue Sep 14 20:14:38 2010 +1000

drm: fix race between driver loading and userspace open.

Not 100% sure this is due to BKL removal, its most likely a combination
of that + userspace timing changes in udev/plymouth. The drm adds the sysfs
device before the driver has completed internal loading, this causes udev
to make the node and plymouth to open it before we've completed loading.

The proper solution is to delay the sysfs manipulation until later
in loading
however this causes knock on issues with sysfs connector nodes, so
we can use
the global mutex to serialise loading and userspace opens.

Reported-by: Toni Spets (hifi on #radeon)
Signed-off-by: Dave Airlie <airlied@redhat.com>

by a while I mean nearly 1.5 yrs ago, with the intent of fixing it this way.

Dave.


\
 
 \ /
  Last update: 2012-04-20 12:37    [from the cache]
©2003-2011 Jasper Spaans