mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
statx: Reserve the top bit of the mask for future struct expansion
Reserve the top bit of the mask for future expansion of the statx struct and give an error if statx() sees it set. All the other bits are ignored if we see them set but don't support the bit; we just clear the bit in the returned mask. Signed-off-by: David Howells <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
5f955f26f3
commit
47071aee6a
2 changed files with 3 additions and 0 deletions
|
|
@ -562,6 +562,8 @@ SYSCALL_DEFINE5(statx,
|
|||
struct kstat stat;
|
||||
int error;
|
||||
|
||||
if (mask & STATX__RESERVED)
|
||||
return -EINVAL;
|
||||
if ((flags & AT_STATX_SYNC_TYPE) == AT_STATX_SYNC_TYPE)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue