On 8/24/2010 7:30 AM, Carsten Munk wrote:
This is part 5 of 5 of a patchset implementing the following in MeeGo kernel:
+ * The pvr_dvfs_* interface is needed to suppress a lockdep warning in + * the following situation during a clock rate change: + * On the CLK_PRE_RATE_CHANGE: + * 1. lock A <- __blocking_notifier_call_chain:nh->rwsem + * 2. lock B <- vdd2_pre_post_func:gPVRSRVLock + * 3. unlock A + * + * On the CLK_POST_RATE_CHANGE/CLK_ABORT_RATE_CHANGE: + * 4. lock A + * 5. unlock B + * 6. unlock A + * + * The above has an ABA lock pattern which triggers the warning. This can't + * lead to a dead lock though since at 3. we always release A, before it's + * again acquired at 4.
this looks like complete nonsense to me.... and the "solution" they pick is almost worse than the cure. this code can deadlock... and the person who wrote this is apparently not able to understand what an ABBA deadlock is.
_______________________________________________ MeeGo-dev mailing list [email protected] http://lists.meego.com/listinfo/meego-dev
