diff options
| author | Linux Build Service Account <lnxbuild@quicinc.com> | 2017-11-03 07:04:48 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-11-03 07:04:47 -0700 |
| commit | fc86e52281ffd5c124f03de495fd52b7c67da491 (patch) | |
| tree | 9601b4c1d7f29752a50235bed2e5d3ad14c47f44 /kernel/locking | |
| parent | 3c586a777ba008573158f6c41e93bf2d5f646054 (diff) | |
| parent | dbad9b8f72fbdf29b2d5f4a3b6be928e02f52862 (diff) | |
Merge "Merge android-4.4@89074de (v4.4.94) into msm-4.4"
Diffstat (limited to 'kernel/locking')
| -rw-r--r-- | kernel/locking/lockdep.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 60ace56618f6..0e2c4911ba61 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -3128,10 +3128,17 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, if (depth) { hlock = curr->held_locks + depth - 1; if (hlock->class_idx == class_idx && nest_lock) { - if (hlock->references) + if (hlock->references) { + /* + * Check: unsigned int references:12, overflow. + */ + if (DEBUG_LOCKS_WARN_ON(hlock->references == (1 << 12)-1)) + return 0; + hlock->references++; - else + } else { hlock->references = 2; + } return 1; } |
