diff options
Diffstat (limited to 'lib/bitmap.c')
-rw-r--r-- | lib/bitmap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/bitmap.c b/lib/bitmap.c index 2f4412e4d071..0d4a127dd9b3 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c | |||
@@ -419,7 +419,7 @@ int __bitmap_parse(const char *buf, unsigned int buflen, | |||
419 | { | 419 | { |
420 | int c, old_c, totaldigits, ndigits, nchunks, nbits; | 420 | int c, old_c, totaldigits, ndigits, nchunks, nbits; |
421 | u32 chunk; | 421 | u32 chunk; |
422 | const char __user *ubuf = buf; | 422 | const char __user __force *ubuf = (const char __user __force *)buf; |
423 | 423 | ||
424 | bitmap_zero(maskp, nmaskbits); | 424 | bitmap_zero(maskp, nmaskbits); |
425 | 425 | ||
@@ -504,7 +504,9 @@ int bitmap_parse_user(const char __user *ubuf, | |||
504 | { | 504 | { |
505 | if (!access_ok(VERIFY_READ, ubuf, ulen)) | 505 | if (!access_ok(VERIFY_READ, ubuf, ulen)) |
506 | return -EFAULT; | 506 | return -EFAULT; |
507 | return __bitmap_parse((const char *)ubuf, ulen, 1, maskp, nmaskbits); | 507 | return __bitmap_parse((const char __force *)ubuf, |
508 | ulen, 1, maskp, nmaskbits); | ||
509 | |||
508 | } | 510 | } |
509 | EXPORT_SYMBOL(bitmap_parse_user); | 511 | EXPORT_SYMBOL(bitmap_parse_user); |
510 | 512 | ||
@@ -594,7 +596,7 @@ static int __bitmap_parselist(const char *buf, unsigned int buflen, | |||
594 | { | 596 | { |
595 | unsigned a, b; | 597 | unsigned a, b; |
596 | int c, old_c, totaldigits; | 598 | int c, old_c, totaldigits; |
597 | const char __user *ubuf = buf; | 599 | const char __user __force *ubuf = (const char __user __force *)buf; |
598 | int exp_digit, in_range; | 600 | int exp_digit, in_range; |
599 | 601 | ||
600 | totaldigits = c = 0; | 602 | totaldigits = c = 0; |
@@ -694,7 +696,7 @@ int bitmap_parselist_user(const char __user *ubuf, | |||
694 | { | 696 | { |
695 | if (!access_ok(VERIFY_READ, ubuf, ulen)) | 697 | if (!access_ok(VERIFY_READ, ubuf, ulen)) |
696 | return -EFAULT; | 698 | return -EFAULT; |
697 | return __bitmap_parselist((const char *)ubuf, | 699 | return __bitmap_parselist((const char __force *)ubuf, |
698 | ulen, 1, maskp, nmaskbits); | 700 | ulen, 1, maskp, nmaskbits); |
699 | } | 701 | } |
700 | EXPORT_SYMBOL(bitmap_parselist_user); | 702 | EXPORT_SYMBOL(bitmap_parselist_user); |