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

Commit 5ba00044 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 5.4.167 into android11-5.4-lts



Changes in 5.4.167
	nfc: fix segfault in nfc_genl_dump_devices_done
	drm/msm/dsi: set default num_data_lanes
	net/mlx4_en: Update reported link modes for 1/10G
	parisc/agp: Annotate parisc agp init functions with __init
	i2c: rk3x: Handle a spurious start completion interrupt flag
	net: netlink: af_netlink: Prevent empty skb by adding a check on len.
	drm/amd/display: Fix for the no Audio bug with Tiled Displays
	drm/amd/display: add connector type check for CRC source set
	tracing: Fix a kmemleak false positive in tracing_map
	KVM: x86: Ignore sparse banks size for an "all CPUs", non-sparse IPI req
	selinux: fix race condition when computing ocontext SIDs
	bpf: Fix integer overflow in argument calculation for bpf_map_area_alloc
	hwmon: (dell-smm) Fix warning on /proc/i8k creation error
	memblock: free_unused_memmap: use pageblock units instead of MAX_ORDER
	memblock: align freed memory map on pageblock boundaries with SPARSEMEM
	memblock: ensure there is no overflow in memblock_overlaps_region()
	arm: extend pfn_valid to take into account freed memory map alignment
	arm: ioremap: don't abuse pfn_valid() to check if pfn is in RAM
	Linux 5.4.167

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I1b912710dd31dba153eb6d859856462ea4c01ddd
parents 4a68bf48 e8ef9403
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 166
SUBLEVEL = 167
EXTRAVERSION =
NAME = Kleptomaniac Octopus

+25 −12
Original line number Diff line number Diff line
@@ -176,11 +176,22 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max_low,
int pfn_valid(unsigned long pfn)
{
	phys_addr_t addr = __pfn_to_phys(pfn);
	unsigned long pageblock_size = PAGE_SIZE * pageblock_nr_pages;

	if (__phys_to_pfn(addr) != pfn)
		return 0;

	return memblock_is_map_memory(__pfn_to_phys(pfn));
	/*
	 * If address less than pageblock_size bytes away from a present
	 * memory chunk there still will be a memory map entry for it
	 * because we round freed memory map to the pageblock boundaries.
	 */
	if (memblock_overlaps_region(&memblock.memory,
				     ALIGN_DOWN(addr, pageblock_size),
				     pageblock_size))
		return 1;

	return 0;
}
EXPORT_SYMBOL(pfn_valid);
#endif
@@ -371,14 +382,14 @@ static void __init free_unused_memmap(void)
		 */
		start = min(start,
				 ALIGN(prev_end, PAGES_PER_SECTION));
#else
#endif
		/*
		 * Align down here since the VM subsystem insists that the
		 * memmap entries are valid from the bank start aligned to
		 * MAX_ORDER_NR_PAGES.
		 * Align down here since many operations in VM subsystem
		 * presume that there are no holes in the memory map inside
		 * a pageblock
		 */
		start = round_down(start, MAX_ORDER_NR_PAGES);
#endif
		start = round_down(start, pageblock_nr_pages);

		/*
		 * If we had a previous bank, and there is a space
		 * between the current bank and the previous, free it.
@@ -387,18 +398,20 @@ static void __init free_unused_memmap(void)
			free_memmap(prev_end, start);

		/*
		 * Align up here since the VM subsystem insists that the
		 * memmap entries are valid from the bank end aligned to
		 * MAX_ORDER_NR_PAGES.
		 * Align up here since many operations in VM subsystem
		 * presume that there are no holes in the memory map inside
		 * a pageblock
		 */
		prev_end = ALIGN(memblock_region_memory_end_pfn(reg),
				 MAX_ORDER_NR_PAGES);
				 pageblock_nr_pages);
	}

#ifdef CONFIG_SPARSEMEM
	if (!IS_ALIGNED(prev_end, PAGES_PER_SECTION))
	if (!IS_ALIGNED(prev_end, PAGES_PER_SECTION)) {
		prev_end = ALIGN(prev_end, pageblock_nr_pages);
		free_memmap(prev_end,
			    ALIGN(prev_end, PAGES_PER_SECTION));
	}
#endif
}

+3 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <linux/vmalloc.h>
#include <linux/io.h>
#include <linux/sizes.h>
#include <linux/memblock.h>

#include <asm/cp15.h>
#include <asm/cputype.h>
@@ -301,7 +302,8 @@ static void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
	 * Don't allow RAM to be mapped with mismatched attributes - this
	 * causes problems with ARMv6+
	 */
	if (WARN_ON(pfn_valid(pfn) && mtype != MT_MEMORY_RW))
	if (WARN_ON(memblock_is_map_memory(PFN_PHYS(pfn)) &&
		    mtype != MT_MEMORY_RW))
		return NULL;

	area = get_vm_area_caller(size, VM_IOREMAP, caller);
+5 −2
Original line number Diff line number Diff line
@@ -1501,11 +1501,13 @@ static u64 kvm_hv_send_ipi(struct kvm_vcpu *current_vcpu, u64 ingpa, u64 outgpa,

		all_cpus = send_ipi_ex.vp_set.format == HV_GENERIC_SET_ALL;

		if (all_cpus)
			goto check_and_send_ipi;

		if (!sparse_banks_len)
			goto ret_success;

		if (!all_cpus &&
		    kvm_read_guest(kvm,
		if (kvm_read_guest(kvm,
				   ingpa + offsetof(struct hv_send_ipi_ex,
						    vp_set.bank_contents),
				   sparse_banks,
@@ -1513,6 +1515,7 @@ static u64 kvm_hv_send_ipi(struct kvm_vcpu *current_vcpu, u64 ingpa, u64 outgpa,
			return HV_STATUS_INVALID_HYPERCALL_INPUT;
	}

check_and_send_ipi:
	if ((vector < HV_IPI_LOW_VECTOR) || (vector > HV_IPI_HIGH_VECTOR))
		return HV_STATUS_INVALID_HYPERCALL_INPUT;

+3 −3
Original line number Diff line number Diff line
@@ -281,7 +281,7 @@ agp_ioc_init(void __iomem *ioc_regs)
        return 0;
}

static int
static int __init
lba_find_capability(int cap)
{
	struct _parisc_agp_info *info = &parisc_agp_info;
@@ -366,7 +366,7 @@ parisc_agp_setup(void __iomem *ioc_hpa, void __iomem *lba_hpa)
	return error;
}

static int
static int __init
find_quicksilver(struct device *dev, void *data)
{
	struct parisc_device **lba = data;
@@ -378,7 +378,7 @@ find_quicksilver(struct device *dev, void *data)
	return 0;
}

static int
static int __init
parisc_agp_init(void)
{
	extern struct sba_device *sba_list;
Loading