Re: [PATCH] drm: fix another race due to BKL removal.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 14 September 2010, Dave Airlie wrote:
> Since module loading was happening under the BKL, and the drm open path took
> the BKL you couldn't race between them. The drm adds the sysfs node before it
> really probably should, i.e. before driver load has completed. Then udev
> creates the device node, and plymouth opens the device before we've completed
> loading the driver. This results in fail.

Not sure what exactly happened, the module loading code never held the BKL,
at least not for a long time.
My guess is that this has something to do with dcdb16740 "drm: Add support
for platform devices to register as DRM devices", which also touches the
code that needs the lock. Maybe that patch or mine just changed the timing
to make an existing race more likely.

Your fix seems fine though. Ideally the drm_global_lock should go away
eventually, since that is also just a hack that is not much better than
the BKL (just more localized), but for now this seems the best solution.

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>

	Arnd
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux