mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge branch 'uaccess.strlen' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull user access str* updates from Al Viro: "uaccess str...() dead code removal" * 'uaccess.strlen' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: s390 keyboard.c: don't open-code strndup_user() mips: get rid of unused __strnlen_user() get rid of unused __strncpy_from_user() instances kill strlen_user()
This commit is contained in:
commit
dc502142b6
40 changed files with 5 additions and 601 deletions
|
|
@ -433,12 +433,7 @@ do_kdgkb_ioctl(struct kbd_data *kbd, struct kbsentry __user *u_kbs,
|
|||
case KDSKBSENT:
|
||||
if (!perm)
|
||||
return -EPERM;
|
||||
len = strnlen_user(u_kbs->kb_string, sizeof(u_kbs->kb_string));
|
||||
if (!len)
|
||||
return -EFAULT;
|
||||
if (len > sizeof(u_kbs->kb_string))
|
||||
return -EINVAL;
|
||||
p = memdup_user_nul(u_kbs->kb_string, len);
|
||||
p = strndup_user(u_kbs->kb_string, sizeof(u_kbs->kb_string));
|
||||
if (IS_ERR(p))
|
||||
return PTR_ERR(p);
|
||||
kfree(kbd->func_table[kb_func]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue