Skip to content

Commit e6d3e65

Browse files
iostapyshynakpm00
authored andcommitted
scripts: gdb: vfs: support external dentry names
d_shortname of struct dentry only reserves D_NAME_INLINE_LEN characters and contains garbage for longer names. Use d_name instead, which always references the valid name. Link: https://lore.kernel.org/all/[email protected]/ Link: https://lkml.kernel.org/r/[email protected] Fixes: 79300ac ("scripts/gdb: fix dentry_name() lookup") Signed-off-by: Illia Ostapyshyn <[email protected]> Tested-by: Florian Fainelli <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Cc: Al Viro <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Jan Kara <[email protected]> Cc: Jan Kiszka <[email protected]> Cc: Kieran Bingham <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 10d04c2 commit e6d3e65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/gdb/linux/vfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def dentry_name(d):
2222
if parent == d or parent == 0:
2323
return ""
2424
p = dentry_name(d['d_parent']) + "/"
25-
return p + d['d_shortname']['string'].string()
25+
return p + d['d_name']['name'].string()
2626

2727
class DentryName(gdb.Function):
2828
"""Return string of the full path of a dentry.

0 commit comments

Comments
 (0)