linux/kernel/locking
Chris Wilson 7d6689df48 locking/lockdep: Fix overflow in presentation of average lock-time
[ Upstream commit a7ef9b28aa ]

Though the number of lock-acquisitions is tracked as unsigned long, this
is passed as the divisor to div_s64() which interprets it as a s32,
giving nonsense values with more than 2 billion acquisitons. E.g.

  acquisitions   holdtime-min   holdtime-max holdtime-total   holdtime-avg
  -------------------------------------------------------------------------
    2350439395           0.07         353.38   649647067.36          0.-32

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20200725185110.11588-1-chris@chris-wilson.co.uk
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-03 11:26:47 +02:00
..
lock_events_list.h
lock_events.c
lock_events.h
lockdep_internals.h
lockdep_proc.c
lockdep_states.h
lockdep.c
locktorture.c
Makefile
mcs_spinlock.h
mutex-debug.c
mutex-debug.h
mutex.c
mutex.h
osq_lock.c
percpu-rwsem.c
qrwlock.c
qspinlock_paravirt.h
qspinlock_stat.h
qspinlock.c
rtmutex_common.h
rtmutex-debug.c
rtmutex-debug.h
rtmutex.c
rtmutex.h
rwsem.c
rwsem.h
semaphore.c
spinlock_debug.c
spinlock.c
test-ww_mutex.c