summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-21 15:25:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-21 15:25:46 -0700
commit334a023ee50997b45ffb8fbcc8bc875519040aac (patch)
tree32b5cf29e932d4bba4a7856bebb1213bbef58923 /tools
parentf3926e4c2a4b53c25a998de168d4eef6d0360369 (diff)
downloadop-kernel-dev-334a023ee50997b45ffb8fbcc8bc875519040aac.zip
op-kernel-dev-334a023ee50997b45ffb8fbcc8bc875519040aac.tar.gz
Clean up x86 unsafe_get/put_user() type handling
Al noticed that unsafe_put_user() had type problems, and fixed them in commit a7cc722fff0b ("fix unsafe_put_user()"), which made me look more at those functions. It turns out that unsafe_get_user() had a type issue too: it limited the largest size of the type it could handle to "unsigned long". Which is fine with the current users, but doesn't match our existing normal get_user() semantics, which can also handle "u64" even when that does not fit in a long. While at it, also clean up the type cast in unsafe_put_user(). We actually want to just make it an assignment to the expected type of the pointer, because we actually do want warnings from types that don't convert silently. And it makes the code more readable by not having that one very long and complex line. [ This patch might become stable material if we ever end up back-porting any new users of the unsafe uaccess code, but as things stand now this doesn't matter for any current existing uses. ] Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud