Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ed46cb3 authored by Prateek Sood's avatar Prateek Sood Committed by Gerrit - the friendly Code Review server
Browse files

lockdep: suppress extra lockdep logging



suppress lockdep locking to avoid console flooding
resulting watchdog bite.

Change-Id: I0b3a56d3541cdf03872709731c34aef8d177c0da
Signed-off-by: default avatarPrateek Sood <prsood@codeaurora.org>
parent 23483948
Loading
Loading
Loading
Loading
+20 −7
Original line number Diff line number Diff line
@@ -3691,7 +3691,9 @@ static int __lock_downgrade(struct lockdep_map *lock, unsigned long ip)
	curr->lockdep_depth = i;
	curr->curr_chain_key = hlock->prev_chain_key;

	if (lockdep_logging_off())
		WARN(hlock->read, "downgrading a read lock");

	hlock->read = 1;
	hlock->acquire_ip = ip;
	hlock->acquire_ip_caller = lockdep_walk_stack(ip);
@@ -3745,6 +3747,7 @@ __lock_release(struct lockdep_map *lock, int nested, unsigned long ip)
	if (hlock->instance == lock)
		lock_release_holdtime(hlock);

	if (lockdep_logging_off())
		WARN(hlock->pin_count, "releasing a pinned lock\n");

	if (hlock->references) {
@@ -3824,7 +3827,9 @@ static struct pin_cookie __lock_pin_lock(struct lockdep_map *lock)
		}
	}

	if (lockdep_logging_off())
		WARN(1, "pinning an unheld lock\n");

	return cookie;
}

@@ -3845,6 +3850,7 @@ static void __lock_repin_lock(struct lockdep_map *lock, struct pin_cookie cookie
		}
	}

	if (lockdep_logging_off())
		WARN(1, "pinning an unheld lock\n");
}

@@ -3860,18 +3866,25 @@ static void __lock_unpin_lock(struct lockdep_map *lock, struct pin_cookie cookie
		struct held_lock *hlock = curr->held_locks + i;

		if (match_held_lock(hlock, lock)) {
			if (WARN(!hlock->pin_count, "unpinning an unpinned lock\n"))
			if (!hlock->pin_count) {
				if (lockdep_logging_off())
					WARN(1, "unpinning an unpinned lock\n");
				return;
			}

			hlock->pin_count -= cookie.val;

			if (WARN((int)hlock->pin_count < 0, "pin count corrupted\n"))
			if ((int)hlock->pin_count < 0) {
				if (lockdep_logging_off())
					WARN(1, "pin count corrupted\n");
				hlock->pin_count = 0;
			}

			return;
		}
	}

	if (lockdep_logging_off())
		WARN(1, "unpinning an unheld lock\n");
}