Skip to content

Commit

Permalink
fix: update cwd_read to assign vfsmnt correctly
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
arthur-zhang authored and olsajiri committed Jan 9, 2025
1 parent 8af0b97 commit 0073b43
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bpf/process/bpf_process_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ FUNC_INLINE long cwd_read(struct cwd_read_data *data)
probe_read(&data->dentry, sizeof(data->dentry),
_(&mnt->mnt_mountpoint));
data->mnt = parent;
probe_read(&data->vfsmnt, sizeof(data->vfsmnt),
_(&mnt->mnt));
data->vfsmnt = _(&parent->mnt);
return 0;
}
// resolved all path components successfully
Expand Down

0 comments on commit 0073b43

Please sign in to comment.