Linux 4.4.37
Greg KH
maintainerI'm announcing the release of the 4.4.37 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 +- arch/arc/include/asm/delay.h | 9 +++++---- arch/arm64/include/asm/cpufeature.h | 2 +- arch/arm64/include/asm/processor.h | 2 +- arch/arm64/kernel/cpufeature.c | 10 +++++++++- arch/arm64/kernel/suspend.c | 9 +++++++++ arch/arm64/mm/fault.c | 12 +++++++++++- arch/x86/kernel/head_32.S | 2 +- drivers/block/zram/zram_drv.c | 3 ++- drivers/net/wireless/mwifiex/cfg80211.c | 13 +++++++------ drivers/pci/pcie/aer/aer_inject.c | 14 -------------- drivers/pci/probe.c | 28 +++++++++++++++++++++++++++- drivers/pwm/sysfs.c | 2 ++ include/linux/compiler-gcc.h | 4 +++- include/linux/pci.h | 14 ++++++++++++++ kernel/rcu/tree_plugin.h | 1 + mm/kasan/kasan.h | 3 +++ sound/core/pcm_lib.c | 2 +- 18 files changed, 98 insertions(+), 34 deletions(-)
Andy Lutomirski (1):
x86/traps: Ignore high word of regs->cs in early_fixup_exception()
Brian Norris (1):
mwifiex: printk() overflow with 32-byte SSIDs
Ding Tianhong (1):
rcu: Fix soft lockup for rcu_nocb_kthread
Dmitry Vyukov (1):
kasan: update kasan_global for gcc 7
Greg Kroah-Hartman (1):
Linux 4.4.37
James Morse (3):
arm64: cpufeature: Schedule enable() calls instead of calling them via IPI
arm64: mm: Set PSTATE.PAN from the cpu_enable_pan() call
arm64: suspend: Reconfigure PSTATE after resume from idle
Johan Hovold (1):
pwm: Fix device reference leak
Johannes Thumshirn (2):
PCI: Export pcie_find_root_port
PCI: Set Read Completion Boundary to 128 iff Root Port supports it (_HPX)
Takashi Iwai (2):
zram: fix unbalanced idr management at hot removal
ALSA: pcm : Call kill_fasync() in stream lock
Vineet Gupta (1):
ARC: Don't use "+l" inline asm constraint
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 36 +SUBLEVEL = 37 EXTRAVERSION = NAME = Blurry Fish Butt
arch/arc/include/asm/delay.h +5 -4
@@ -22,10 +22,11 @@static inline void __delay (unsigned long loops) { __asm__ __volatile__( -" lp 1f \n" -" nop \n" -"1: \n" - :"+l" (loops)); +" mov lp_count, %0 \n" +" lp 1f \n" +" nop \n" +"1: \n" + : :"r" (loops)); }extern void __bad_udelay (void );
arch/arm64/include/asm/cpufeature.h +1 -1
@@ -77,7 +77,7 @@ struct arm64_cpu_capabilities {const char *desc;u16 capability;bool (*matches)(const struct arm64_cpu_capabilities *); -void (*enable)(void *);/* Called on all active CPUs */ +int (*enable)(void *);/* Called on all active CPUs */ union { struct { /* To be used for erratum handling only */ u32 midr_model;
arch/arm64/include/asm/processor.h +1 -1
@@ -186,6 +186,6 @@ static inline void spin_lock_prefetch(const void *x)#endif -void cpu_enable_pan (void *__unused); +int cpu_enable_pan (void *__unused);#endif /* __ASM_PROCESSOR_H */
arch/arm64/kernel/cpufeature.c +9 -1
@@ -19,7 +19,9 @@#define pr_fmt (fmt) "CPU features: " fmt#include <linux/bsearch.h> +#include <linux/cpumask.h> #include <linux/sort.h> +#include <linux/stop_machine.h> #include <linux/types.h> #include <asm/cpu.h> #include <asm/cpufeature.h>
@@ -764,7 +766,13 @@ static void enable_cpu_capabilities(const struct arm64_cpu_capabilities *caps)for (i =0 ; caps[i].desc; i++)if (caps[i].enable &&cpus_have_cap (caps[i].capability)) -on_each_cpu (caps[i].enable,NULL , true); +/* +* Use stop_machine() as it schedules the work allowing +* us to modify PSTATE, instead of on_each_cpu() which +* uses an IPI, giving us a PSTATE that disappears when +* we return. +*/ +stop_machine (caps[i].enable,NULL , cpu_online_mask); }#ifdef CONFIG_HOTPLUG_CPU
arch/arm64/kernel/suspend.c +9 -0
@@ -1,7 +1,9 @@#include <linux/ftrace.h> #include <linux/percpu.h> #include <linux/slab.h> +#include <asm/alternative.h> #include <asm/cacheflush.h> +#include <asm/cpufeature.h> #include <asm/debug-monitors.h> #include <asm/pgtable.h> #include <asm/memory.h>
@@ -111,6 +113,13 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))set_my_cpu_offset (per_cpu_offset (smp_processor_id ()));/* +* PSTATE was not saved over suspend/resume, re-enable any +* detected features that might not have been set correctly. +*/ + asm(ALTERNATIVE("nop", SET_PSTATE_PAN(1), ARM64_HAS_PAN, + CONFIG_ARM64_PAN)); + +/* * Restore HW breakpoint registers to sane values * before debug exceptions are possibly reenabled * through local_dbg_restore.
arch/arm64/mm/fault.c +11 -1
@@ -29,7 +29,9 @@#include <linux/sched.h> #include <linux/highmem.h> #include <linux/perf_event.h> +#include <linux/preempt.h> +#include <asm/bug.h> #include <asm/cpufeature.h> #include <asm/exception.h> #include <asm/debug-monitors.h>
@@ -606,8 +608,16 @@ asmlinkage int __exception do_debug_exception(unsigned long addr, }#ifdef CONFIG_ARM64_PAN -void cpu_enable_pan (void *__unused) +int cpu_enable_pan (void *__unused) { +/* +* We modify PSTATE. This won't work from irq context as the PSTATE +* is discarded once we return from the exception. +*/ +WARN_ON_ONCE (in_interrupt ()); +config_sctlr_el1 (SCTLR_EL1_SPAN ,0 ); + asm(SET_PSTATE_PAN(1)); +return 0 ; }#endif /* CONFIG_ARM64_PAN */
arch/x86/kernel/head_32.S +1 -1
@@ -571,7 +571,7 @@ early_idt_handler_common: movl %eax,%ds movl %eax,%es - cmpl $(__KERNEL_CS),32(%esp) + cmpw $(__KERNEL_CS),32(%esp) jne 10f leal 28(%esp),%eax # Pointer to %eip
drivers/block/zram/zram_drv.c +2 -1
@@ -1368,7 +1368,8 @@ static ssize_t hot_remove_store(struct class *class, zram =idr_find (&zram_index_idr, dev_id);if (zram) { ret =zram_remove (zram); -idr_remove (&zram_index_idr, dev_id); +if (!ret) +idr_remove (&zram_index_idr, dev_id); }else { ret = -ENODEV ; }
drivers/net/wireless/mwifiex/cfg80211.c +7 -6
@@ -2144,8 +2144,9 @@ done: is_scanning_required =1 ; }else {mwifiex_dbg (priv->adapter,MSG , -"info: trying to associate to '%s' bssid %pM\n" , - (char *)req_ssid.ssid, bss->bssid); +"info: trying to associate to '%.*s' bssid %pM\n" , + req_ssid.ssid_len, (char *)req_ssid.ssid, + bss->bssid);memcpy (&priv->cfg_bssid, bss->bssid,ETH_ALEN );break ; }
@@ -2202,8 +2203,8 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, }mwifiex_dbg (adapter,INFO , -"info: Trying to associate to %s and bssid %pM\n" , - (char *)sme->ssid, sme->bssid); +"info: Trying to associate to %.*s and bssid %pM\n" , + (int )sme->ssid_len, (char *)sme->ssid, sme->bssid); ret =mwifiex_cfg80211_assoc (priv, sme->ssid_len, sme->ssid, sme->bssid, priv->bss_mode, sme->channel, sme,0 );
@@ -2333,8 +2334,8 @@ mwifiex_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, }mwifiex_dbg (priv->adapter,MSG , -"info: trying to join to %s and bssid %pM\n" , - (char *)params->ssid, params->bssid); +"info: trying to join to %.*s and bssid %pM\n" , + params->ssid_len, (char *)params->ssid, params->bssid);mwifiex_set_ibss_params (priv, params);
drivers/pci/pcie/aer/aer_inject.c +0 -14
@@ -283,20 +283,6 @@ out:return 0 ; } -static struct pci_dev *pcie_find_root_port (struct pci_dev *dev) -{ -while (1 ) { -if (!pci_is_pcie (dev)) -break ; -if (pci_pcie_type (dev) ==PCI_EXP_TYPE_ROOT_PORT ) -return dev; -if (!dev->bus->self) -break ; - dev = dev->bus->self; - } -return NULL ; -} -static int find_aer_device_iter (struct device *device,void *data) {struct pcie_device **result = data;
drivers/pci/probe.c +27 -1
@@ -1415,6 +1415,21 @@ static void program_hpp_type1(struct pci_dev *dev, struct hpp_type1 *hpp)dev_warn (&dev->dev,"PCI-X settings not supported\n" ); } +static bool pcie_root_rcb_set (struct pci_dev *dev) +{ +struct pci_dev *rp =pcie_find_root_port (dev); +u16 lnkctl; + +if (!rp) +return false; + +pcie_capability_read_word (rp,PCI_EXP_LNKCTL , &lnkctl); +if (lnkctl &PCI_EXP_LNKCTL_RCB ) +return true; + +return false; +} +static void program_hpp_type2 (struct pci_dev *dev,struct hpp_type2 *hpp) {int pos;
@@ -1444,9 +1459,20 @@ static void program_hpp_type2(struct pci_dev *dev, struct hpp_type2 *hpp) ~hpp->pci_exp_devctl_and, hpp->pci_exp_devctl_or);/* Initialize Link Control Register */ -if (pcie_cap_has_lnkctl (dev)) +if (pcie_cap_has_lnkctl (dev)) { + +/* +* If the Root Port supports Read Completion Boundary of +* 128, set RCB to 128. Otherwise, clear it. +*/ + hpp->pci_exp_lnkctl_and |=PCI_EXP_LNKCTL_RCB ; + hpp->pci_exp_lnkctl_or &= ~PCI_EXP_LNKCTL_RCB ; +if (pcie_root_rcb_set (dev)) + hpp->pci_exp_lnkctl_or |=PCI_EXP_LNKCTL_RCB ; +pcie_capability_clear_and_set_word (dev,PCI_EXP_LNKCTL , ~hpp->pci_exp_lnkctl_and, hpp->pci_exp_lnkctl_or); + }/* Find Advanced Error Reporting Enhanced Capability */ pos =pci_find_ext_capability (dev,PCI_EXT_CAP_ID_ERR );
drivers/pwm/sysfs.c +2 -0
@@ -366,6 +366,8 @@ void pwmchip_sysfs_unexport_children(struct pwm_chip *chip)if (test_bit (PWMF_EXPORTED , &pwm->flags))pwm_unexport_child (parent, pwm); } + +put_device (parent); }static int __init pwm_sysfs_init (void )
include/linux/compiler-gcc.h +3 -1
@@ -251,7 +251,9 @@#endif #endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ -#if GCC_VERSION >=50000 +#if GCC_VERSION >=70000 +#define KASAN_ABI_VERSION 5 +#elif GCC_VERSION >=50000 #define KASAN_ABI_VERSION 4#elif GCC_VERSION >=40902 #define KASAN_ABI_VERSION 3
include/linux/pci.h +14 -0
@@ -1802,6 +1802,20 @@ static inline int pci_pcie_type(const struct pci_dev *dev)return (pcie_caps_reg (dev) &PCI_EXP_FLAGS_TYPE ) >>4 ; } +static inline struct pci_dev *pcie_find_root_port (struct pci_dev *dev) +{ +while (1 ) { +if (!pci_is_pcie (dev)) +break ; +if (pci_pcie_type (dev) ==PCI_EXP_TYPE_ROOT_PORT ) +return dev; +if (!dev->bus->self) +break ; + dev = dev->bus->self; + } +return NULL ; +} +void pci_request_acs (void );bool pci_acs_enabled (struct pci_dev *pdev,u16 acs_flags); bool pci_acs_path_enabled(struct pci_dev *start,
kernel/rcu/tree_plugin.h +1 -0
@@ -2275,6 +2275,7 @@ static int rcu_nocb_kthread(void *arg) cl++; c++;local_bh_enable (); +cond_resched_rcu_qs (); list = next; }trace_rcu_batch_end (rdp->rsp->name, c, !!list,0 ,0 ,1 );
mm/kasan/kasan.h +3 -0
@@ -52,6 +52,9 @@ struct kasan_global {#if KASAN_ABI_VERSION >=4 struct kasan_source_location *location;#endif +#if KASAN_ABI_VERSION >=5 +char *odr_indicator; +#endif };static inline const void *kasan_shadow_to_mem (const void *shadow_addr)
sound/core/pcm_lib.c +1 -1
@@ -1886,8 +1886,8 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)snd_timer_interrupt (substream->timer,1 );#endif _end: -snd_pcm_stream_unlock_irqrestore (substream, flags);kill_fasync (&runtime->fasync,SIGIO ,POLL_IN ); +snd_pcm_stream_unlock_irqrestore (substream, flags); }EXPORT_SYMBOL (snd_pcm_period_elapsed);