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

Commit 748d7271 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 4.14.165 into android-4.14



Changes in 4.14.165
	chardev: Avoid potential use-after-free in 'chrdev_open()'
	usb: chipidea: host: Disable port power only if previously enabled
	ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5
	ALSA: hda/realtek - Add new codec supported for ALCS1200A
	ALSA: hda/realtek - Set EAPD control to default for ALC222
	kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task fail
	tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined
	HID: Fix slab-out-of-bounds read in hid_field_extract
	HID: uhid: Fix returning EPOLLOUT from uhid_char_poll
	can: gs_usb: gs_usb_probe(): use descriptors of current altsetting
	can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode
	can: can_dropped_invalid_skb(): ensure an initialized headroom in outgoing CAN sk_buffs
	gpiolib: acpi: Turn dmi_system_id table into a generic quirk table
	gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism
	staging: vt6656: set usb_set_intfdata on driver fail.
	USB: serial: option: add ZLP support for 0x1bc7/0x9010
	usb: musb: fix idling for suspend after disconnect interrupt
	usb: musb: Disable pullup at init
	usb: musb: dma: Correct parameter passed to IRQ handler
	staging: comedi: adv_pci1710: fix AI channels 16-31 for PCI-1713
	HID: hid-input: clear unmapped usages
	Input: add safety guards to input_set_keycode()
	drm/fb-helper: Round up bits_per_pixel if possible
	drm/dp_mst: correct the shifting in DP_REMOTE_I2C_READ
	staging: rtl8188eu: Add device code for TP-Link TL-WN727N v5.21
	tty: link tty and port before configuring it as console
	tty: always relink the port
	mwifiex: fix possible heap overflow in mwifiex_process_country_ie()
	mwifiex: pcie: Fix memory leak in mwifiex_pcie_alloc_cmdrsp_buf
	scsi: bfa: release allocated memory in case of error
	rtl8xxxu: prevent leaking urb
	ath10k: fix memory leak
	arm64: cpufeature: Avoid warnings due to unused symbols
	HID: hiddev: fix mess in hiddev_open()
	USB: Fix: Don't skip endpoint descriptors with maxpacket=0
	phy: cpcap-usb: Fix error path when no host driver is loaded
	phy: cpcap-usb: Fix flakey host idling and enumerating of devices
	netfilter: arp_tables: init netns pointer in xt_tgchk_param struct
	netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present
	drm/i915/gen9: Clear residual context state on context switch
	Linux 4.14.165

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia2165e5228d420a483a05f2145f15255047446bc
parents d3b701ef c04fc6fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 14
SUBLEVEL = 164
SUBLEVEL = 165
EXTRAVERSION =
NAME = Petit Gorille

+7 −5
Original line number Diff line number Diff line
@@ -804,11 +804,6 @@ static bool has_no_hw_prefetch(const struct arm64_cpu_capabilities *entry, int _
		MIDR_CPU_VAR_REV(1, MIDR_REVISION_MASK));
}

static bool runs_at_el2(const struct arm64_cpu_capabilities *entry, int __unused)
{
	return is_kernel_in_hyp_mode();
}

static bool hyp_offset_low(const struct arm64_cpu_capabilities *entry,
			   int __unused)
{
@@ -942,6 +937,12 @@ static int __init parse_kpti(char *str)
}
early_param("kpti", parse_kpti);

#ifdef CONFIG_ARM64_VHE
static bool runs_at_el2(const struct arm64_cpu_capabilities *entry, int __unused)
{
	return is_kernel_in_hyp_mode();
}

static void cpu_copy_el2regs(const struct arm64_cpu_capabilities *__unused)
{
	/*
@@ -955,6 +956,7 @@ static void cpu_copy_el2regs(const struct arm64_cpu_capabilities *__unused)
	if (!alternatives_applied)
		write_sysreg(read_sysreg(tpidr_el1), tpidr_el2);
}
#endif

#ifdef CONFIG_ARM64_SSBD
static int ssbs_emulation_handler(struct pt_regs *regs, u32 instr)
+46 −5
Original line number Diff line number Diff line
@@ -24,11 +24,19 @@

#include "gpiolib.h"

#define QUIRK_NO_EDGE_EVENTS_ON_BOOT		0x01l
#define QUIRK_NO_WAKEUP				0x02l

static int run_edge_events_on_boot = -1;
module_param(run_edge_events_on_boot, int, 0444);
MODULE_PARM_DESC(run_edge_events_on_boot,
		 "Run edge _AEI event-handlers at boot: 0=no, 1=yes, -1=auto");

static int honor_wakeup = -1;
module_param(honor_wakeup, int, 0444);
MODULE_PARM_DESC(honor_wakeup,
		 "Honor the ACPI wake-capable flag: 0=no, 1=yes, -1=auto");

/**
 * struct acpi_gpio_event - ACPI GPIO event handler data
 *
@@ -339,7 +347,7 @@ static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares,
	event->handle = evt_handle;
	event->handler = handler;
	event->irq = irq;
	event->irq_is_wake = agpio->wake_capable == ACPI_WAKE_CAPABLE;
	event->irq_is_wake = honor_wakeup && agpio->wake_capable == ACPI_WAKE_CAPABLE;
	event->pin = pin;
	event->desc = desc;

@@ -1312,7 +1320,7 @@ static int acpi_gpio_handle_deferred_request_irqs(void)
/* We must use _sync so that this runs after the first deferred_probe run */
late_initcall_sync(acpi_gpio_handle_deferred_request_irqs);

static const struct dmi_system_id run_edge_events_on_boot_blacklist[] = {
static const struct dmi_system_id gpiolib_acpi_quirks[] = {
	{
		/*
		 * The Minix Neo Z83-4 has a micro-USB-B id-pin handler for
@@ -1322,7 +1330,8 @@ static const struct dmi_system_id run_edge_events_on_boot_blacklist[] = {
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "MINIX"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Z83-4"),
		}
		},
		.driver_data = (void *)QUIRK_NO_EDGE_EVENTS_ON_BOOT,
	},
	{
		/*
@@ -1334,20 +1343,52 @@ static const struct dmi_system_id run_edge_events_on_boot_blacklist[] = {
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Wortmann_AG"),
			DMI_MATCH(DMI_PRODUCT_NAME, "TERRA_PAD_1061"),
		}
		},
		.driver_data = (void *)QUIRK_NO_EDGE_EVENTS_ON_BOOT,
	},
	{
		/*
		 * Various HP X2 10 Cherry Trail models use an external
		 * embedded-controller connected via I2C + an ACPI GPIO
		 * event handler. The embedded controller generates various
		 * spurious wakeup events when suspended. So disable wakeup
		 * for its handler (it uses the only ACPI GPIO event handler).
		 * This breaks wakeup when opening the lid, the user needs
		 * to press the power-button to wakeup the system. The
		 * alternative is suspend simply not working, which is worse.
		 */
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "HP"),
			DMI_MATCH(DMI_PRODUCT_NAME, "HP x2 Detachable 10-p0XX"),
		},
		.driver_data = (void *)QUIRK_NO_WAKEUP,
	},
	{} /* Terminating entry */
};

static int acpi_gpio_setup_params(void)
{
	const struct dmi_system_id *id;
	long quirks = 0;

	id = dmi_first_match(gpiolib_acpi_quirks);
	if (id)
		quirks = (long)id->driver_data;

	if (run_edge_events_on_boot < 0) {
		if (dmi_check_system(run_edge_events_on_boot_blacklist))
		if (quirks & QUIRK_NO_EDGE_EVENTS_ON_BOOT)
			run_edge_events_on_boot = 0;
		else
			run_edge_events_on_boot = 1;
	}

	if (honor_wakeup < 0) {
		if (quirks & QUIRK_NO_WAKEUP)
			honor_wakeup = 0;
		else
			honor_wakeup = 1;
	}

	return 0;
}

+1 −1
Original line number Diff line number Diff line
@@ -274,7 +274,7 @@ static void drm_dp_encode_sideband_req(struct drm_dp_sideband_msg_req_body *req,
			memcpy(&buf[idx], req->u.i2c_read.transactions[i].bytes, req->u.i2c_read.transactions[i].num_bytes);
			idx += req->u.i2c_read.transactions[i].num_bytes;

			buf[idx] = (req->u.i2c_read.transactions[i].no_stop_bit & 0x1) << 5;
			buf[idx] = (req->u.i2c_read.transactions[i].no_stop_bit & 0x1) << 4;
			buf[idx] |= (req->u.i2c_read.transactions[i].i2c_transaction_delay & 0xf);
			idx++;
		}
+6 −1
Original line number Diff line number Diff line
@@ -1590,7 +1590,7 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
	 * Changes struct fb_var_screeninfo are currently not pushed back
	 * to KMS, hence fail if different settings are requested.
	 */
	if (var->bits_per_pixel != fb->format->cpp[0] * 8 ||
	if (var->bits_per_pixel > fb->format->cpp[0] * 8 ||
	    var->xres > fb->width || var->yres > fb->height ||
	    var->xres_virtual > fb->width || var->yres_virtual > fb->height) {
		DRM_DEBUG("fb requested width/height/bpp can't fit in current fb "
@@ -1615,6 +1615,11 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
		drm_fb_helper_fill_pixel_fmt(var, fb->format->depth);
	}

	/*
	 * Likewise, bits_per_pixel should be rounded up to a supported value.
	 */
	var->bits_per_pixel = fb->format->cpp[0] * 8;

	/*
	 * drm fbdev emulation doesn't support changing the pixel format at all,
	 * so reject all pixel format changing requests.
Loading