summaryrefslogtreecommitdiffstats
path: root/kernel/sysctl_binary.c
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2017-08-14 13:14:36 -0400
committerSean Paul <seanpaul@chromium.org>2017-08-14 13:14:36 -0400
commit1724c7c0c9494dcbdd7f630f29e1e8427cb231d1 (patch)
treed7c7ad032289cdf0633feee4bd6ec5800b666ca7 /kernel/sysctl_binary.c
parent7f5d6dac548b983702dd7aac1d463bd88dff50a8 (diff)
parentef954844c7ace62f773f4f23e28d2d915adc419f (diff)
downloadcachepc-linux-1724c7c0c9494dcbdd7f630f29e1e8427cb231d1.tar.gz
cachepc-linux-1724c7c0c9494dcbdd7f630f29e1e8427cb231d1.zip
Merge origin/master into drm-misc-fixes
Backmerge 4.13-rc5 into drm-misc-fixes, it was getting a little stale. Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'kernel/sysctl_binary.c')
-rw-r--r--kernel/sysctl_binary.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
index ece4b177052b..02e1859f2ca8 100644
--- a/kernel/sysctl_binary.c
+++ b/kernel/sysctl_binary.c
@@ -1119,7 +1119,7 @@ static ssize_t bin_uuid(struct file *file,
/* Only supports reads */
if (oldval && oldlen) {
char buf[UUID_STRING_LEN + 1];
- uuid_be uuid;
+ uuid_t uuid;
result = kernel_read(file, 0, buf, sizeof(buf) - 1);
if (result < 0)
@@ -1128,7 +1128,7 @@ static ssize_t bin_uuid(struct file *file,
buf[result] = '\0';
result = -EIO;
- if (uuid_be_to_bin(buf, &uuid))
+ if (uuid_parse(buf, &uuid))
goto out;
if (oldlen > 16)
@@ -1346,7 +1346,7 @@ static void deprecated_sysctl_warning(const int *name, int nlen)
* CTL_KERN/KERN_VERSION is used by older glibc and cannot
* ever go away.
*/
- if (name[0] == CTL_KERN && name[1] == KERN_VERSION)
+ if (nlen >= 2 && name[0] == CTL_KERN && name[1] == KERN_VERSION)
return;
if (printk_ratelimit()) {