diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap.c | 7 | ||||
-rw-r--r-- | mm/vmalloc.c | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 23acefe51808..126d3973b3d1 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1823,7 +1823,7 @@ static size_t __iovec_copy_from_user_inatomic(char *vaddr, | |||
1823 | int copy = min(bytes, iov->iov_len - base); | 1823 | int copy = min(bytes, iov->iov_len - base); |
1824 | 1824 | ||
1825 | base = 0; | 1825 | base = 0; |
1826 | left = __copy_from_user_inatomic_nocache(vaddr, buf, copy); | 1826 | left = __copy_from_user_inatomic(vaddr, buf, copy); |
1827 | copied += copy; | 1827 | copied += copy; |
1828 | bytes -= copy; | 1828 | bytes -= copy; |
1829 | vaddr += copy; | 1829 | vaddr += copy; |
@@ -1851,8 +1851,7 @@ size_t iov_iter_copy_from_user_atomic(struct page *page, | |||
1851 | if (likely(i->nr_segs == 1)) { | 1851 | if (likely(i->nr_segs == 1)) { |
1852 | int left; | 1852 | int left; |
1853 | char __user *buf = i->iov->iov_base + i->iov_offset; | 1853 | char __user *buf = i->iov->iov_base + i->iov_offset; |
1854 | left = __copy_from_user_inatomic_nocache(kaddr + offset, | 1854 | left = __copy_from_user_inatomic(kaddr + offset, buf, bytes); |
1855 | buf, bytes); | ||
1856 | copied = bytes - left; | 1855 | copied = bytes - left; |
1857 | } else { | 1856 | } else { |
1858 | copied = __iovec_copy_from_user_inatomic(kaddr + offset, | 1857 | copied = __iovec_copy_from_user_inatomic(kaddr + offset, |
@@ -1880,7 +1879,7 @@ size_t iov_iter_copy_from_user(struct page *page, | |||
1880 | if (likely(i->nr_segs == 1)) { | 1879 | if (likely(i->nr_segs == 1)) { |
1881 | int left; | 1880 | int left; |
1882 | char __user *buf = i->iov->iov_base + i->iov_offset; | 1881 | char __user *buf = i->iov->iov_base + i->iov_offset; |
1883 | left = __copy_from_user_nocache(kaddr + offset, buf, bytes); | 1882 | left = __copy_from_user(kaddr + offset, buf, bytes); |
1884 | copied = bytes - left; | 1883 | copied = bytes - left; |
1885 | } else { | 1884 | } else { |
1886 | copied = __iovec_copy_from_user_inatomic(kaddr + offset, | 1885 | copied = __iovec_copy_from_user_inatomic(kaddr + offset, |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 520a75980269..11a929872ebd 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -1267,6 +1267,7 @@ EXPORT_SYMBOL(vfree); | |||
1267 | void vunmap(const void *addr) | 1267 | void vunmap(const void *addr) |
1268 | { | 1268 | { |
1269 | BUG_ON(in_interrupt()); | 1269 | BUG_ON(in_interrupt()); |
1270 | might_sleep(); | ||
1270 | __vunmap(addr, 0); | 1271 | __vunmap(addr, 0); |
1271 | } | 1272 | } |
1272 | EXPORT_SYMBOL(vunmap); | 1273 | EXPORT_SYMBOL(vunmap); |
@@ -1286,6 +1287,8 @@ void *vmap(struct page **pages, unsigned int count, | |||
1286 | { | 1287 | { |
1287 | struct vm_struct *area; | 1288 | struct vm_struct *area; |
1288 | 1289 | ||
1290 | might_sleep(); | ||
1291 | |||
1289 | if (count > num_physpages) | 1292 | if (count > num_physpages) |
1290 | return NULL; | 1293 | return NULL; |
1291 | 1294 | ||