Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfc79ae8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'akpm' (patches from Andrew)

Merge misc fixes from Andrew Morton:
 "8 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  lib/test_kmod.c: fix limit check on number of test devices created
  selftests/vm/run_vmtests: adjust hugetlb size according to nr_cpus
  mm/page_alloc: fix memmap_init_zone pageblock alignment
  mm/memblock.c: hardcode the end_pfn being -1
  mm/gup.c: teach get_user_pages_unlocked to handle FOLL_NOWAIT
  lib/bug.c: exclude non-BUG/WARN exceptions from report_bug()
  bug: use %pB in BUG and stack protector failure
  hugetlb: fix surplus pages accounting
parents c68a2cf0 ac68b1b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -640,7 +640,7 @@ device_initcall(register_warn_debugfs);
 */
 */
__visible void __stack_chk_fail(void)
__visible void __stack_chk_fail(void)
{
{
	panic("stack-protector: Kernel stack is corrupted in: %p\n",
	panic("stack-protector: Kernel stack is corrupted in: %pB\n",
		__builtin_return_address(0));
		__builtin_return_address(0));
}
}
EXPORT_SYMBOL(__stack_chk_fail);
EXPORT_SYMBOL(__stack_chk_fail);
+3 −1
Original line number Original line Diff line number Diff line
@@ -150,6 +150,8 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
		return BUG_TRAP_TYPE_NONE;
		return BUG_TRAP_TYPE_NONE;


	bug = find_bug(bugaddr);
	bug = find_bug(bugaddr);
	if (!bug)
		return BUG_TRAP_TYPE_NONE;


	file = NULL;
	file = NULL;
	line = 0;
	line = 0;
@@ -191,7 +193,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
	if (file)
	if (file)
		pr_crit("kernel BUG at %s:%u!\n", file, line);
		pr_crit("kernel BUG at %s:%u!\n", file, line);
	else
	else
		pr_crit("Kernel BUG at %p [verbose debug info unavailable]\n",
		pr_crit("Kernel BUG at %pB [verbose debug info unavailable]\n",
			(void *)bugaddr);
			(void *)bugaddr);


	return BUG_TRAP_TYPE_BUG;
	return BUG_TRAP_TYPE_BUG;
+1 −1
Original line number Original line Diff line number Diff line
@@ -1141,7 +1141,7 @@ static struct kmod_test_device *register_test_dev_kmod(void)
	mutex_lock(&reg_dev_mutex);
	mutex_lock(&reg_dev_mutex);


	/* int should suffice for number of devices, test for wrap */
	/* int should suffice for number of devices, test for wrap */
	if (unlikely(num_test_devs + 1) < 0) {
	if (num_test_devs + 1 == INT_MAX) {
		pr_err("reached limit of number of test devices\n");
		pr_err("reached limit of number of test devices\n");
		goto out;
		goto out;
	}
	}
+5 −2
Original line number Original line Diff line number Diff line
@@ -516,7 +516,7 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
	}
	}


	if (ret & VM_FAULT_RETRY) {
	if (ret & VM_FAULT_RETRY) {
		if (nonblocking)
		if (nonblocking && !(fault_flags & FAULT_FLAG_RETRY_NOWAIT))
			*nonblocking = 0;
			*nonblocking = 0;
		return -EBUSY;
		return -EBUSY;
	}
	}
@@ -890,7 +890,10 @@ static __always_inline long __get_user_pages_locked(struct task_struct *tsk,
				break;
				break;
		}
		}
		if (*locked) {
		if (*locked) {
			/* VM_FAULT_RETRY didn't trigger */
			/*
			 * VM_FAULT_RETRY didn't trigger or it was a
			 * FOLL_NOWAIT.
			 */
			if (!pages_done)
			if (!pages_done)
				pages_done = ret;
				pages_done = ret;
			break;
			break;
+1 −1
Original line number Original line Diff line number Diff line
@@ -1583,7 +1583,7 @@ static struct page *alloc_surplus_huge_page(struct hstate *h, gfp_t gfp_mask,
		page = NULL;
		page = NULL;
	} else {
	} else {
		h->surplus_huge_pages++;
		h->surplus_huge_pages++;
		h->nr_huge_pages_node[page_to_nid(page)]++;
		h->surplus_huge_pages_node[page_to_nid(page)]++;
	}
	}


out_unlock:
out_unlock:
Loading