Skip to content

Commit bc2391e

Browse files
committed
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "Subsystems affected by this patch series: mm/hugetlb, samples, mm/cma, mm/vmalloc, mm/pagealloc" * emailed patches from Andrew Morton <[email protected]>: mm/page_alloc: fix documentation error vmalloc: fix the owner argument for the new __vmalloc_node_range callers mm/cma.c: use exact_nid true to fix possible per-numa cma leak samples/vfs: avoid warning in statx override mm/hugetlb.c: fix pages per hugetlb calculation
2 parents 0c7d7d1 + 8beeae8 commit bc2391e

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

arch/arm64/kernel/probes/kprobes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void *alloc_insn_page(void)
122122
{
123123
return __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START, VMALLOC_END,
124124
GFP_KERNEL, PAGE_KERNEL_ROX, VM_FLUSH_RESET_PERMS,
125-
NUMA_NO_NODE, __func__);
125+
NUMA_NO_NODE, __builtin_return_address(0));
126126
}
127127

128128
/* arm kprobe: install breakpoint in text */

arch/x86/hyperv/hv_init.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ void __init hyperv_init(void)
377377

378378
hv_hypercall_pg = __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START,
379379
VMALLOC_END, GFP_KERNEL, PAGE_KERNEL_ROX,
380-
VM_FLUSH_RESET_PERMS, NUMA_NO_NODE, __func__);
380+
VM_FLUSH_RESET_PERMS, NUMA_NO_NODE,
381+
__builtin_return_address(0));
381382
if (hv_hypercall_pg == NULL) {
382383
wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0);
383384
goto remove_cpuhp_state;

kernel/module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2785,7 +2785,7 @@ void * __weak module_alloc(unsigned long size)
27852785
{
27862786
return __vmalloc_node_range(size, 1, VMALLOC_START, VMALLOC_END,
27872787
GFP_KERNEL, PAGE_KERNEL_EXEC, VM_FLUSH_RESET_PERMS,
2788-
NUMA_NO_NODE, __func__);
2788+
NUMA_NO_NODE, __builtin_return_address(0));
27892789
}
27902790

27912791
bool __weak module_init_section(const char *name)

mm/cma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,13 @@ int __init cma_declare_contiguous_nid(phys_addr_t base,
339339
*/
340340
if (base < highmem_start && limit > highmem_start) {
341341
addr = memblock_alloc_range_nid(size, alignment,
342-
highmem_start, limit, nid, false);
342+
highmem_start, limit, nid, true);
343343
limit = highmem_start;
344344
}
345345

346346
if (!addr) {
347347
addr = memblock_alloc_range_nid(size, alignment, base,
348-
limit, nid, false);
348+
limit, nid, true);
349349
if (!addr) {
350350
ret = -ENOMEM;
351351
goto err;

mm/hugetlb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,7 @@ static struct address_space *_get_hugetlb_page_mapping(struct page *hpage)
15931593

15941594
/* Use first found vma */
15951595
pgoff_start = page_to_pgoff(hpage);
1596-
pgoff_end = pgoff_start + hpage_nr_pages(hpage) - 1;
1596+
pgoff_end = pgoff_start + pages_per_huge_page(page_hstate(hpage)) - 1;
15971597
anon_vma_interval_tree_foreach(avc, &anon_vma->rb_root,
15981598
pgoff_start, pgoff_end) {
15991599
struct vm_area_struct *vma = avc->vma;

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7832,7 +7832,7 @@ void setup_per_zone_wmarks(void)
78327832
* Initialise min_free_kbytes.
78337833
*
78347834
* For small machines we want it small (128k min). For large machines
7835-
* we want it large (64MB max). But it is not linear, because network
7835+
* we want it large (256MB max). But it is not linear, because network
78367836
* bandwidth does not increase linearly with machine size. We use
78377837
*
78387838
* min_free_kbytes = 4 * sqrt(lowmem_kbytes), for better accuracy:

samples/vfs/test-statx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include <linux/fcntl.h>
2424
#define statx foo
2525
#define statx_timestamp foo_timestamp
26+
struct statx;
27+
struct statx_timestamp;
2628
#include <sys/stat.h>
2729
#undef statx
2830
#undef statx_timestamp

0 commit comments

Comments
 (0)