Skip to content

Commit 49fd07b

Browse files
committed
fix: update cwd_read to assign vfsmnt correctly
The current code incorrectly assigns vfsmnt during path resolution, causing duplicate or unexpected path prefixes. This commit ensures correct path resolution across different mount types and environments. Signed-off-by: arthur-zhang <happyzhangya@gmail.com>
1 parent c3df31c commit 49fd07b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bpf/process/bpf_process_event.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,7 @@ FUNC_INLINE long cwd_read(struct cwd_read_data *data)
202202
probe_read(&data->dentry, sizeof(data->dentry),
203203
_(&mnt->mnt_mountpoint));
204204
data->mnt = parent;
205-
probe_read(&data->vfsmnt, sizeof(data->vfsmnt),
206-
_(&mnt->mnt));
205+
data->vfsmnt = _(&parent->mnt);
207206
return 0;
208207
}
209208
// resolved all path components successfully

0 commit comments

Comments
 (0)