diff options
| author | Davy Felipe <davyfelipe34@gmail.com> | 2026-09-16 19:40:16 -0300 |
|---|---|---|
| committer | Viacheslav Dubeyko <slava@dubeyko.com> | 2026-09-21 15:09:03 -0700 |
| commit | 21668258995bdc99b48f372c2d7d52539c2f2567 (patch) | |
| tree | 984c9e131fd2db6d644f2c43cd76f5d71190de39 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | cee9395acd8043be0644b25c34bfa86623f2b935 (diff) | |
| download | linux-21668258995bdc99b48f372c2d7d52539c2f2567.tar.gz linux-21668258995bdc99b48f372c2d7d52539c2f2567.zip | |
hfs: return -EPERM for unsupported setattr changes
hfs_inode_setattr() rejects unsupported UID, GID and mode changes,
but returns the value stored in error when the filesystem is not
mounted with the quiet option.
At this point error is zero, as execution has already passed a
successful setattr_prepare() call. As a result, unsupported attribute
changes are incorrectly reported to userspace as successful even
though the inode remains unchanged.
Return -EPERM for these operations while preserving the existing
behavior for quiet mounts.
A chown test on an HFS image reproduces the problem. Without the fix,
chown 1234:1234 returns success while ownership remains 0:0. With the
fix, the same operation fails with EPERM and ownership remains
unchanged.
Signed-off-by: Davy Felipe <davyfelipe34@gmail.com>
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Link: https://lore.kernel.org/r/20260916224016.266800-1-davyfelipe34@gmail.com
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
