Skip to content

Commit

Permalink
GKI: use Android ABI padding for POSIX_MQUEUE user_struct fields
Browse files Browse the repository at this point in the history
Signed-off-by: lateautumn233 <lateautumn233@foxmail.com>
  • Loading branch information
lateautumn233 committed Jan 27, 2024
1 parent 0ac686b commit a0aa446
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/linux/sched/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct user_struct {
#endif
#ifdef CONFIG_POSIX_MQUEUE
/* protected by mq_lock */
unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */
//unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */
#endif
unsigned long locked_shm; /* How many pages of mlocked shm ? */
unsigned long unix_inflight; /* How many files in flight in unix sockets */
Expand All @@ -44,9 +44,15 @@ struct user_struct {
/* Miscellaneous per-user rate limit */
struct ratelimit_state ratelimit;

#if defined(CONFIG_POSIX_MQUEUE)
ANDROID_KABI_USE(1, unsigned long mq_bytes);
ANDROID_KABI_RESERVE(2);
ANDROID_OEM_DATA_ARRAY(1, 2);
#else
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
ANDROID_OEM_DATA_ARRAY(1, 2);
#endif
};

extern int uids_sysfs_init(void);
Expand Down

0 comments on commit a0aa446

Please sign in to comment.