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

Commit 363fb52f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: Improve vmalloc address checking in show_data()"

parents 22c0374d 058c9685
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -321,12 +321,10 @@ static void show_data(unsigned long addr, int nbytes, const char *name)
	u32	*p;

	/*
	 * don't attempt to dump non-kernel addresses, values that are probably
	 * just small negative numbers, or vmalloc addresses that may point to
	 * memory-mapped peripherals
	 * don't attempt to dump non-kernel addresses or
	 * values that are probably just small negative numbers
	 */
	if (addr < PAGE_OFFSET || addr > -256UL ||
	    is_vmalloc_addr((void *)addr))
	if (addr < PAGE_OFFSET || addr > -256UL)
		return;

	printk("\n%s: %#lx:\n", name, addr);
@@ -348,7 +346,12 @@ static void show_data(unsigned long addr, int nbytes, const char *name)
		printk("%04lx ", (unsigned long)p & 0xffff);
		for (j = 0; j < 8; j++) {
			u32	data;
			if (probe_kernel_address(p, data)) {
			/*
			 * vmalloc addresses may point to
			 * memory-mapped peripherals
			 */
			if (is_vmalloc_addr(p) ||
			    probe_kernel_address(p, data)) {
				printk(" ********");
			} else {
				printk(" %08x", data);