Re: [PATCH 7/7] driver-core : convert semaphore to mutex in structclass

From: Jarek Poplawski
Date: Fri Jan 18 2008 - 02:54:21 EST


On Fri, Jan 18, 2008 at 09:42:25AM +0800, Dave Young wrote:
...
> After digging the class usage code again, I found that the only
> possible double lock place is the class_interface_register/unregister
> in which the class_device api could be called.

OK, but currently after using mostly:
mutex_lock(&parent_class)

and once:
mutex_lock_nested(&parent_class, SINGLE_DEPTH_NESTING)

lockdep mostly thinks these parent classes are 2 different objects,
with only 2 possible levels of nesting, so this parent_class has
to have wrong name (2 parents can't be locked from the same thread,
so maybe it's class_grandparent sometimes?).

Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/