History

mm: remove the pgprot argument to __vmalloc

The pgprot argument to __vmalloc is always PAGE_KERNEL now, so remove it.

Christoph Hellwig committed 6 years ago

Commit 88dca4c1 parent d28ff9929 files · +47 −59Browse files

Unified · Split

29 files
  1. arch/x86/hyperv/hv_init.c +1 −2
  2. arch/x86/include/asm/kvm_host.h +1 −2
  3. arch/x86/kvm/svm/sev.c +1 −2
  4. drivers/block/drbd/drbd_bitmap.c +1 −3
  5. drivers/gpu/drm/etnaviv/etnaviv_dump.c +2 −2
  6. drivers/lightnvm/pblk-init.c +2 −3
  7. drivers/md/dm-bufio.c +2 −2
  8. drivers/mtd/ubi/io.c +2 −2
  9. drivers/scsi/sd_zbc.c +1 −2
  10. fs/gfs2/dir.c +4 −5
  11. fs/gfs2/quota.c +1 −1
  12. fs/nfs/blocklayout/extent_tree.c +1 −1
  13. fs/ntfs/malloc.h +1 −1
  14. fs/ubifs/debug.c +1 −1
  15. fs/ubifs/lprops.c +1 −1
  16. fs/ubifs/lpt_commit.c +2 −2
  17. fs/ubifs/orphan.c +1 −1
  18. fs/xfs/kmem.c +1 −1
  19. include/linux/vmalloc.h +1 −1
  20. kernel/bpf/core.c +3 −3
  21. kernel/groups.c +1 −1
  22. kernel/module.c +1 −2
  23. mm/nommu.c +7 −8
  24. mm/page_alloc.c +1 −1
  25. mm/percpu.c +1 −1
  26. mm/vmalloc.c +2 −2
  27. net/bridge/netfilter/ebtables.c +2 −4
  28. sound/core/memalloc.c +1 −1
  29. sound/core/pcm_memory.c +1 −1
arch/x86/hyperv/hv_init.c+1−2
@@ -97,8 +97,7 @@ static int hv_cpu_init(unsigned int cpu) · 96 unmodified lines
97 * not be stopped in the case of CPU offlining and the VM will hang.97 * not be stopped in the case of CPU offlining and the VM will hang.
98 */98 */
99 if (!*hvp) {99 if (!*hvp) {
100 *hvp = __vmalloc(PAGE_SIZE, GFP_KERNEL | __GFP_ZERO,100 *hvp = __vmalloc(PAGE_SIZE, GFP_KERNEL | __GFP_ZERO);
101 PAGE_KERNEL);
102 }101 }
103 102
104 if (*hvp) {103 if (*hvp) {
arch/x86/include/asm/kvm_host.h+1−2
@@ -1279,8 +1279,7 @@ extern struct kmem_cache *x86_fpu_cache; · 1278 unmodified lines
1279#define __KVM_HAVE_ARCH_VM_ALLOC1279#define __KVM_HAVE_ARCH_VM_ALLOC
1280static inline struct kvm *kvm_arch_alloc_vm(void)1280static inline struct kvm *kvm_arch_alloc_vm(void)
1281{1281{
1282 return __vmalloc(kvm_x86_ops.vm_size,1282 return __vmalloc(kvm_x86_ops.vm_size, GFP_KERNEL_ACCOUNT | __GFP_ZERO);
1283 GFP_KERNEL_ACCOUNT | __GFP_ZERO, PAGE_KERNEL);
1284}1283}
1285void kvm_arch_free_vm(struct kvm *kvm);1284void kvm_arch_free_vm(struct kvm *kvm);
1286 1285
arch/x86/kvm/svm/sev.c+1−2
@@ -336,8 +336,7 @@ static struct page **sev_pin_memory(struct kvm *kvm, unsigned long uaddr, · 335 unmodified lines
336 /* Avoid using vmalloc for smaller buffers. */336 /* Avoid using vmalloc for smaller buffers. */
337 size = npages * sizeof(struct page *);337 size = npages * sizeof(struct page *);
338 if (size > PAGE_SIZE)338 if (size > PAGE_SIZE)
339 pages = __vmalloc(size, GFP_KERNEL_ACCOUNT | __GFP_ZERO,339 pages = __vmalloc(size, GFP_KERNEL_ACCOUNT | __GFP_ZERO);
340 PAGE_KERNEL);
341 else340 else
342 pages = kmalloc(size, GFP_KERNEL_ACCOUNT);341 pages = kmalloc(size, GFP_KERNEL_ACCOUNT);
343 342
drivers/block/drbd/drbd_bitmap.c+1−3
@@ -396,9 +396,7 @@ static struct page **bm_realloc_pages(struct drbd_bitmap *b, unsigned long want) · 395 unmodified lines
396 bytes = sizeof(struct page *)*want;396 bytes = sizeof(struct page *)*want;
397 new_pages = kzalloc(bytes, GFP_NOIO | __GFP_NOWARN);397 new_pages = kzalloc(bytes, GFP_NOIO | __GFP_NOWARN);
398 if (!new_pages) {398 if (!new_pages) {
399 new_pages = __vmalloc(bytes,399 new_pages = __vmalloc(bytes, GFP_NOIO | __GFP_ZERO);
400 GFP_NOIO | __GFP_ZERO,
401 PAGE_KERNEL);
402 if (!new_pages)400 if (!new_pages)
403 return NULL;401 return NULL;
404 }402 }
drivers/gpu/drm/etnaviv/etnaviv_dump.c+2−2
@@ -154,8 +154,8 @@ void etnaviv_core_dump(struct etnaviv_gem_submit *submit) · 153 unmodified lines
154 file_size += sizeof(*iter.hdr) * n_obj;154 file_size += sizeof(*iter.hdr) * n_obj;
155 155
156 /* Allocate the file in vmalloc memory, it's likely to be big */156 /* Allocate the file in vmalloc memory, it's likely to be big */
157 iter.start = __vmalloc(file_size, GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY,157 iter.start = __vmalloc(file_size, GFP_KERNEL | __GFP_NOWARN |
158 PAGE_KERNEL);158 __GFP_NORETRY);
159 if (!iter.start) {159 if (!iter.start) {
160 mutex_unlock(&gpu->mmu_context->lock);160 mutex_unlock(&gpu->mmu_context->lock);
161 dev_warn(gpu->dev, "failed to allocate devcoredump file\n");161 dev_warn(gpu->dev, "failed to allocate devcoredump file\n");
drivers/lightnvm/pblk-init.c+2−3
@@ -145,9 +145,8 @@ static int pblk_l2p_init(struct pblk *pblk, bool factory_init) · 144 unmodified lines
145 int ret = 0;145 int ret = 0;
146 146
147 map_size = pblk_trans_map_size(pblk);147 map_size = pblk_trans_map_size(pblk);
148 pblk->trans_map = __vmalloc(map_size, GFP_KERNEL | __GFP_NOWARN148 pblk->trans_map = __vmalloc(map_size, GFP_KERNEL | __GFP_NOWARN |
149 | __GFP_RETRY_MAYFAIL | __GFP_HIGHMEM,149 __GFP_RETRY_MAYFAIL | __GFP_HIGHMEM);
150 PAGE_KERNEL);
151 if (!pblk->trans_map) {150 if (!pblk->trans_map) {
152 pblk_err(pblk, "failed to allocate L2P (need %zu of memory)\n",151 pblk_err(pblk, "failed to allocate L2P (need %zu of memory)\n",
153 map_size);152 map_size);
drivers/md/dm-bufio.c+2−2
@@ -400,13 +400,13 @@ static void *alloc_buffer_data(struct dm_bufio_client *c, gfp_t gfp_mask, · 399 unmodified lines
400 */400 */
401 if (gfp_mask & __GFP_NORETRY) {401 if (gfp_mask & __GFP_NORETRY) {
402 unsigned noio_flag = memalloc_noio_save();402 unsigned noio_flag = memalloc_noio_save();
403 void *ptr = __vmalloc(c->block_size, gfp_mask, PAGE_KERNEL);403 void *ptr = __vmalloc(c->block_size, gfp_mask);
404 404
405 memalloc_noio_restore(noio_flag);405 memalloc_noio_restore(noio_flag);
406 return ptr;406 return ptr;
407 }407 }
408 408
409 return __vmalloc(c->block_size, gfp_mask, PAGE_KERNEL);409 return __vmalloc(c->block_size, gfp_mask);
410}410}
411 411
412/*412/*
drivers/mtd/ubi/io.c+2−2
@@ -1297,7 +1297,7 @@ static int self_check_write(struct ubi_device *ubi, const void *buf, int pnum, · 1296 unmodified lines
1297 if (!ubi_dbg_chk_io(ubi))1297 if (!ubi_dbg_chk_io(ubi))
1298 return 0;1298 return 0;
1299 1299
1300 buf1 = __vmalloc(len, GFP_NOFS, PAGE_KERNEL);1300 buf1 = __vmalloc(len, GFP_NOFS);
1301 if (!buf1) {1301 if (!buf1) {
1302 ubi_err(ubi, "cannot allocate memory to check writes");1302 ubi_err(ubi, "cannot allocate memory to check writes");
1303 return 0;1303 return 0;
@@ -1361,7 +1361,7 @@ int ubi_self_check_all_ff(struct ubi_device *ubi, int pnum, int offset, int len) · 57 unmodified lines
1361 if (!ubi_dbg_chk_io(ubi))1361 if (!ubi_dbg_chk_io(ubi))
1362 return 0;1362 return 0;
1363 1363
1364 buf = __vmalloc(len, GFP_NOFS, PAGE_KERNEL);1364 buf = __vmalloc(len, GFP_NOFS);
1365 if (!buf) {1365 if (!buf) {
1366 ubi_err(ubi, "cannot allocate memory to check for 0xFFs");1366 ubi_err(ubi, "cannot allocate memory to check for 0xFFs");
1367 return 0;1367 return 0;
drivers/scsi/sd_zbc.c+1−2
@@ -136,8 +136,7 @@ static void *sd_zbc_alloc_report_buffer(struct scsi_disk *sdkp, · 135 unmodified lines
136 136
137 while (bufsize >= SECTOR_SIZE) {137 while (bufsize >= SECTOR_SIZE) {
138 buf = __vmalloc(bufsize,138 buf = __vmalloc(bufsize,
139 GFP_KERNEL | __GFP_ZERO | __GFP_NORETRY,139 GFP_KERNEL | __GFP_ZERO | __GFP_NORETRY);
140 PAGE_KERNEL);
141 if (buf) {140 if (buf) {
142 *buflen = bufsize;141 *buflen = bufsize;
143 return buf;142 return buf;
fs/gfs2/dir.c+4−5
@@ -354,7 +354,7 @@ static __be64 *gfs2_dir_get_hash_table(struct gfs2_inode *ip) · 353 unmodified lines
354 354
355 hc = kmalloc(hsize, GFP_NOFS | __GFP_NOWARN);355 hc = kmalloc(hsize, GFP_NOFS | __GFP_NOWARN);
356 if (hc == NULL)356 if (hc == NULL)
357 hc = __vmalloc(hsize, GFP_NOFS, PAGE_KERNEL);357 hc = __vmalloc(hsize, GFP_NOFS);
358 358
359 if (hc == NULL)359 if (hc == NULL)
360 return ERR_PTR(-ENOMEM);360 return ERR_PTR(-ENOMEM);
@@ -1166,7 +1166,7 @@ static int dir_double_exhash(struct gfs2_inode *dip) · 805 unmodified lines
1166 1166
1167 hc2 = kmalloc_array(hsize_bytes, 2, GFP_NOFS | __GFP_NOWARN);1167 hc2 = kmalloc_array(hsize_bytes, 2, GFP_NOFS | __GFP_NOWARN);
1168 if (hc2 == NULL)1168 if (hc2 == NULL)
1169 hc2 = __vmalloc(hsize_bytes * 2, GFP_NOFS, PAGE_KERNEL);1169 hc2 = __vmalloc(hsize_bytes * 2, GFP_NOFS);
1170 1170
1171 if (!hc2)1171 if (!hc2)
1172 return -ENOMEM;1172 return -ENOMEM;
@@ -1327,7 +1327,7 @@ static void *gfs2_alloc_sort_buffer(unsigned size) · 154 unmodified lines
1327 if (size < KMALLOC_MAX_SIZE)1327 if (size < KMALLOC_MAX_SIZE)
1328 ptr = kmalloc(size, GFP_NOFS | __GFP_NOWARN);1328 ptr = kmalloc(size, GFP_NOFS | __GFP_NOWARN);
1329 if (!ptr)1329 if (!ptr)
1330 ptr = __vmalloc(size, GFP_NOFS, PAGE_KERNEL);1330 ptr = __vmalloc(size, GFP_NOFS);
1331 return ptr;1331 return ptr;
1332}1332}
1333 1333
@@ -1987,8 +1987,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len, · 653 unmodified lines
1987 1987
1988 ht = kzalloc(size, GFP_NOFS | __GFP_NOWARN);1988 ht = kzalloc(size, GFP_NOFS | __GFP_NOWARN);
1989 if (ht == NULL)1989 if (ht == NULL)
1990 ht = __vmalloc(size, GFP_NOFS | __GFP_NOWARN | __GFP_ZERO,1990 ht = __vmalloc(size, GFP_NOFS | __GFP_NOWARN | __GFP_ZERO);
1991 PAGE_KERNEL);
1992 if (!ht)1991 if (!ht)
1993 return -ENOMEM;1992 return -ENOMEM;
1994 1993
fs/gfs2/quota.c+1−1
@@ -1365,7 +1365,7 @@ int gfs2_quota_init(struct gfs2_sbd *sdp) · 1364 unmodified lines
1365 sdp->sd_quota_bitmap = kzalloc(bm_size, GFP_NOFS | __GFP_NOWARN);1365 sdp->sd_quota_bitmap = kzalloc(bm_size, GFP_NOFS | __GFP_NOWARN);
1366 if (sdp->sd_quota_bitmap == NULL)1366 if (sdp->sd_quota_bitmap == NULL)
1367 sdp->sd_quota_bitmap = __vmalloc(bm_size, GFP_NOFS |1367 sdp->sd_quota_bitmap = __vmalloc(bm_size, GFP_NOFS |
1368 __GFP_ZERO, PAGE_KERNEL);1368 __GFP_ZERO);
1369 if (!sdp->sd_quota_bitmap)1369 if (!sdp->sd_quota_bitmap)
1370 return error;1370 return error;
1371 1371
fs/nfs/blocklayout/extent_tree.c+1−1
@@ -582,7 +582,7 @@ retry: · 581 unmodified lines
582 if (!arg->layoutupdate_pages)582 if (!arg->layoutupdate_pages)
583 return -ENOMEM;583 return -ENOMEM;
584 584
585 start_p = __vmalloc(buffer_size, GFP_NOFS, PAGE_KERNEL);585 start_p = __vmalloc(buffer_size, GFP_NOFS);
586 if (!start_p) {586 if (!start_p) {
587 kfree(arg->layoutupdate_pages);587 kfree(arg->layoutupdate_pages);
588 return -ENOMEM;588 return -ENOMEM;
fs/ntfs/malloc.h+1−1
@@ -34,7 +34,7 @@ static inline void *__ntfs_malloc(unsigned long size, gfp_t gfp_mask) · 33 unmodified lines
34 /* return (void *)__get_free_page(gfp_mask); */34 /* return (void *)__get_free_page(gfp_mask); */
35 }35 }
36 if (likely((size >> PAGE_SHIFT) < totalram_pages()))36 if (likely((size >> PAGE_SHIFT) < totalram_pages()))
37 return __vmalloc(size, gfp_mask, PAGE_KERNEL);37 return __vmalloc(size, gfp_mask);
38 return NULL;38 return NULL;
39}39}
40 40
fs/ubifs/debug.c+1−1
@@ -815,7 +815,7 @@ void ubifs_dump_leb(const struct ubifs_info *c, int lnum) · 814 unmodified lines
815 815
816 pr_err("(pid %d) start dumping LEB %d\n", current->pid, lnum);816 pr_err("(pid %d) start dumping LEB %d\n", current->pid, lnum);
817 817
818 buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);818 buf = __vmalloc(c->leb_size, GFP_NOFS);
819 if (!buf) {819 if (!buf) {
820 ubifs_err(c, "cannot allocate memory for dumping LEB %d", lnum);820 ubifs_err(c, "cannot allocate memory for dumping LEB %d", lnum);
821 return;821 return;
fs/ubifs/lprops.c+1−1
@@ -1095,7 +1095,7 @@ static int scan_check_cb(struct ubifs_info *c, · 1094 unmodified lines
1095 return LPT_SCAN_CONTINUE;1095 return LPT_SCAN_CONTINUE;
1096 }1096 }
1097 1097
1098 buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);1098 buf = __vmalloc(c->leb_size, GFP_NOFS);
1099 if (!buf)1099 if (!buf)
1100 return -ENOMEM;1100 return -ENOMEM;
1101 1101
fs/ubifs/lpt_commit.c+2−2
@@ -1596,7 +1596,7 @@ static int dbg_check_ltab_lnum(struct ubifs_info *c, int lnum) · 1595 unmodified lines
1596 if (!dbg_is_chk_lprops(c))1596 if (!dbg_is_chk_lprops(c))
1597 return 0;1597 return 0;
1598 1598
1599 buf = p = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);1599 buf = p = __vmalloc(c->leb_size, GFP_NOFS);
1600 if (!buf) {1600 if (!buf) {
1601 ubifs_err(c, "cannot allocate memory for ltab checking");1601 ubifs_err(c, "cannot allocate memory for ltab checking");
1602 return 0;1602 return 0;
@@ -1845,7 +1845,7 @@ static void dump_lpt_leb(const struct ubifs_info *c, int lnum) · 242 unmodified lines
1845 void *buf, *p;1845 void *buf, *p;
1846 1846
1847 pr_err("(pid %d) start dumping LEB %d\n", current->pid, lnum);1847 pr_err("(pid %d) start dumping LEB %d\n", current->pid, lnum);
1848 buf = p = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);1848 buf = p = __vmalloc(c->leb_size, GFP_NOFS);
1849 if (!buf) {1849 if (!buf) {
1850 ubifs_err(c, "cannot allocate memory to dump LPT");1850 ubifs_err(c, "cannot allocate memory to dump LPT");
1851 return;1851 return;
fs/ubifs/orphan.c+1−1
@@ -977,7 +977,7 @@ static int dbg_scan_orphans(struct ubifs_info *c, struct check_info *ci) · 976 unmodified lines
977 if (c->no_orphs)977 if (c->no_orphs)
978 return 0;978 return 0;
979 979
980 buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);980 buf = __vmalloc(c->leb_size, GFP_NOFS);
981 if (!buf) {981 if (!buf) {
982 ubifs_err(c, "cannot allocate memory to check orphans");982 ubifs_err(c, "cannot allocate memory to check orphans");
983 return 0;983 return 0;
fs/xfs/kmem.c+1−1
@@ -48,7 +48,7 @@ __kmem_vmalloc(size_t size, xfs_km_flags_t flags) · 47 unmodified lines
48 if (flags & KM_NOFS)48 if (flags & KM_NOFS)
49 nofs_flag = memalloc_nofs_save();49 nofs_flag = memalloc_nofs_save();
50 50
51 ptr = __vmalloc(size, lflags, PAGE_KERNEL);51 ptr = __vmalloc(size, lflags);
52 52
53 if (flags & KM_NOFS)53 if (flags & KM_NOFS)
54 memalloc_nofs_restore(nofs_flag);54 memalloc_nofs_restore(nofs_flag);
include/linux/vmalloc.h+1−1
@@ -110,7 +110,7 @@ extern void *vmalloc_user_node_flags(unsigned long size, int node, gfp_t flags); · 109 unmodified lines
110extern void *vmalloc_exec(unsigned long size);110extern void *vmalloc_exec(unsigned long size);
111extern void *vmalloc_32(unsigned long size);111extern void *vmalloc_32(unsigned long size);
112extern void *vmalloc_32_user(unsigned long size);112extern void *vmalloc_32_user(unsigned long size);
113extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot);113extern void *__vmalloc(unsigned long size, gfp_t gfp_mask);
114extern void *__vmalloc_node_range(unsigned long size, unsigned long align,114extern void *__vmalloc_node_range(unsigned long size, unsigned long align,
115 unsigned long start, unsigned long end, gfp_t gfp_mask,115 unsigned long start, unsigned long end, gfp_t gfp_mask,
116 pgprot_t prot, unsigned long vm_flags, int node,116 pgprot_t prot, unsigned long vm_flags, int node,
kernel/bpf/core.c+3−3
@@ -82,7 +82,7 @@ struct bpf_prog *bpf_prog_alloc_no_stats(unsigned int size, gfp_t gfp_extra_flag · 81 unmodified lines
82 struct bpf_prog *fp;82 struct bpf_prog *fp;
83 83
84 size = round_up(size, PAGE_SIZE);84 size = round_up(size, PAGE_SIZE);
85 fp = __vmalloc(size, gfp_flags, PAGE_KERNEL);85 fp = __vmalloc(size, gfp_flags);
86 if (fp == NULL)86 if (fp == NULL)
87 return NULL;87 return NULL;
88 88
@@ -232,7 +232,7 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, · 143 unmodified lines
232 if (ret)232 if (ret)
233 return NULL;233 return NULL;
234 234
235 fp = __vmalloc(size, gfp_flags, PAGE_KERNEL);235 fp = __vmalloc(size, gfp_flags);
236 if (fp == NULL) {236 if (fp == NULL) {
237 __bpf_prog_uncharge(fp_old->aux->user, delta);237 __bpf_prog_uncharge(fp_old->aux->user, delta);
238 } else {238 } else {
@@ -1089,7 +1089,7 @@ static struct bpf_prog *bpf_prog_clone_create(struct bpf_prog *fp_other, · 850 unmodified lines
1089 gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO | gfp_extra_flags;1089 gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO | gfp_extra_flags;
1090 struct bpf_prog *fp;1090 struct bpf_prog *fp;
1091 1091
1092 fp = __vmalloc(fp_other->pages * PAGE_SIZE, gfp_flags, PAGE_KERNEL);1092 fp = __vmalloc(fp_other->pages * PAGE_SIZE, gfp_flags);
1093 if (fp != NULL) {1093 if (fp != NULL) {
1094 /* aux->prog still points to the fp_other one, so1094 /* aux->prog still points to the fp_other one, so
1095 * when promoting the clone to the real program,1095 * when promoting the clone to the real program,
kernel/groups.c+1−1
@@ -20,7 +20,7 @@ struct group_info *groups_alloc(int gidsetsize) · 19 unmodified lines
20 len = sizeof(struct group_info) + sizeof(kgid_t) * gidsetsize;20 len = sizeof(struct group_info) + sizeof(kgid_t) * gidsetsize;
21 gi = kmalloc(len, GFP_KERNEL_ACCOUNT|__GFP_NOWARN|__GFP_NORETRY);21 gi = kmalloc(len, GFP_KERNEL_ACCOUNT|__GFP_NOWARN|__GFP_NORETRY);
22 if (!gi)22 if (!gi)
23 gi = __vmalloc(len, GFP_KERNEL_ACCOUNT, PAGE_KERNEL);23 gi = __vmalloc(len, GFP_KERNEL_ACCOUNT);
24 if (!gi)24 if (!gi)
25 return NULL;25 return NULL;
26 26
kernel/module.c+1−2
@@ -2946,8 +2946,7 @@ static int copy_module_from_user(const void __user *umod, unsigned long len, · 2945 unmodified lines
2946 return err;2946 return err;
2947 2947
2948 /* Suck in entire file: we'll want most of it. */2948 /* Suck in entire file: we'll want most of it. */
2949 info->hdr = __vmalloc(info->len,2949 info->hdr = __vmalloc(info->len, GFP_KERNEL | __GFP_NOWARN);
2950 GFP_KERNEL | __GFP_NOWARN, PAGE_KERNEL);
2951 if (!info->hdr)2950 if (!info->hdr)
2952 return -ENOMEM;2951 return -ENOMEM;
2953 2952
mm/nommu.c+7−8
@@ -140,7 +140,7 @@ void vfree(const void *addr) · 139 unmodified lines
140}140}
141EXPORT_SYMBOL(vfree);141EXPORT_SYMBOL(vfree);
142 142
143void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)143void *__vmalloc(unsigned long size, gfp_t gfp_mask)
144{144{
145 /*145 /*
146 * You can't specify __GFP_HIGHMEM with kmalloc() since kmalloc()146 * You can't specify __GFP_HIGHMEM with kmalloc() since kmalloc()
@@ -152,14 +152,14 @@ EXPORT_SYMBOL(__vmalloc); · 5 unmodified lines
152 152
153void *__vmalloc_node_flags(unsigned long size, int node, gfp_t flags)153void *__vmalloc_node_flags(unsigned long size, int node, gfp_t flags)
154{154{
155 return __vmalloc(size, flags, PAGE_KERNEL);155 return __vmalloc(size, flags);
156}156}
157 157
158static void *__vmalloc_user_flags(unsigned long size, gfp_t flags)158static void *__vmalloc_user_flags(unsigned long size, gfp_t flags)
159{159{
160 void *ret;160 void *ret;
161 161
162 ret = __vmalloc(size, flags, PAGE_KERNEL);162 ret = __vmalloc(size, flags);
163 if (ret) {163 if (ret) {
164 struct vm_area_struct *vma;164 struct vm_area_struct *vma;
165 165
@@ -230,7 +230,7 @@ long vwrite(char *buf, char *addr, unsigned long count) · 64 unmodified lines
230 */230 */
231void *vmalloc(unsigned long size)231void *vmalloc(unsigned long size)
232{232{
233 return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);233 return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM);
234}234}
235EXPORT_SYMBOL(vmalloc);235EXPORT_SYMBOL(vmalloc);
236 236
@@ -248,8 +248,7 @@ EXPORT_SYMBOL(vmalloc); · 11 unmodified lines
248 */248 */
249void *vzalloc(unsigned long size)249void *vzalloc(unsigned long size)
250{250{
251 return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO,251 return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);
252 PAGE_KERNEL);
253}252}
254EXPORT_SYMBOL(vzalloc);253EXPORT_SYMBOL(vzalloc);
255 254
@@ -302,7 +301,7 @@ EXPORT_SYMBOL(vzalloc_node); · 46 unmodified lines
302 301
303void *vmalloc_exec(unsigned long size)302void *vmalloc_exec(unsigned long size)
304{303{
305 return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL_EXEC);304 return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM);
306}305}
307 306
308/**307/**
@@ -314,7 +313,7 @@ void *vmalloc_exec(unsigned long size) · 5 unmodified lines
314 */313 */
315void *vmalloc_32(unsigned long size)314void *vmalloc_32(unsigned long size)
316{315{
317 return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL);316 return __vmalloc(size, GFP_KERNEL);
318}317}
319EXPORT_SYMBOL(vmalloc_32);318EXPORT_SYMBOL(vmalloc_32);
320 319
mm/page_alloc.c+1−1
@@ -8244,7 +8244,7 @@ void *__init alloc_large_system_hash(const char *tablename, · 8243 unmodified lines
8244 table = memblock_alloc_raw(size,8244 table = memblock_alloc_raw(size,
8245 SMP_CACHE_BYTES);8245 SMP_CACHE_BYTES);
8246 } else if (get_order(size) >= MAX_ORDER || hashdist) {8246 } else if (get_order(size) >= MAX_ORDER || hashdist) {
8247 table = __vmalloc(size, gfp_flags, PAGE_KERNEL);8247 table = __vmalloc(size, gfp_flags);
8248 virt = true;8248 virt = true;
8249 } else {8249 } else {
8250 /*8250 /*
mm/percpu.c+1−1
@@ -482,7 +482,7 @@ static void *pcpu_mem_zalloc(size_t size, gfp_t gfp) · 481 unmodified lines
482 if (size <= PAGE_SIZE)482 if (size <= PAGE_SIZE)
483 return kzalloc(size, gfp);483 return kzalloc(size, gfp);
484 else484 else
485 return __vmalloc(size, gfp | __GFP_ZERO, PAGE_KERNEL);485 return __vmalloc(size, gfp | __GFP_ZERO);
486}486}
487 487
488/**488/**
mm/vmalloc.c+2−2
@@ -2564,9 +2564,9 @@ static void *__vmalloc_node(unsigned long size, unsigned long align, · 2563 unmodified lines
2564 gfp_mask, prot, 0, node, caller);2564 gfp_mask, prot, 0, node, caller);
2565}2565}
2566 2566
2567void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)2567void *__vmalloc(unsigned long size, gfp_t gfp_mask)
2568{2568{
2569 return __vmalloc_node(size, 1, gfp_mask, prot, NUMA_NO_NODE,2569 return __vmalloc_node(size, 1, gfp_mask, PAGE_KERNEL, NUMA_NO_NODE,
2570 __builtin_return_address(0));2570 __builtin_return_address(0));
2571}2571}
2572EXPORT_SYMBOL(__vmalloc);2572EXPORT_SYMBOL(__vmalloc);
net/bridge/netfilter/ebtables.c+2−4
@@ -1095,16 +1095,14 @@ static int do_replace(struct net *net, const void __user *user, · 1094 unmodified lines
1095 tmp.name[sizeof(tmp.name) - 1] = 0;1095 tmp.name[sizeof(tmp.name) - 1] = 0;
1096 1096
1097 countersize = COUNTER_OFFSET(tmp.nentries) * nr_cpu_ids;1097 countersize = COUNTER_OFFSET(tmp.nentries) * nr_cpu_ids;
1098 newinfo = __vmalloc(sizeof(*newinfo) + countersize, GFP_KERNEL_ACCOUNT,1098 newinfo = __vmalloc(sizeof(*newinfo) + countersize, GFP_KERNEL_ACCOUNT);
1099 PAGE_KERNEL);
1100 if (!newinfo)1099 if (!newinfo)
1101 return -ENOMEM;1100 return -ENOMEM;
1102 1101
1103 if (countersize)1102 if (countersize)
1104 memset(newinfo->counters, 0, countersize);1103 memset(newinfo->counters, 0, countersize);
1105 1104
1106 newinfo->entries = __vmalloc(tmp.entries_size, GFP_KERNEL_ACCOUNT,1105 newinfo->entries = __vmalloc(tmp.entries_size, GFP_KERNEL_ACCOUNT);
1107 PAGE_KERNEL);
1108 if (!newinfo->entries) {1106 if (!newinfo->entries) {
1109 ret = -ENOMEM;1107 ret = -ENOMEM;
1110 goto free_newinfo;1108 goto free_newinfo;
sound/core/memalloc.c+1−1
@@ -143,7 +143,7 @@ int snd_dma_alloc_pages(int type, struct device *device, size_t size, · 142 unmodified lines
143 break;143 break;
144 case SNDRV_DMA_TYPE_VMALLOC:144 case SNDRV_DMA_TYPE_VMALLOC:
145 gfp = snd_mem_get_gfp_flags(device, GFP_KERNEL | __GFP_HIGHMEM);145 gfp = snd_mem_get_gfp_flags(device, GFP_KERNEL | __GFP_HIGHMEM);
146 dmab->area = __vmalloc(size, gfp, PAGE_KERNEL);146 dmab->area = __vmalloc(size, gfp);
147 dmab->addr = 0;147 dmab->addr = 0;
148 break;148 break;
149#ifdef CONFIG_HAS_DMA149#ifdef CONFIG_HAS_DMA
sound/core/pcm_memory.c+1−1
@@ -460,7 +460,7 @@ int _snd_pcm_lib_alloc_vmalloc_buffer(struct snd_pcm_substream *substream, · 459 unmodified lines
460 return 0; /* already large enough */460 return 0; /* already large enough */
461 vfree(runtime->dma_area);461 vfree(runtime->dma_area);
462 }462 }
463 runtime->dma_area = __vmalloc(size, gfp_flags, PAGE_KERNEL);463 runtime->dma_area = __vmalloc(size, gfp_flags);
464 if (!runtime->dma_area)464 if (!runtime->dma_area)
465 return -ENOMEM;465 return -ENOMEM;
466 runtime->dma_bytes = size;466 runtime->dma_bytes = size;