diff options
-rw-r--r-- | arch/s390/include/asm/uaccess.h | 16 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h index 0235970278f0..8377e91533d2 100644 --- a/arch/s390/include/asm/uaccess.h +++ b/arch/s390/include/asm/uaccess.h | |||
@@ -131,7 +131,7 @@ static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) | |||
131 | 131 | ||
132 | #define put_user(x, ptr) \ | 132 | #define put_user(x, ptr) \ |
133 | ({ \ | 133 | ({ \ |
134 | might_sleep(); \ | 134 | might_fault(); \ |
135 | __put_user(x, ptr); \ | 135 | __put_user(x, ptr); \ |
136 | }) | 136 | }) |
137 | 137 | ||
@@ -180,7 +180,7 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
180 | 180 | ||
181 | #define get_user(x, ptr) \ | 181 | #define get_user(x, ptr) \ |
182 | ({ \ | 182 | ({ \ |
183 | might_sleep(); \ | 183 | might_fault(); \ |
184 | __get_user(x, ptr); \ | 184 | __get_user(x, ptr); \ |
185 | }) | 185 | }) |
186 | 186 | ||
@@ -231,7 +231,7 @@ __copy_to_user(void __user *to, const void *from, unsigned long n) | |||
231 | static inline unsigned long __must_check | 231 | static inline unsigned long __must_check |
232 | copy_to_user(void __user *to, const void *from, unsigned long n) | 232 | copy_to_user(void __user *to, const void *from, unsigned long n) |
233 | { | 233 | { |
234 | might_sleep(); | 234 | might_fault(); |
235 | if (access_ok(VERIFY_WRITE, to, n)) | 235 | if (access_ok(VERIFY_WRITE, to, n)) |
236 | n = __copy_to_user(to, from, n); | 236 | n = __copy_to_user(to, from, n); |
237 | return n; | 237 | return n; |
@@ -282,7 +282,7 @@ __copy_from_user(void *to, const void __user *from, unsigned long n) | |||
282 | static inline unsigned long __must_check | 282 | static inline unsigned long __must_check |
283 | copy_from_user(void *to, const void __user *from, unsigned long n) | 283 | copy_from_user(void *to, const void __user *from, unsigned long n) |
284 | { | 284 | { |
285 | might_sleep(); | 285 | might_fault(); |
286 | if (access_ok(VERIFY_READ, from, n)) | 286 | if (access_ok(VERIFY_READ, from, n)) |
287 | n = __copy_from_user(to, from, n); | 287 | n = __copy_from_user(to, from, n); |
288 | else | 288 | else |
@@ -299,7 +299,7 @@ __copy_in_user(void __user *to, const void __user *from, unsigned long n) | |||
299 | static inline unsigned long __must_check | 299 | static inline unsigned long __must_check |
300 | copy_in_user(void __user *to, const void __user *from, unsigned long n) | 300 | copy_in_user(void __user *to, const void __user *from, unsigned long n) |
301 | { | 301 | { |
302 | might_sleep(); | 302 | might_fault(); |
303 | if (__access_ok(from,n) && __access_ok(to,n)) | 303 | if (__access_ok(from,n) && __access_ok(to,n)) |
304 | n = __copy_in_user(to, from, n); | 304 | n = __copy_in_user(to, from, n); |
305 | return n; | 305 | return n; |
@@ -312,7 +312,7 @@ static inline long __must_check | |||
312 | strncpy_from_user(char *dst, const char __user *src, long count) | 312 | strncpy_from_user(char *dst, const char __user *src, long count) |
313 | { | 313 | { |
314 | long res = -EFAULT; | 314 | long res = -EFAULT; |
315 | might_sleep(); | 315 | might_fault(); |
316 | if (access_ok(VERIFY_READ, src, 1)) | 316 | if (access_ok(VERIFY_READ, src, 1)) |
317 | res = uaccess.strncpy_from_user(count, src, dst); | 317 | res = uaccess.strncpy_from_user(count, src, dst); |
318 | return res; | 318 | return res; |
@@ -321,7 +321,7 @@ strncpy_from_user(char *dst, const char __user *src, long count) | |||
321 | static inline unsigned long | 321 | static inline unsigned long |
322 | strnlen_user(const char __user * src, unsigned long n) | 322 | strnlen_user(const char __user * src, unsigned long n) |
323 | { | 323 | { |
324 | might_sleep(); | 324 | might_fault(); |
325 | return uaccess.strnlen_user(n, src); | 325 | return uaccess.strnlen_user(n, src); |
326 | } | 326 | } |
327 | 327 | ||
@@ -354,7 +354,7 @@ __clear_user(void __user *to, unsigned long n) | |||
354 | static inline unsigned long __must_check | 354 | static inline unsigned long __must_check |
355 | clear_user(void __user *to, unsigned long n) | 355 | clear_user(void __user *to, unsigned long n) |
356 | { | 356 | { |
357 | might_sleep(); | 357 | might_fault(); |
358 | if (access_ok(VERIFY_WRITE, to, n)) | 358 | if (access_ok(VERIFY_WRITE, to, n)) |
359 | n = uaccess.clear_user(n, to); | 359 | n = uaccess.clear_user(n, to); |
360 | return n; | 360 | return n; |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 10bccd1f8aee..c18b21d6991c 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -512,7 +512,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
512 | BUG(); | 512 | BUG(); |
513 | } | 513 | } |
514 | 514 | ||
515 | might_sleep(); | 515 | might_fault(); |
516 | 516 | ||
517 | do { | 517 | do { |
518 | __vcpu_run(vcpu); | 518 | __vcpu_run(vcpu); |