mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-16 18:26:42 +00:00
perf: net_dropmonitor: Fix symbol-relative addresses
commit 5a1e99dd2028e00998d42029be86835d8ef4a46e upstream. The comparison between traced and symbol addresses is backwards: if the traced address doesn't exactly match a symbol (which we don't expect it to), we'll show the next symbol and the offset to it, whereas we should show the previous symbol and the offset from it. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c86d7a51ff
commit
000a4c4f0d
@ -40,9 +40,9 @@ def get_kallsyms_table():
|
||||
|
||||
def get_sym(sloc):
|
||||
loc = int(sloc)
|
||||
for i in kallsyms:
|
||||
if (i['loc'] >= loc):
|
||||
return (i['name'], i['loc']-loc)
|
||||
for i in kallsyms[::-1]:
|
||||
if loc >= i['loc']:
|
||||
return (i['name'], loc - i['loc'])
|
||||
return (None, 0)
|
||||
|
||||
def print_drop_table():
|
||||
|
Loading…
x
Reference in New Issue
Block a user