Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit 6ccab84

Browse files
committed
Merge 4.9.181 into android-4.9
Changes in 4.9.181 ipv6: Consider sk_bound_dev_if when binding a raw socket to an address llc: fix skb leak in llc_build_and_send_ui_pkt() net: fec: fix the clk mismatch in failed_reset path net-gro: fix use-after-free read in napi_gro_frags() net: stmmac: fix reset gpio free missing usbnet: fix kernel crash after disconnect tipc: Avoid copying bytes beyond the supplied data bnxt_en: Fix aggregation buffer leak under OOM condition. ipv4/igmp: fix another memory leak in igmpv3_del_delrec() ipv4/igmp: fix build error if !CONFIG_IP_MULTICAST net: dsa: mv88e6xxx: fix handling of upper half of STATS_TYPE_PORT net: mvneta: Fix err code path of probe net: mvpp2: fix bad MVPP2_TXQ_SCHED_TOKEN_CNTR_REG queue value crypto: vmx - ghash: do nosimd fallback manually xen/pciback: Don't disable PCI_COMMAND on PCI device reset. Revert "tipc: fix modprobe tipc failed after switch order of device registration" tipc: fix modprobe tipc failed after switch order of device registration sparc64: Fix regression in non-hypervisor TLB flush xcall include/linux/bitops.h: sanitize rotate primitives xhci: update bounce buffer with correct sg num xhci: Use %zu for printing size_t type xhci: Convert xhci_handshake() to use readl_poll_timeout_atomic() usb: xhci: avoid null pointer deref when bos field is NULL usbip: usbip_host: fix BUG: sleeping function called from invalid context usbip: usbip_host: fix stub_dev lock context imbalance regression USB: Fix slab-out-of-bounds write in usb_get_bos_descriptor USB: sisusbvga: fix oops in error path of sisusb_probe USB: Add LPM quirk for Surface Dock GigE adapter USB: rio500: refuse more than one device at a time USB: rio500: fix memory leak in close after disconnect media: usb: siano: Fix general protection fault in smsusb media: usb: siano: Fix false-positive "uninitialized variable" warning media: smsusb: better handle optional alignment scsi: zfcp: fix missing zfcp_port reference put on -EBUSY from port_remove scsi: zfcp: fix to prevent port_remove with pure auto scan LUNs (only sdevs) Btrfs: fix race updating log root item during fsync powerpc/perf: Fix MMCRA corruption by bhrb_filter ALSA: hda/realtek - Set default power save node to 0 drm/nouveau/i2c: Disable i2c bus access after ->fini() tty: serial: msm_serial: Fix XON/XOFF tty: max310x: Fix external crystal register setup memcg: make it work on sparse non-0-node systems kernel/signal.c: trace_signal_deliver when signal_group_exit docs: Fix conf.py for Sphinx 2.0 staging: vc04_services: prevent integer overflow in create_pagelist() CIFS: cifs_read_allocate_pages: don't iterate through whole page array on ENOMEM gcc-plugins: Fix build failures under Darwin host drm/vmwgfx: Don't send drm sysfs hotplug events on initial master set brcmfmac: add length checks in scheduled scan result handler brcmfmac: assure SSID length from firmware is limited brcmfmac: add subtype check for event handling in data path binder: Replace "%p" with "%pK" for stable binder: replace "%p" with "%pK" fs: prevent page refcount overflow in pipe_buf_get mm, gup: remove broken VM_BUG_ON_PAGE compound check for hugepages mm, gup: ensure real head page is ref-counted when using hugepages mm: prevent get_user_pages() from overflowing page refcount mm: make page ref count overflow check tighter and more explicit Revert "x86/build: Move _etext to actual end of .text" efi/libstub: Unify command line param parsing media: uvcvideo: Fix uvc_alloc_entity() allocation alignment ethtool: fix potential userspace buffer overflow neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query net: rds: fix memory leak in rds_ib_flush_mr_pool pktgen: do not sleep with the thread lock held. ipv6: fix EFAULT on sendto with icmpv6 and hdrincl ipv6: use READ_ONCE() for inet->hdrincl as in ipv4 Revert "fib_rules: fix error in backport of e9919a24d302 ("fib_rules: return 0...")" Revert "fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied" rcu: locking and unlocking need to always be at least barriers parisc: Use implicit space register selection for loading the coherence index of I/O pdirs fuse: fallocate: fix return with locked inode x86/power: Fix 'nosmt' vs hibernation triple fault during resume MIPS: pistachio: Build uImage.gz by default Revert "MIPS: perf: ath79: Fix perfcount IRQ assignment" genwqe: Prevent an integer overflow in the ioctl drm/gma500/cdv: Check vbt config bits when detecting lvds panels drm/radeon: prefer lower reference dividers drm/i915: Fix I915_EXEC_RING_MASK TTY: serial_core, add ->install fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock fuse: Add FOPEN_STREAM to use stream_open() ipv4: Define __ipv4_neigh_lookup_noref when CONFIG_INET is disabled ethtool: check the return value of get_regs_len Linux 4.9.181 Signed-off-by: Greg Kroah-Hartman <[email protected]>
2 parents 83ae225 + 3ffb240 commit 6ccab84

File tree

101 files changed

+1202
-397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1202
-397
lines changed

Documentation/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
extensions = ['kernel-doc', 'rstFlatTable', 'kernel_include', 'cdomain']
3838

3939
# The name of the math extension changed on Sphinx 1.4
40-
if major == 1 and minor > 3:
40+
if (major == 1 and minor > 3) or (major > 1):
4141
extensions.append("sphinx.ext.imgmath")
4242
else:
4343
extensions.append("sphinx.ext.pngmath")

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 9
3-
SUBLEVEL = 180
3+
SUBLEVEL = 181
44
EXTRAVERSION =
55
NAME = Roaring Lionus
66

arch/mips/ath79/setup.c

+6
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ const char *get_system_type(void)
183183
return ath79_sys_type;
184184
}
185185

186+
int get_c0_perfcount_int(void)
187+
{
188+
return ATH79_MISC_IRQ(5);
189+
}
190+
EXPORT_SYMBOL_GPL(get_c0_perfcount_int);
191+
186192
unsigned int get_c0_compare_int(void)
187193
{
188194
return CP0_LEGACY_COMPARE_IRQ;

arch/mips/pistachio/Platform

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ cflags-$(CONFIG_MACH_PISTACHIO) += \
66
-I$(srctree)/arch/mips/include/asm/mach-pistachio
77
load-$(CONFIG_MACH_PISTACHIO) += 0xffffffff80400000
88
zload-$(CONFIG_MACH_PISTACHIO) += 0xffffffff81000000
9+
all-$(CONFIG_MACH_PISTACHIO) := uImage.gz

arch/powerpc/perf/core-book3s.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -1800,6 +1800,7 @@ static int power_pmu_event_init(struct perf_event *event)
18001800
int n;
18011801
int err;
18021802
struct cpu_hw_events *cpuhw;
1803+
u64 bhrb_filter;
18031804

18041805
if (!ppmu)
18051806
return -ENOENT;
@@ -1896,13 +1897,14 @@ static int power_pmu_event_init(struct perf_event *event)
18961897
err = power_check_constraints(cpuhw, events, cflags, n + 1);
18971898

18981899
if (has_branch_stack(event)) {
1899-
cpuhw->bhrb_filter = ppmu->bhrb_filter_map(
1900+
bhrb_filter = ppmu->bhrb_filter_map(
19001901
event->attr.branch_sample_type);
19011902

1902-
if (cpuhw->bhrb_filter == -1) {
1903+
if (bhrb_filter == -1) {
19031904
put_cpu_var(cpu_hw_events);
19041905
return -EOPNOTSUPP;
19051906
}
1907+
cpuhw->bhrb_filter = bhrb_filter;
19061908
}
19071909

19081910
put_cpu_var(cpu_hw_events);

arch/powerpc/perf/power8-pmu.c

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ enum {
2929
#define POWER8_MMCRA_IFM1 0x0000000040000000UL
3030
#define POWER8_MMCRA_IFM2 0x0000000080000000UL
3131
#define POWER8_MMCRA_IFM3 0x00000000C0000000UL
32+
#define POWER8_MMCRA_BHRB_MASK 0x00000000C0000000UL
3233

3334
/* Table of alternatives, sorted by column 0 */
3435
static const unsigned int event_alternatives[][MAX_ALT] = {
@@ -262,6 +263,8 @@ static u64 power8_bhrb_filter_map(u64 branch_sample_type)
262263

263264
static void power8_config_bhrb(u64 pmu_bhrb_filter)
264265
{
266+
pmu_bhrb_filter &= POWER8_MMCRA_BHRB_MASK;
267+
265268
/* Enable BHRB filter in PMU */
266269
mtspr(SPRN_MMCRA, (mfspr(SPRN_MMCRA) | pmu_bhrb_filter));
267270
}

arch/powerpc/perf/power9-pmu.c

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ enum {
3030
#define POWER9_MMCRA_IFM1 0x0000000040000000UL
3131
#define POWER9_MMCRA_IFM2 0x0000000080000000UL
3232
#define POWER9_MMCRA_IFM3 0x00000000C0000000UL
33+
#define POWER9_MMCRA_BHRB_MASK 0x00000000C0000000UL
3334

3435
GENERIC_EVENT_ATTR(cpu-cycles, PM_CYC);
3536
GENERIC_EVENT_ATTR(stalled-cycles-frontend, PM_ICT_NOSLOT_CYC);
@@ -177,6 +178,8 @@ static u64 power9_bhrb_filter_map(u64 branch_sample_type)
177178

178179
static void power9_config_bhrb(u64 pmu_bhrb_filter)
179180
{
181+
pmu_bhrb_filter &= POWER9_MMCRA_BHRB_MASK;
182+
180183
/* Enable BHRB filter in PMU */
181184
mtspr(SPRN_MMCRA, (mfspr(SPRN_MMCRA) | pmu_bhrb_filter));
182185
}

arch/sparc/mm/ultra.S

+2-2
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ xcall_flush_tlb_kernel_range: /* 44 insns */
586586
sub %g7, %g1, %g3
587587
srlx %g3, 18, %g2
588588
brnz,pn %g2, 2f
589-
add %g2, 1, %g2
589+
sethi %hi(PAGE_SIZE), %g2
590590
sub %g3, %g2, %g3
591591
or %g1, 0x20, %g1 ! Nucleus
592592
1: stxa %g0, [%g1 + %g3] ASI_DMMU_DEMAP
@@ -750,7 +750,7 @@ __cheetah_xcall_flush_tlb_kernel_range: /* 44 insns */
750750
sub %g7, %g1, %g3
751751
srlx %g3, 18, %g2
752752
brnz,pn %g2, 2f
753-
add %g2, 1, %g2
753+
sethi %hi(PAGE_SIZE), %g2
754754
sub %g3, %g2, %g3
755755
or %g1, 0x20, %g1 ! Nucleus
756756
1: stxa %g0, [%g1 + %g3] ASI_DMMU_DEMAP

arch/x86/power/cpu.c

+10
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,17 @@ int hibernate_resume_nonboot_cpu_disable(void)
292292
* address in its instruction pointer may not be possible to resolve
293293
* any more at that point (the page tables used by it previously may
294294
* have been overwritten by hibernate image data).
295+
*
296+
* First, make sure that we wake up all the potentially disabled SMT
297+
* threads which have been initially brought up and then put into
298+
* mwait/cpuidle sleep.
299+
* Those will be put to proper (not interfering with hibernation
300+
* resume) sleep afterwards, and the resumed kernel will decide itself
301+
* what to do with them.
295302
*/
303+
ret = cpuhp_smt_enable();
304+
if (ret)
305+
return ret;
296306
smp_ops.play_dead = resume_play_dead;
297307
ret = disable_nonboot_cpus();
298308
smp_ops.play_dead = play_dead;

arch/x86/power/hibernate_64.c

+33
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/gfp.h>
1212
#include <linux/smp.h>
1313
#include <linux/suspend.h>
14+
#include <linux/cpu.h>
1415

1516
#include <asm/init.h>
1617
#include <asm/proto.h>
@@ -218,3 +219,35 @@ int arch_hibernation_header_restore(void *addr)
218219
restore_cr3 = rdr->cr3;
219220
return (rdr->magic == RESTORE_MAGIC) ? 0 : -EINVAL;
220221
}
222+
223+
int arch_resume_nosmt(void)
224+
{
225+
int ret = 0;
226+
/*
227+
* We reached this while coming out of hibernation. This means
228+
* that SMT siblings are sleeping in hlt, as mwait is not safe
229+
* against control transition during resume (see comment in
230+
* hibernate_resume_nonboot_cpu_disable()).
231+
*
232+
* If the resumed kernel has SMT disabled, we have to take all the
233+
* SMT siblings out of hlt, and offline them again so that they
234+
* end up in mwait proper.
235+
*
236+
* Called with hotplug disabled.
237+
*/
238+
cpu_hotplug_enable();
239+
if (cpu_smt_control == CPU_SMT_DISABLED ||
240+
cpu_smt_control == CPU_SMT_FORCE_DISABLED) {
241+
enum cpuhp_smt_control old = cpu_smt_control;
242+
243+
ret = cpuhp_smt_enable();
244+
if (ret)
245+
goto out;
246+
ret = cpuhp_smt_disable(old);
247+
if (ret)
248+
goto out;
249+
}
250+
out:
251+
cpu_hotplug_disable();
252+
return ret;
253+
}

0 commit comments

Comments
 (0)