Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: android: logger: use kuid_t instead of uid_t

Use kuid_t instead of uid_t, to pass the UIDGID_STRICT_TYPE_CHECKS.

Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Xiong Zhou and committed by
Greg Kroah-Hartman
bd471258 410b6372

+3 -3
+2 -2
drivers/staging/android/logger.c
··· 242 242 * 'log->buffer' which contains the first entry readable by 'euid' 243 243 */ 244 244 static size_t get_next_entry_by_uid(struct logger_log *log, 245 - size_t off, uid_t euid) 245 + size_t off, kuid_t euid) 246 246 { 247 247 while (off != log->w_off) { 248 248 struct logger_entry *entry; ··· 251 251 252 252 entry = get_entry_header(log, off, &scratch); 253 253 254 - if (entry->euid == euid) 254 + if (uid_eq(entry->euid, euid)) 255 255 return off; 256 256 257 257 next_len = sizeof(struct logger_entry) + entry->len;
+1 -1
drivers/staging/android/logger.h
··· 66 66 __s32 tid; 67 67 __s32 sec; 68 68 __s32 nsec; 69 - uid_t euid; 69 + kuid_t euid; 70 70 char msg[0]; 71 71 }; 72 72