Re: [PATCH] drm: Take mmap_sem up front to avoid lock order violations.

2009-02-18 Thread Wang Chen
k...@bitplanet.net said the following on 2009-2-19 0:02: > From: Kristian Høgsberg > > A number of GEM operations (and legacy drm ones) want to copy data to > or from userspace while holding the struct_mutex lock. However, the > fault handler calls us with the mmap_sem held and thus enforces the

Re: [PATCH] drm: Fix lock order reversal between mmap_sem and struct_mutex.

2009-02-18 Thread Wang Chen
Eric Anholt said the following on 2009-2-18 8:59: > The basic problem was > mmap_sem (do_mmap()) -> struct_mutex (drm_gem_mmap(), i915_gem_fault()) > struct_mutex (i915_gem_execbuffer()) -> mmap_sem (copy_from/to_user()) > > We have plenty of places where we want to hold device state the same > (s