staging: android: logger: use kuid_t instead of uid_t
PATCH 1/1 staging: android: logger: use kuid_t instead of uid_t
From: Xiong Zhou <[email protected]>
Use kuid_t instead of uid_t, to pass the UIDGID_STRICT_TYPE_CHECKS.
Signed-off-by Xiong Zhou <[email protected]>
---
drivers/staging/android/logger.c | 4 ++-- drivers/staging/android/logger.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/android/logger.c +2 -2
@@ -242,7 +242,7 @@ static ssize_t do_read_log_to_user(struct logger_log *log,* 'log->buffer' which contains the first entry readable by 'euid' */ static size_t get_next_entry_by_uid (struct logger_log *log, -size_t off,uid_t euid) +size_t off,kuid_t euid) {while (off != log->w_off) {struct logger_entry *entry;
@@ -251,7 +251,7 @@ static size_t get_next_entry_by_uid(struct logger_log *log, entry =get_entry_header (log, off, &scratch); -if (entry->euid == euid) +if (uid_eq (entry->euid, euid))return off; next_len =sizeof (struct logger_entry ) + entry->len;
drivers/staging/android/logger.h +1 -1
@@ -66,7 +66,7 @@ struct logger_entry {__s32 tid;__s32 sec;__s32 nsec; -uid_t euid; +kuid_t euid;char msg[0 ]; };
Greg KH
maintainerQuoted 5 lines · Xiong Zhou
From: Xiong Zhou <[email protected]>
Use
kuid_tinstead ofuid_t, to pass theUIDGID_STRICT_TYPE_CHECKS.Signed-off-by Xiong Zhou <[email protected]>
Nice job, I'll queue this up after 3.10-rc1 is out.
greg k-h
Thanks all for reviewing.
xiong
2013/5/8 Greg KH <[email protected]>:
Quoted 10 lines · Xiong Zhou
Quoted 5 lines
From: Xiong Zhou <[email protected]>
Use
kuid_tinstead ofuid_t, to pass theUIDGID_STRICT_TYPE_CHECKS.Signed-off-by Xiong Zhou <[email protected]>Nice job, I'll queue this up after 3.10-rc1 is out.
greg k-h