Thread (16 messages) 16 messages, 3 authors, 2012-12-13

Re: [PATCH 2/5] OMAPFB: simplify locking

From: Ville Syrjälä <hidden>
Date: 2012-12-07 12:53:50
Also in: linux-omap

On Fri, Dec 07, 2012 at 01:55:06PM +0200, Tomi Valkeinen wrote:
Kernel lock verification code has lately detected possible circular
locking in omapfb. The exact problem is unclear, but omapfb's current
locking seems to be overly complex.

This patch simplifies the locking in the following ways:

- Remove explicit omapfb mem region locking. I couldn't figure out the
  need for this, as long as we take care to take omapfb lock.
I suppose the idea with that was that you wouldn't need the global
omapfb lock, and also it was an rwsem so it allowed parallel access to
the mem regions, unless the region size was being changed, in which
case it took the write lock. I can't really remember what the reason
for using an rwsem was, but I suppose there was one at the time.

I think the only correctness issue with your patch is that you're
opening up a race between omapfb_mmap and
omapfb_setup_mem/store_size.

-- 
Ville Syrjälä
Intel OTC
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help