Re: [PATCH 1/2] regmap: pass map name to lockdep

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

 



On 12/18/2014 11:34 PM, Lars-Peter Clausen wrote:
On 12/18/2014 10:05 PM, Antti Palosaari wrote:
lockdep complains recursive locking and deadlock when two different
regmap instances are called in a nested order. That happen easily
for example when both I2C client and muxed/repeater I2C adapter are
using regmap. As a solution, pass regmap name for lockdep in order
to force lockdep validate regmap mutex per driver - not as all regmap
instances grouped together.

That's not how it works. Locks are grouped by lock class, the name is
just for pretty printing. The only reason you do not get a warning
anymore is because you have now different lock classes one for configs
with a name and one for configs without a name.

You really need a way to specify a custom lock class per regmap instance
in order to solve this problem.

I looked example for that solution from v4l controls. So it is also wrong?

https://patchwork.linuxtv.org/patch/17262/


Do you think I should change to mutex_lock_nested() as documented in
Documentation/locking/lockdep-design.txt ?

Should these macros used at all:
include/linux/lockdep.h

There is not much documentation, especially how these recursive lock warnings should be silenced.


regards
Antti
--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux