diff options
author | Jann Horn <jannh@google.com> | 2020-11-24 00:54:00 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2021-01-21 16:16:08 +0000 |
commit | 796e46f9e2cb2d823578044598ee8fe77f86e3f7 (patch) | |
tree | 02fceb3b8718767bf4a4b5c2e40e102fb5b5c514 /security/keys | |
parent | 634c21bb9867e06221ee1527c5e157e01cd7712c (diff) | |
download | linux-stable-796e46f9e2cb2d823578044598ee8fe77f86e3f7.tar.gz linux-stable-796e46f9e2cb2d823578044598ee8fe77f86e3f7.tar.bz2 linux-stable-796e46f9e2cb2d823578044598ee8fe77f86e3f7.zip |
keys: Remove outdated __user annotations
When the semantics of the ->read() handlers were changed such that "buffer"
is a kernel pointer, some __user annotations survived.
Since they're wrong now, get rid of them.
Fixes: d3ec10aa9581 ("KEYS: Don't write out to userspace while holding key semaphore")
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Ben Boeckel <mathstuf@gmail.com>
Diffstat (limited to 'security/keys')
-rw-r--r-- | security/keys/keyring.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/security/keys/keyring.c b/security/keys/keyring.c index 14abfe765b7e..977066208387 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c @@ -452,7 +452,7 @@ static void keyring_describe(const struct key *keyring, struct seq_file *m) struct keyring_read_iterator_context { size_t buflen; size_t count; - key_serial_t __user *buffer; + key_serial_t *buffer; }; static int keyring_read_iterator(const void *object, void *data) @@ -479,7 +479,7 @@ static int keyring_read_iterator(const void *object, void *data) * times. */ static long keyring_read(const struct key *keyring, - char __user *buffer, size_t buflen) + char *buffer, size_t buflen) { struct keyring_read_iterator_context ctx; long ret; @@ -491,7 +491,7 @@ static long keyring_read(const struct key *keyring, /* Copy as many key IDs as fit into the buffer */ if (buffer && buflen) { - ctx.buffer = (key_serial_t __user *)buffer; + ctx.buffer = (key_serial_t *)buffer; ctx.buflen = buflen; ctx.count = 0; ret = assoc_array_iterate(&keyring->keys, |