]> git.baikalelectronics.ru Git - kernel.git/commit
sparc: fix mis-use of __kernel_{uid,gid}_t in uapi/asm/stat.h
authorMasahiro Yamada <masahiroy@kernel.org>
Wed, 1 Jun 2022 18:19:41 +0000 (03:19 +0900)
committerArnd Bergmann <arnd@arndb.de>
Thu, 2 Jun 2022 15:38:15 +0000 (17:38 +0200)
commita202e9c2cf698f0c4091928eea5d8bf28499f366
tree6ff699ef0debd2880c443aa4c70dfc313e8476c1
parent295611bd38d527995a3d578bf2de833bd6fc0b75
sparc: fix mis-use of __kernel_{uid,gid}_t in uapi/asm/stat.h

Commit b9359a8f3297 ("sparc: add asm/stat.h to UAPI compile-test
coverage") converted as follows:

  uid_t  -->  __kernel_uid_t
  gid_t  -->  __kernel_gid_t

It changed the field widths of struct stat because Sparc uses 16-bits for
___kernel_{uid,gid}_t as in arch/sparc/include/uapi/asm/posix_types.h.

The safe replacements across all architectures are:

  uid_t  -->  __kernel_uid32_t
  gid_t  -->  __kernel_gid32_t

as defined in include/linux/types.h.

A similar issue was reported for the android binder. [1]

[1]: https://lore.kernel.org/all/20220601010017.2639048-1-cmllamas@google.com/

Fixes: b9359a8f3297 ("sparc: add asm/stat.h to UAPI compile-test coverage")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/sparc/include/uapi/asm/stat.h