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

Showing the changes to kernel (3 of 29 files). Show all

Unified · Split

3 files
  1. kernel/bpf/core.c +3 −3
  2. kernel/groups.c +1 −1
  3. kernel/module.c +1 −2
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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t