Linux 5.4.167
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.167 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mm/init.c | 37 ++-- arch/arm/mm/ioremap.c | 4 arch/x86/kvm/hyperv.c | 7 drivers/char/agp/parisc-agp.c | 6 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 8 drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 drivers/gpu/drm/msm/dsi/dsi_host.c | 2 drivers/hwmon/dell-smm-hwmon.c | 7 drivers/i2c/busses/i2c-rk3x.c | 4 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 6 kernel/bpf/devmap.c | 4 kernel/trace/tracing_map.c | 3 mm/memblock.c | 3 net/core/sock_map.c | 2 net/netlink/af_netlink.c | 5 net/nfc/netlink.c | 6 security/selinux/ss/services.c | 159 +++++++++--------- 18 files changed, 165 insertions(+), 104 deletions(-)
Armin Wolf (1):
hwmon: (dell-smm) Fix warning on /proc/i8k creation error
Bui Quang Minh (1):
bpf: Fix integer overflow in argument calculation for bpf_map_area_alloc
Chen Jun (1):
tracing: Fix a kmemleak false positive in tracing_map
Erik Ekman (1):
net/mlx4_en: Update reported link modes for 1/10G
Greg Kroah-Hartman (1):
Linux 5.4.167
Harshit Mogalapalli (1):
net: netlink: af_netlink: Prevent empty skb by adding a check on len.
Helge Deller (1):
parisc/agp: Annotate parisc agp init functions with __init
Mike Rapoport (5):
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
Mustapha Ghaddar (1):
drm/amd/display: Fix for the no Audio bug with Tiled Displays
Ondrej Jirman (1):
i2c: rk3x: Handle a spurious start completion interrupt flag
Ondrej Mosnacek (1):
selinux: fix race condition when computing ocontext SIDs
Perry Yuan (1):
drm/amd/display: add connector type check for CRC source set
Philip Chen (1):
drm/msm/dsi: set default num_data_lanes
Sean Christopherson (1):
KVM: x86: Ignore sparse banks size for an "all CPUs", non-sparse IPI req
Tadeusz Struk (1):
nfc: fix segfault in nfc_genl_dump_devices_done
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 166 +SUBLEVEL = 167 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm/mm/init.c +25 -12
@@ -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 }
arch/arm/mm/ioremap.c +3 -1
@@ -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);
arch/x86/kvm/hyperv.c +5 -2
@@ -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 ;
drivers/char/agp/parisc-agp.c +3 -3
@@ -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;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +8 -0
@@ -221,6 +221,14 @@ int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name) ret = -EINVAL ; goto cleanup; } + +if ((aconn->base.connector_type != DRM_MODE_CONNECTOR_DisplayPort) && + (aconn->base.connector_type != DRM_MODE_CONNECTOR_eDP)) { +DRM_DEBUG_DRIVER ("No DP connector available for CRC source\n" ); + ret = -EINVAL ; + goto cleanup; + } + }if (amdgpu_dm_crtc_configure_crc_source (crtc, crtc_state, source)) {
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +4 -0
@@ -1546,6 +1546,10 @@ bool dc_is_stream_unchanged(if (old_stream->ignore_msa_timing_param != stream->ignore_msa_timing_param)return false; +// Only Have Audio left to check whether it is same or not. This is a corner case for Tiled sinks +if (old_stream->audio_info.mode_count != stream->audio_info.mode_count) +return false; +return true; }
drivers/gpu/drm/msm/dsi/dsi_host.c +2 -0
@@ -1669,6 +1669,8 @@ static int dsi_host_parse_lane_data(struct msm_dsi_host *msm_host,if (!prop) {DRM_DEV_DEBUG (dev,"failed to find data lane mapping, using default\n" ); +/* Set the number of date lanes to 4 by default. */ + msm_host->num_data_lanes =4 ;return 0 ; }
drivers/hwmon/dell-smm-hwmon.c +5 -2
@@ -588,15 +588,18 @@ static const struct file_operations i8k_fops = { .unlocked_ioctl = i8k_ioctl, }; +static struct proc_dir_entry *entry; +static void __init i8k_init_procfs (void ) {/* Register the proc entry */ -proc_create ("i8k" ,0 ,NULL , &i8k_fops); + entry =proc_create ("i8k" ,0 ,NULL , &i8k_fops); } static void __exit i8k_exit_procfs(void) { -remove_proc_entry ("i8k" ,NULL ); +if (entry) +remove_proc_entry ("i8k" ,NULL ); }#else
drivers/i2c/busses/i2c-rk3x.c +2 -2
@@ -422,8 +422,8 @@ static void rk3x_i2c_handle_read(struct rk3x_i2c *i2c, unsigned int ipd)if (!(ipd ®_INT_MBRF ))return ; -/* ack interrupt */ -i2c_writel (i2c,REG_INT_MBRF ,REG_IPD ); +/* ack interrupt (read also produces a spurious START flag, clear it too) */ +i2c_writel (i2c,REG_INT_MBRF |REG_INT_START ,REG_IPD );/* Can only handle a maximum of 32 bytes at a time */ if (len >32 )
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +3 -3
@@ -663,7 +663,7 @@ void __init mlx4_en_init_ptys2ethtool_map(void)MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_1000BASE_T ,SPEED_1000 , ETHTOOL_LINK_MODE_1000baseT_Full_BIT);MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_1000BASE_CX_SGMII ,SPEED_1000 , - ETHTOOL_LINK_MODE_1000baseKX_Full_BIT); + ETHTOOL_LINK_MODE_1000baseX_Full_BIT);MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_1000BASE_KX ,SPEED_1000 , ETHTOOL_LINK_MODE_1000baseKX_Full_BIT); MLX4_BUILD_PTYS2ETHTOOL_CONFIG(MLX4_10GBASE_T, SPEED_10000,
@@ -675,9 +675,9 @@ void __init mlx4_en_init_ptys2ethtool_map(void)MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_10GBASE_KR ,SPEED_10000 , ETHTOOL_LINK_MODE_10000baseKR_Full_BIT);MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_10GBASE_CR ,SPEED_10000 , - ETHTOOL_LINK_MODE_10000baseKR_Full_BIT); + ETHTOOL_LINK_MODE_10000baseCR_Full_BIT);MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_10GBASE_SR ,SPEED_10000 , - ETHTOOL_LINK_MODE_10000baseKR_Full_BIT); + ETHTOOL_LINK_MODE_10000baseSR_Full_BIT);MLX4_BUILD_PTYS2ETHTOOL_CONFIG (MLX4_20GBASE_KR2 ,SPEED_20000 , ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT, ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT);
kernel/bpf/devmap.c +2 -2
@@ -94,7 +94,7 @@ static struct hlist_head *dev_map_create_hash(unsigned int entries,int i;struct hlist_head *hash; - hash =bpf_map_area_alloc (entries *sizeof (*hash), numa_node); + hash =bpf_map_area_alloc ((u64 ) entries *sizeof (*hash), numa_node);if (hash !=NULL )for (i =0 ; i < entries; i++)INIT_HLIST_HEAD (&hash[i]);
@@ -159,7 +159,7 @@ static int dev_map_init_map(struct bpf_dtab *dtab, union bpf_attr *attr)spin_lock_init (&dtab->index_lock); }else { - dtab->netdev_map =bpf_map_area_alloc (dtab->map.max_entries * + dtab->netdev_map =bpf_map_area_alloc ((u64 ) dtab->map.max_entries *sizeof (struct bpf_dtab_netdev *), dtab->map.numa_node);if (!dtab->netdev_map)
kernel/trace/tracing_map.c +3 -0
@@ -15,6 +15,7 @@#include <linux/jhash.h> #include <linux/slab.h> #include <linux/sort.h> +#include <linux/kmemleak.h> #include "tracing_map.h" #include "trace.h"
@@ -307,6 +308,7 @@ void tracing_map_array_free(struct tracing_map_array *a)for (i =0 ; i < a->n_pages; i++) {if (!a->pages[i])break ; +kmemleak_free (a->pages[i]);free_page ((unsigned long )a->pages[i]); }
@@ -342,6 +344,7 @@ struct tracing_map_array *tracing_map_array_alloc(unsigned int n_elts, a->pages[i] = (void *)get_zeroed_page (GFP_KERNEL );if (!a->pages[i]) goto free; +kmemleak_alloc (a->pages[i],PAGE_SIZE ,1 ,GFP_KERNEL ); } out:return a;
mm/memblock.c +2 -1
@@ -164,6 +164,8 @@ bool __init_memblock memblock_overlaps_region(struct memblock_type *type, {unsigned long i; +memblock_cap_size (base, &size); +for (i =0 ; i < type->cnt; i++)if (memblock_addrs_overlap (base, size, type->regions[i].base, type->regions[i].size))
@@ -1760,7 +1762,6 @@ bool __init_memblock memblock_is_region_memory(phys_addr_t base, phys_addr_t siz*/ bool __init_memblock memblock_is_region_reserved(phys_addr_t base, phys_addr_t size) { -memblock_cap_size (base, &size);return memblock_overlaps_region (&memblock.reserved, base, size); }
net/core/sock_map.c +1 -1
@@ -48,7 +48,7 @@ static struct bpf_map *sock_map_alloc(union bpf_attr *attr)if (err) goto free_stab; - stab->sks =bpf_map_area_alloc (stab->map.max_entries * + stab->sks =bpf_map_area_alloc ((u64 ) stab->map.max_entries *sizeof (struct sock *), stab->map.numa_node);if (stab->sks)
net/netlink/af_netlink.c +5 -0
@@ -1862,6 +1862,11 @@ static int netlink_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)if (msg->msg_flags&MSG_OOB )return -EOPNOTSUPP ; +if (len ==0 ) { +pr_warn_once ("Zero length message leads to an empty skb\n" ); +return -ENODATA ; + } + err =scm_send (sock, msg, &scm, true);if (err <0 )return err;
net/nfc/netlink.c +4 -2
@@ -644,8 +644,10 @@ static int nfc_genl_dump_devices_done(struct netlink_callback *cb) {struct class_dev_iter *iter = (struct class_dev_iter *) cb->args[0 ]; -nfc_device_iter_exit (iter); -kfree (iter); +if (iter) { +nfc_device_iter_exit (iter); +kfree (iter); + }return 0 ; }
security/selinux/ss/services.c +87 -72
277 lines not on this page · raw message