Skip to content

Commit 2795136

Browse files
liutgnulian-bo
authored andcommitted
Fix the failing of cmd "files" for v6.14-rc1 kernel
Kernel commit <58cf9c383c5c> ("dcache: back inline names with a struct-wrapped array of unsigned long") renamed "unsigned char d_iname" into "union shortname_store d_shortname", the same change should be integrated into crash. Without the patch: crash> files files: invalid structure member offset: dentry_d_iname FILE: filesys.c LINE: 3243 FUNCTION: get_pathname_component() [./crash] error trace: 55e532 => 55ea57 => 5f1f31 => 5f1eb3 PID: 1490 TASK: ffff8dd00c4c2900 CPU: 0 COMMAND: "bash" 5f1eb3: OFFSET_verify.part.40+51 5f1f31: OFFSET_verify+49 55ea57: get_pathname_component+69 55e532: get_pathname+636 files: invalid structure member offset: dentry_d_iname FILE: filesys.c LINE: 3243 FUNCTION: get_pathname_component() Signed-off-by: Tao Liu <[email protected]> Reported-by: Anderson Nascimento <[email protected]>
1 parent 2724bb1 commit 2795136

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

filesys.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,6 +2051,9 @@ vfs_init(void)
20512051
MEMBER_OFFSET_INIT(dentry_d_covers, "dentry", "d_covers");
20522052
MEMBER_OFFSET_INIT(dentry_d_name, "dentry", "d_name");
20532053
MEMBER_OFFSET_INIT(dentry_d_iname, "dentry", "d_iname");
2054+
if (INVALID_MEMBER(dentry_d_iname)) {
2055+
MEMBER_OFFSET_INIT(dentry_d_iname, "dentry", "d_shortname");
2056+
}
20542057
MEMBER_OFFSET_INIT(dentry_d_sb, "dentry", "d_sb");
20552058
MEMBER_OFFSET_INIT(inode_i_mode, "inode", "i_mode");
20562059
MEMBER_OFFSET_INIT(inode_i_op, "inode", "i_op");

0 commit comments

Comments
 (0)