[PATCH 5.7 062/393] block: dont do revalidate zones on invalid devices

2020-08-17 Thread Greg Kroah-Hartman
From: Johannes Thumshirn [ Upstream commit 1a1206dc4cf02cee4b5cbce583ee4c22368b4c28 ] When we loose a device for whatever reason while (re)scanning zones, we trip over a NULL pointer in blk_revalidate_zone_cb, like in the following log: sd 0:0:0:0: [sda] 3418095616 4096-byte logical blocks:

[PATCH 5.7 059/393] nvme-rdma: fix controller reset hang during traffic

2020-08-17 Thread Greg Kroah-Hartman
From: Sagi Grimberg [ Upstream commit 9f98772ba307dd89a3d17dc2589f213d3972fc64 ] commit fe35ec58f0d3 ("block: update hctx map when use multiple maps") exposed an issue where we may hang trying to wait for queue freeze during I/O. We call blk_mq_update_nr_hw_queues which in case of multiple

[PATCH 5.7 061/393] nvme-multipath: do not fall back to __nvme_find_path() for non-optimized paths

2020-08-17 Thread Greg Kroah-Hartman
From: Hannes Reinecke [ Upstream commit fbd6a42d8932e172921c7de10468a2e12c34846b ] When nvme_round_robin_path() finds a valid namespace we should be using it; falling back to __nvme_find_path() for non-optimized paths will cause the result from nvme_round_robin_path() to be ignored for

[PATCH 5.7 058/393] nvme-tcp: fix controller reset hang during traffic

2020-08-17 Thread Greg Kroah-Hartman
From: Sagi Grimberg [ Upstream commit 2875b0aecabe2f081a8432e2bc85b85df0529490 ] commit fe35ec58f0d3 ("block: update hctx map when use multiple maps") exposed an issue where we may hang trying to wait for queue freeze during I/O. We call blk_mq_update_nr_hw_queues which in case of multiple

[PATCH 5.7 063/393] drm/tilcdc: fix leak & null ref in panel_connector_get_modes

2020-08-17 Thread Greg Kroah-Hartman
From: Tomi Valkeinen [ Upstream commit 3f9c1c872cc97875ddc8d63bc9fe6ee13652b933 ] If videomode_from_timings() returns true, the mode allocated with drm_mode_create will be leaked. Also, the return value of drm_mode_create() is never checked, and thus could cause NULL deref. Fix these two

[PATCH 5.7 054/393] md: raid0/linear: fix dereference before null check on pointer mddev

2020-08-17 Thread Greg Kroah-Hartman
From: Colin Ian King [ Upstream commit 9a5a85972c073f720d81a7ebd08bfe278e6e16db ] Pointer mddev is being dereferenced with a test_bit call before mddev is being null checked, this may cause a null pointer dereference. Fix this by moving the null pointer checks to sanity check mddev before it is

[PATCH 5.7 097/393] drm/amd/powerplay: fix compile error with ARCH=arc

2020-08-17 Thread Greg Kroah-Hartman
From: Evan Quan [ Upstream commit 9822ba2ead1baa3de4860ad9472f652c4cc78c9c ] Fix the compile error below: drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c: In function 'smu_v11_0_init_microcode': >> arch/arc/include/asm/bug.h:22:2: error: implicit declaration of function >> 'pr_warn'; did

[PATCH 5.7 088/393] drm/msm: Fix a null pointer access in msm_gem_shrinker_count()

2020-08-17 Thread Greg Kroah-Hartman
From: Akhil P Oommen [ Upstream commit 3cbdc8d8b7f39a7af3ea7b8dfa75caaebfda4e56 ] Adding an msm_gem_object object to the inactive_list before completing its initialization is a bad idea because shrinker may pick it up from the inactive_list. Fix this by making sure that the initialization is

[PATCH 5.7 100/393] brcmfmac: keep SDIO watchdog running when console_interval is non-zero

2020-08-17 Thread Greg Kroah-Hartman
From: Wright Feng [ Upstream commit eccbf46b15bb3e35d004148f7c3a8fa8e9b26c1e ] brcmfmac host driver makes SDIO bus sleep and stops SDIO watchdog if no pending event or data. As a result, host driver does not poll firmware console buffer before buffer overflow, which leads to missing firmware

[PATCH 5.7 109/393] mmc: sdhci-pci-o2micro: Bug fix for O2 host controller Seabird1

2020-08-17 Thread Greg Kroah-Hartman
From: shirley her [ Upstream commit cdd2b769789ae1a030e1a26f6c37c5833cabcb34 ] To fix support for the O2 host controller Seabird1, set the quirk SDHCI_QUIRK2_PRESET_VALUE_BROKEN and the capability bit MMC_CAP2_NO_SDIO. Moreover, assign the ->get_cd() callback. Signed-off-by: Shirley Her Link:

[PATCH 5.7 111/393] bdc: Fix bug causing crash after multiple disconnects

2020-08-17 Thread Greg Kroah-Hartman
From: Sasi Kumar [ Upstream commit a95bdfd22076497288868c028619bc5995f5cc7f ] Multiple connects/disconnects can cause a crash on the second disconnect. The driver had a problem where it would try to send endpoint commands after it was disconnected which is not allowed by the hardware. The fix

[PATCH 5.7 113/393] dyndbg: fix a BUG_ON in ddebug_describe_flags

2020-08-17 Thread Greg Kroah-Hartman
From: Jim Cromie [ Upstream commit f678ce8cc3cb2ad29df75d8824c74f36398ba871 ] ddebug_describe_flags() currently fills a caller provided string buffer, after testing its size (also passed) in a BUG_ON. Fix this by replacing them with a known-big-enough string buffer wrapped in a struct, and

[PATCH 5.7 112/393] usb: bdc: Halt controller on suspend

2020-08-17 Thread Greg Kroah-Hartman
From: Danesh Petigara [ Upstream commit 5fc453d7de3d0c345812453823a3a56783c5f82c ] GISB bus error kernel panics have been observed during S2 transition tests on the 7271t platform. The errors are a result of the BDC interrupt handler trying to access BDC register space after the system's

[PATCH 5.7 115/393] btrfs: allow btrfs_truncate_block() to fallback to nocow for data space reservation

2020-08-17 Thread Greg Kroah-Hartman
From: Qu Wenruo [ Upstream commit 6d4572a9d71d5fc2affee0258d8582d39859188c ] [BUG] When the data space is exhausted, even if the inode has NOCOW attribute, we will still refuse to truncate unaligned range due to ENOSPC. The following script can reproduce it pretty easily: #!/bin/bash

[PATCH 5.7 117/393] ACPICA: Do not increment operation_region reference counts for field units

2020-08-17 Thread Greg Kroah-Hartman
From: Erik Kaneda [ Upstream commit 6a54ebae6d047c988a31f5ac5a64ab5cf83797a2 ] ACPICA commit e17b28cfcc31918d0db9547b6b274b09c413eb70 Object reference counts are used as a part of ACPICA's garbage collection mechanism. This mechanism keeps track of references to heap-allocated structures such

[PATCH 5.7 090/393] drm/radeon: disable AGP by default

2020-08-17 Thread Greg Kroah-Hartman
From: Christian König [ Upstream commit ba806f98f868ce107aa9c453fef751de9980e4af ] Always use the PCI GART instead. We just have to many cases where AGP still causes problems. This means a performance regression for some GPUs, but also a bug fix for some others. Signed-off-by: Christian König

[PATCH 5.7 095/393] drm/amdgpu/display bail early in dm_pp_get_static_clocks

2020-08-17 Thread Greg Kroah-Hartman
From: Alex Deucher [ Upstream commit 376814f5fcf1aadda501d1413d56e8af85d19a97 ] If there are no supported callbacks. We'll fall back to the nominal clocks. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1170 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin

[PATCH 5.7 092/393] irqchip/irq-mtk-sysirq: Replace spinlock with raw_spinlock

2020-08-17 Thread Greg Kroah-Hartman
From: Bartosz Golaszewski [ Upstream commit 6eeb997ab5075e770a002c51351fa4ec2c6b5c39 ] This driver may take a regular spinlock when a raw spinlock (irq_desc->lock) is already taken which results in the following lockdep splat: = [ BUG: Invalid wait context ]

[PATCH 5.7 130/393] btmrvl: Fix firmware filename for sd8997 chipset

2020-08-17 Thread Greg Kroah-Hartman
From: Pali Rohár [ Upstream commit 00eb0cb36fad53315047af12e83c643d3a2c2e49 ] Firmware for sd8997 chipset is distributed by Marvell package and also as part of the linux-firmware repository in filename sdsd8997_combo_v4.bin. This patch fixes mwifiex driver to load correct firmware file for

[PATCH 5.7 132/393] console: newport_con: fix an issue about leak related system resources

2020-08-17 Thread Greg Kroah-Hartman
From: Dejin Zheng [ Upstream commit fd4b8243877250c05bb24af7fea5567110c9720b ] A call of the function do_take_over_console() can fail here. The corresponding system resources were not released then. Thus add a call of iounmap() and release_mem_region() together with the check of a failure

[PATCH 5.7 134/393] Bluetooth: hci_qca: Fix an error pointer dereference

2020-08-17 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit 4c07a5d7aeb39f559b29aa58ec9a8a5ab4282cb0 ] When a function like devm_clk_get_optional() function returns both error pointers on error and NULL then the NULL return means that the optional feature is deliberately disabled. It is a special sort of success

[PATCH 5.7 133/393] video: pxafb: Fix the function used to balance a dma_alloc_coherent() call

2020-08-17 Thread Greg Kroah-Hartman
From: Christophe JAILLET [ Upstream commit 499a2c41b954518c372873202d5e7714e22010c4 ] 'dma_alloc_coherent()' must be balanced by a call to 'dma_free_coherent()' not 'dma_free_wc()'. The correct dma_free_ function is already used in the error handling path of the probe function. Fixes:

[PATCH 5.7 146/393] clk: bcm63xx-gate: fix last clock availability

2020-08-17 Thread Greg Kroah-Hartman
From: Álvaro Fernández Rojas [ Upstream commit cf8030d7035bd3e89c9e66f7193a7fc8057a9b9a ] In order to make the last clock available, maxbit has to be set to the highest bit value plus 1. Fixes: 1c099779c1e2 ("clk: add BCM63XX gated clock controller driver") Signed-off-by: Álvaro Fernández

[PATCH 5.7 140/393] iio: improve IIO_CONCENTRATION channel type description

2020-08-17 Thread Greg Kroah-Hartman
From: Tomasz Duszynski [ Upstream commit df16c33a4028159d1ba8a7061c9fa950b58d1a61 ] IIO_CONCENTRATION together with INFO_RAW specifier is used for reporting raw concentrations of pollutants. Raw value should be meaningless before being properly scaled. Because of that description shouldn't

[PATCH 5.7 151/393] Bluetooth: btmtksdio: fix up firmware download sequence

2020-08-17 Thread Greg Kroah-Hartman
From: Sean Wang [ Upstream commit 737cd06072a72e8984e41af8e5919338d0c5bf2b ] Data RAM on the device have to be powered on before starting to download the firmware. Fixes: 9aebfd4a2200 ("Bluetooth: mediatek: add support for MediaTek MT7663S and MT7668S SDIO devices") Co-developed-by: Mark Chen

[PATCH 5.7 145/393] drm/arm: fix unintentional integer overflow on left shift

2020-08-17 Thread Greg Kroah-Hartman
From: Colin Ian King [ Upstream commit 5f368ddea6fec519bdb93b5368f6a844b6ea27a6 ] Shifting the integer value 1 is evaluated using 32-bit arithmetic and then used in an expression that expects a long value leads to a potential integer overflow. Fix this by using the BIT macro to perform the

[PATCH 5.7 125/393] drm/amdgpu: use the unlocked drm_gem_object_put

2020-08-17 Thread Greg Kroah-Hartman
From: Emil Velikov [ Upstream commit 1a87f67a66de4ad0c0d79fd86b6c5273143387c3 ] The driver does not hold struct_mutex, thus using the locked version of the helper is incorrect. Cc: Alex Deucher Cc: Christian König Cc: amd-...@lists.freedesktop.org Fixes: a39414716ca0 ("drm/amdgpu: add

[PATCH 5.7 152/393] media: cxusb-analog: fix V4L2 dependency

2020-08-17 Thread Greg Kroah-Hartman
From: Arnd Bergmann [ Upstream commit 1a55caf010c46d4f2073f9e92e97ef65358c16bf ] CONFIG_DVB_USB_CXUSB_ANALOG is a 'bool' symbol with a dependency on the tristate CONFIG_VIDEO_V4L2, which means it can be enabled as =y even when its dependency is =m. This leads to a link failure:

[PATCH 5.7 126/393] agp/intel: Fix a memory leak on module initialisation failure

2020-08-17 Thread Greg Kroah-Hartman
From: Qiushi Wu [ Upstream commit b975abbd382fe442713a4c233549abb90e57c22b ] In intel_gtt_setup_scratch_page(), pointer "page" is not released if pci_dma_mapping_error() return an error, leading to a memory leak on module initialisation failure. Simply fix this issue by freeing "page" before

[PATCH 5.7 165/393] lkdtm: Avoid more compiler optimizations for bad writes

2020-08-17 Thread Greg Kroah-Hartman
From: Kees Cook [ Upstream commit 464e86b4abadfc490f426954b431e2ec6a9d7bd2 ] It seems at least Clang is able to throw away writes it knows are destined for read-only memory, which makes things like the WRITE_RO test fail, as the write gets elided. Instead, force the variable to be volatile, and

[PATCH 5.7 169/393] tracing: Move pipe reference to trace array instead of current_tracer

2020-08-17 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) [ Upstream commit 7ef282e05132d56b6f6b71e3873f317664bea78b ] If a process has the trace_pipe open on a trace_array, the current tracer for that trace array should not be changed. This was original enforced by a global lock, but when instances were introduced, it

[PATCH 5.7 171/393] drm/radeon: fix array out-of-bounds read and write issues

2020-08-17 Thread Greg Kroah-Hartman
From: Colin Ian King [ Upstream commit 7ee78aff9de13d5dccba133f4a0de5367194b243 ] There is an off-by-one bounds check on the index into arrays table->mc_reg_address and table->mc_reg_table_entry[k].mc_data[j] that can lead to reads and writes outside of arrays. Fix the bound checking off-by-one

[PATCH 5.7 172/393] staging: vchiq_arm: Add a matching unregister call

2020-08-17 Thread Greg Kroah-Hartman
From: Phil Elwell [ Upstream commit 5d9272e28a9a6117fb63f5f930991304765caa32 ] All the registered children of vchiq have a corresponding call to platform_device_unregister except bcm2835_audio. Fix that. Fixes: 25c7597af20d ("staging: vchiq_arm: Register a platform device for audio")

[PATCH 5.7 176/393] scsi: powertec: Fix different dev_id between request_irq() and free_irq()

2020-08-17 Thread Greg Kroah-Hartman
From: Christophe JAILLET [ Upstream commit d179f7c763241c1dc5077fca88ddc3c47d21b763 ] The dev_id used in request_irq() and free_irq() should match. Use 'info' in both cases. Link: https://lore.kernel.org/r/20200626035948.944148-1-christophe.jail...@wanadoo.fr Fixes: 1da177e4c3f4

[PATCH 5.7 175/393] RDMA/core: Fix bogus WARN_ON during ib_unregister_device_queued()

2020-08-17 Thread Greg Kroah-Hartman
From: Jason Gunthorpe [ Upstream commit 0cb42c0265837fafa2b4f302c8a7fed2631d7869 ] ib_unregister_device_queued() can only be used by drivers using the new dealloc_device callback flow, and it has a safety WARN_ON to ensure drivers are using it properly. However, if unregister and register are

[PATCH 5.7 180/393] media: allegro: Fix some NULL vs IS_ERR() checks in probe

2020-08-17 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit d93d45ab716e4107056be54969c8c70e50a8346d ] The devm_ioremap() function doesn't return error pointers, it returns NULL on error. Fixes: f20387dfd065 ("media: allegro: add Allegro DVT video IP core driver") Signed-off-by: Dan Carpenter Signed-off-by: Hans

[PATCH 5.7 181/393] media: staging: rkisp1: rsz: supported formats are the isps src formats, not sink formats

2020-08-17 Thread Greg Kroah-Hartman
From: Dafna Hirschfeld [ Upstream commit 7b8ce1f2763b9351a4cb04b802835470e76770a5 ] The rkisp1_resizer's enum callback 'rkisp1_rsz_enum_mbus_code' calls the enum callback of the 'rkisp1_isp' on it's video sink pad. This is a bug, the resizer should support the same formats supported by the

[PATCH 5.7 178/393] ipvs: allow connection reuse for unconfirmed conntrack

2020-08-17 Thread Greg Kroah-Hartman
From: Julian Anastasov [ Upstream commit f0a5e4d7a594e0fe237d3dfafb069bb82f80f42f ] YangYuxi is reporting that connection reuse is causing one-second delay when SYN hits existing connection in TIME_WAIT state. Such delay was added to give time to expire both the IPVS connection and the

[PATCH 5.7 182/393] media: staging: rkisp1: rsz: fix resolution limitation on sink pad

2020-08-17 Thread Greg Kroah-Hartman
From: Helen Koike [ Upstream commit 906dceb48dfa1e7c99c32e6b25878d47023e916b ] Resizer sink pad is limited by what the ISP can generate. The configurations describes what the resizer can produce. This was tested on a Scarlet device with ChromiumOs, where the selfpath receives 2592x1944 and

[PATCH 5.7 183/393] media: tvp5150: Add missed media_entity_cleanup()

2020-08-17 Thread Greg Kroah-Hartman
From: Chuhong Yuan [ Upstream commit d000e9b5e4a23dd700b3f58a4738c94bb5179ff0 ] This driver does not call media_entity_cleanup() in the error handler of tvp5150_registered() and tvp5150_remove(), while it has called media_entity_pads_init() at first. Add the missed calls to fix it. Fixes:

[PATCH 5.7 179/393] media: firewire: Using uninitialized values in node_probe()

2020-08-17 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit 2505a210fc126599013aec2be741df20aaacc490 ] If fw_csr_string() returns -ENOENT, then "name" is uninitialized. So then the "strlen(model_names[i]) <= name_len" is true because strlen() is unsigned and -ENOENT is type promoted to a very high positive value.

[PATCH 5.7 157/393] ASoC: SOF: nocodec: add missing .owner field

2020-08-17 Thread Greg Kroah-Hartman
From: Pierre-Louis Bossart [ Upstream commit 8753889e2720c1ef7ebf03370e384f5bf5ff4fab ] This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as cat /proc/asound/modules 0 (efault) Fixes: 8017b8fd37bf ('ASoC: SOF:

[PATCH 5.7 184/393] media: exynos4-is: Add missed check for pinctrl_lookup_state()

2020-08-17 Thread Greg Kroah-Hartman
From: Chuhong Yuan [ Upstream commit 18ffec750578f7447c288647d7282c7d12b1d969 ] fimc_md_get_pinctrl() misses a check for pinctrl_lookup_state(). Add the missed check to fix it. Fixes: 4163851f7b99 ("[media] s5p-fimc: Use pinctrl API for camera ports configuration]") Signed-off-by: Chuhong

[PATCH 5.7 153/393] media: marvell-ccic: Add missed v4l2_async_notifier_cleanup()

2020-08-17 Thread Greg Kroah-Hartman
From: Chuhong Yuan [ Upstream commit 4603a5b4a87ccd6fb90cbfa10195291cfcf6ba34 ] mccic_register() forgets to cleanup the notifier in its error handler. mccic_shutdown() also misses calling v4l2_async_notifier_cleanup(). Add the missed calls to fix them. Fixes: 3eefe36cc00c ("media:

[PATCH 5.7 185/393] media: cros-ec-cec: do not bail on device_init_wakeup failure

2020-08-17 Thread Greg Kroah-Hartman
From: Dariusz Marcinkiewicz [ Upstream commit 6f01dfb760c027d5dd6199d91ee9599f2676b5c6 ] Do not fail probing when device_init_wakeup fails. device_init_wakeup fails when the device is already enabled as wakeup device. Hence, the driver fails to probe the device if: - The device has already

[PATCH 5.7 208/393] ima: Free the entire rule when deleting a list of rules

2020-08-17 Thread Greg Kroah-Hartman
From: Tyler Hicks [ Upstream commit 465aee77aae857b5fcde56ee192b33dc369fba04 ] Create a function, ima_free_rule(), to free all memory associated with an ima_rule_entry. Use the new function to fix memory leaks of allocated ima_rule_entry members, such as .fsname and .keyrings, when deleting a

[PATCH 5.7 158/393] ASoC: Intel: cml_rt1011_rt5682: add missing .owner field

2020-08-17 Thread Greg Kroah-Hartman
From: Pierre-Louis Bossart [ Upstream commit 299120928897d6cb893c7165df7cd232d835e259 ] This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as cat /proc/asound/modules 0 (efault) Fixes: 17fe95d6df93 ('ASoC: Intel:

[PATCH 5.7 198/393] drm/bridge: sil_sii8620: initialize return of sii8620_readb

2020-08-17 Thread Greg Kroah-Hartman
From: Tom Rix [ Upstream commit 02cd2d3144653e6e2a0c7ccaa73311e48e2dc686 ] clang static analysis flags this error sil-sii8620.c:184:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn] return ret; ^~ sii8620_readb calls

[PATCH 5.7 210/393] ima: Fail rule parsing when buffer hook functions have an invalid action

2020-08-17 Thread Greg Kroah-Hartman
From: Tyler Hicks [ Upstream commit 712183437ebebc89cd086ef96cf9a521fd97fd09 ] Buffer based hook functions, such as KEXEC_CMDLINE and KEY_CHECK, can only measure. The process_buffer_measurement() function quietly ignores all actions except measure so make this behavior clear at the time of

[PATCH 5.7 211/393] ima: Fail rule parsing when the KEXEC_CMDLINE hook is combined with an invalid cond

2020-08-17 Thread Greg Kroah-Hartman
From: Tyler Hicks [ Upstream commit db2045f5892a9db7354442bf77f9b03b50ff9ee1 ] The KEXEC_CMDLINE hook function only supports the pcr conditional. Make this clear at policy load so that IMA policy authors don't assume that other conditionals are supported. Since KEXEC_CMDLINE's inception,

[PATCH 5.7 212/393] ima: Fail rule parsing when the KEY_CHECK hook is combined with an invalid cond

2020-08-17 Thread Greg Kroah-Hartman
From: Tyler Hicks [ Upstream commit eb624fe214a2e156ddafd9868377cf91499f789d ] The KEY_CHECK function only supports the uid, pcr, and keyrings conditionals. Make this clear at policy load so that IMA policy authors don't assume that other conditionals are supported. Fixes: 5808611cccb2 ("IMA:

[PATCH 5.7 215/393] PCI/ASPM: Add missing newline in sysfs policy

2020-08-17 Thread Greg Kroah-Hartman
From: Xiongfeng Wang [ Upstream commit 3167e3d340c092fd47924bc4d23117a3074ef9a9 ] When I cat ASPM parameter 'policy' by sysfs, it displays as follows. Add a newline for easy reading. Other sysfs attributes already include a newline. [root@localhost ~]# cat

[PATCH 5.7 216/393] go7007: add sanity checking for endpoints

2020-08-17 Thread Greg Kroah-Hartman
From: Oliver Neukum [ Upstream commit 137641287eb40260783a4413847a0aef06023a6c ] A malicious USB device may lack endpoints the driver assumes to exist Accessing them leads to NULL pointer accesses. This patch introduces sanity checking. Reported-and-tested-by:

[PATCH 5.7 191/393] samples: bpf: Fix bpf programs with kprobe/sys_connect event

2020-08-17 Thread Greg Kroah-Hartman
From: Daniel T. Lee [ Upstream commit af9bd3e3331b8af42b6606c75797d041ab39380c ] Currently, BPF programs with kprobe/sys_connect does not work properly. Commit 34745aed515c ("samples/bpf: fix kprobe attachment issue on x64") This commit modifies the bpf_load behavior of kprobe events in the

[PATCH 5.7 229/393] coresight: etmv4: Counter values not saved on disable

2020-08-17 Thread Greg Kroah-Hartman
From: Mike Leach [ Upstream commit 8fa43700f69703f995ea715b76be6fabdd2f05de ] The counter value registers change during operation, however this change is not reflected in the values seen by the user in sysfs. This fixes the issue by reading back the values on disable. Signed-off-by: Mike

[PATCH 5.7 190/393] PCI: Fix pci_cfg_wait queue locking problem

2020-08-17 Thread Greg Kroah-Hartman
From: Bjorn Helgaas [ Upstream commit 2a7e32d0547f41c5ce244f84cf5d6ca7fccee7eb ] The pci_cfg_wait queue is used to prevent user-space config accesses to devices while they are recovering from reset. Previously we used these operations on pci_cfg_wait: __add_wait_queue(_cfg_wait, ...)

[PATCH 5.7 221/393] drm/imx: tve: fix regulator_disable error path

2020-08-17 Thread Greg Kroah-Hartman
From: Marco Felsch [ Upstream commit 7bb58b987fee26da2a1665c01033022624986b7c ] Add missing regulator_disable() as devm_action to avoid dedicated unbind() callback and fix the missing error handling. Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)")

[PATCH 5.7 231/393] coresight: etm4x: Fix save/restore during cpu idle

2020-08-17 Thread Greg Kroah-Hartman
From: Suzuki K Poulose [ Upstream commit 342c8a1d1d9e418d32fa02d635cf96989f9a986e ] The ETM state save/restore incorrectly reads/writes some of the 64bit registers (e.g, address comparators, vmid/cid comparators etc.) using 32bit accesses. Ensure we use the appropriate width accessors for the

[PATCH 5.7 218/393] phy: renesas: rcar-gen3-usb2: move irq registration to init

2020-08-17 Thread Greg Kroah-Hartman
From: Yoshihiro Shimoda [ Upstream commit 08b0ad375ca66181faee725b1b358bcae8d592ee ] If CONFIG_DEBUG_SHIRQ was enabled, r8a77951-salvator-xs could boot correctly. If we appended "earlycon keep_bootcon" to the kernel command like, we could get kernel log like below. SError Interrupt on

[PATCH 5.7 247/393] scsi: mesh: Fix panic after host or bus reset

2020-08-17 Thread Greg Kroah-Hartman
From: Finn Thain [ Upstream commit edd7dd2292ab9c3628b65c4d04514c3068ad54f6 ] Booting Linux with a Conner CP3200 drive attached to the MESH SCSI bus results in EH measures and a panic: [ 25.499838] mesh: configured for synchronous 5 MB/s [ 25.787154] mesh: performing initial bus reset... [

[PATCH 5.7 239/393] tools/bpftool: Fix error handing in do_skeleton()

2020-08-17 Thread Greg Kroah-Hartman
From: YueHaibing [ Upstream commit 956fcfcd359512f15b19bcd157fa8206ed26605b ] Fix pass 0 to PTR_ERR, also dump more err info using libbpf_strerror. Fixes: 5dc7a8b21144 ("bpftool, selftests/bpf: Embed object file inside skeleton") Signed-off-by: YueHaibing Signed-off-by: Alexei Starovoitov

[PATCH 5.7 242/393] MIPS: OCTEON: add missing put_device() call in dwc3_octeon_device_init()

2020-08-17 Thread Greg Kroah-Hartman
From: Yu Kuai [ Upstream commit e8b9fc10f2615b9a525fce56981e40b489528355 ] if of_find_device_by_node() succeed, dwc3_octeon_device_init() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: 93e502b3c2d4 ("MIPS:

[PATCH 5.7 248/393] net: dsa: mv88e6xxx: MV88E6097 does not support jumbo configuration

2020-08-17 Thread Greg Kroah-Hartman
From: Chris Packham [ Upstream commit 0f3c66a3c7b4e8b9f654b3c998e9674376a51b0f ] The MV88E6097 chip does not support configuring jumbo frames. Prior to commit 5f430d65 only the 6352, 6351, 6165 and 6320 chips configured jumbo mode. The refactor accidentally added the function for the 6097.

[PATCH 5.7 249/393] macintosh/via-macii: Access autopoll_devs when inside lock

2020-08-17 Thread Greg Kroah-Hartman
From: Finn Thain [ Upstream commit 59ea38f6b3af5636edf541768a1ed721eeaca99e ] The interrupt handler should be excluded when accessing the autopoll_devs variable. Fixes: d95fd5fce88f0 ("m68k: Mac II ADB fixes") # v5.0+ Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael

[PATCH 5.7 250/393] PCI: cadence: Fix cdns_pcie_{host|ep}_setup() error path

2020-08-17 Thread Greg Kroah-Hartman
From: Kishon Vijay Abraham I [ Upstream commit 19abcd790b51b26d775e1170ba2ac086823cceeb ] commit bd22885aa188 ("PCI: cadence: Refactor driver to use as a core library") while refactoring the Cadence PCIe driver to be used as library, removed pm_runtime_get_sync() from cdns_pcie_ep_setup() and

[PATCH 5.7 262/393] net: dsa: rtl8366: Fix VLAN set-up

2020-08-17 Thread Greg Kroah-Hartman
From: Linus Walleij [ Upstream commit 788abc6d9d278ed6fa1fa94db2098481a04152b7 ] Alter the rtl8366_vlan_add() to call rtl8366_set_vlan() inside the loop that goes over all VIDs since we now properly support calling that function more than once. Augment the loop to postincrement as this is more

[PATCH 5.7 225/393] clk: qcom: gcc: Make disp gpll0 branch aon for sc7180/sdm845

2020-08-17 Thread Greg Kroah-Hartman
From: Taniya Das [ Upstream commit 9c3df2b1993da9ab1110702d7b2815d5cd8c02f3 ] The display gpll0 branch clock inside GCC needs to always be enabled. Otherwise the AHB clk (disp_cc_mdss_ahb_clk_src) for the display clk controller (dispcc) will stop clocking while sourcing from gpll0 when this

[PATCH 5.7 228/393] coresight: etmv4: Fix resource selector constant

2020-08-17 Thread Greg Kroah-Hartman
From: Mike Leach [ Upstream commit cb8bba907a4ff4ba42f1d245cb506d55829674b8 ] ETMv4 max resource selector constant incorrectly set to 16. Updated to the correct 32 value, and adjustments made to limited code using it. Signed-off-by: Mike Leach Fixes: 2e1cdfe184b52 ("coresight-etm4x: Adding

[PATCH 5.7 227/393] thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor()

2020-08-17 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit 0f348db01fdf128813fdd659fcc339038fb421a4 ] This condition is reversed and will cause breakage. Fixes: 7440f518dad9 ("thermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR") Signed-off-by: Dan Carpenter Signed-off-by: Daniel Lezcano Link:

[PATCH 5.7 223/393] spi: lantiq-ssc: Fix warning by using WQ_MEM_RECLAIM

2020-08-17 Thread Greg Kroah-Hartman
From: Hauke Mehrtens [ Upstream commit ba3548cf29616b58c93bbaffc3d636898d009858 ] The lantiq-ssc driver uses internally an own workqueue to wait till the data is not only written out of the FIFO but really written to the wire. This workqueue is flushed while the SPI subsystem is working in some

[PATCH 5.7 269/393] nvmem: sprd: Fix return value of sprd_efuse_probe()

2020-08-17 Thread Greg Kroah-Hartman
From: Tiezhu Yang [ Upstream commit bcd14bb7a68520bf88e45e91d354e43535624f82 ] When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Fixes: 096030e7f449 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support")

[PATCH 5.7 271/393] PCI: Release IVRS table in AMD ACS quirk

2020-08-17 Thread Greg Kroah-Hartman
From: Hanjun Guo [ Upstream commit 090688fa4e448284aaa16136372397d7d10814db ] The acpi_get_table() should be coupled with acpi_put_table() if the mapped table is not used at runtime to release the table mapping. In pci_quirk_amd_sb_acs(), IVRS table is just used for checking AMD IOMMU is

[PATCH 5.7 254/393] Smack: prevent underflow in smk_set_cipso()

2020-08-17 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit 42a2df3e829f3c5562090391b33714b2e2e5ad4a ] We have an upper bound on "maplevel" but forgot to check for negative values. Fixes: e114e473771c ("Smack: Simplified Mandatory Access Control Kernel") Signed-off-by: Dan Carpenter Signed-off-by: Casey Schaufler

[PATCH 5.7 277/393] ASoC: meson: axg-tdm-formatters: fix sclk inversion

2020-08-17 Thread Greg Kroah-Hartman
From: Jerome Brunet [ Upstream commit 0d3f01dcdc234001f979a0af0b6b31cb9f25b6c1 ] After carefully checking, it appears that both tdmout and tdmin require the rising edge of the sclk they get to be synchronized with the frame sync event (which should be a rising edge of lrclk). TDMIN was

[PATCH 5.7 226/393] usb: core: fix quirks_param_set() writing to a const pointer

2020-08-17 Thread Greg Kroah-Hartman
From: Kars Mulder [ Upstream commit b1b6bed3b5036509b449b5965285d5057ba42527 ] The function quirks_param_set() takes as argument a const char* pointer to the new value of the usbcore.quirks parameter. It then casts this pointer to a non-const char* pointer and passes it to the strsep()

[PATCH 5.7 280/393] ASoC: fsl_sai: Fix value of FSL_SAI_CR1_RFW_MASK

2020-08-17 Thread Greg Kroah-Hartman
From: Shengjiu Wang [ Upstream commit 5aef1ff2397d021f93d874b57dff032fdfac73de ] The fifo_depth is 64 on i.MX8QM/i.MX8QXP, 128 on i.MX8MQ, 16 on i.MX7ULP. Original FSL_SAI_CR1_RFW_MASK value 0x1F is not suitable for these platform, the FIFO watermark mask should be updated according to the

[PATCH 5.7 273/393] powerpc/pseries/hotplug-cpu: Remove double free in error path

2020-08-17 Thread Greg Kroah-Hartman
From: Nathan Lynch [ Upstream commit a0ff72f9f5a780341e7ff5e9ba50a0dad5fa1980 ] In the unlikely event that the device tree lacks a /cpus node, find_dlpar_cpus_to_add() oddly frees the cpu_drcs buffer it has been passed before returning an error. Its only caller also frees the buffer on error.

[PATCH 5.7 276/393] ASoC: meson: axg-tdmin: fix g12a skew

2020-08-17 Thread Greg Kroah-Hartman
From: Jerome Brunet [ Upstream commit 80a254394fcfe55450b0351da298ca7231889219 ] After carefully checking the result provided by the TDMIN on the g12a and sm1 SoC families, the TDMIN skew offset appears to be 3 instead of 2 on the axg. Fixes: f01bc67f58fd ("ASoC: meson: axg-tdm-formatter:

[PATCH 5.7 282/393] s390/qeth: dont process empty bridge port events

2020-08-17 Thread Greg Kroah-Hartman
From: Julian Wiedmann [ Upstream commit 02472e28b9a45471c6d8729ff2c7422baa9be46a ] Discard events that don't contain any entries. This shouldn't happen, but subsequent code relies on being able to use entry 0. So better be safe than accessing garbage. Fixes: b4d72c08b358 ("qeth: bridgeport

[PATCH 5.7 257/393] Bluetooth: hci_h5: Set HCI_UART_RESET_ON_INIT to correct flags

2020-08-17 Thread Greg Kroah-Hartman
From: Nicolas Boichat [ Upstream commit a7ad4b6119d740b1ec5788f1b98be0fd1c1b5a5a ] HCI_UART_RESET_ON_INIT belongs in hdev_flags, not flags. Fixes: ce945552fde4a09 ("Bluetooth: hci_h5: Add support for serdev enumerated devices") Signed-off-by: Nicolas Boichat Reviewed-by: Hans de Goede

[PATCH 5.7 259/393] Bluetooth: Fix suspend notifier race

2020-08-17 Thread Greg Kroah-Hartman
From: Abhishek Pandit-Subedi [ Upstream commit 4e8c36c3b0d73d46aa27cfd4308aaa445a1067df ] Unregister from suspend notifications and cancel suspend preparations before running hci_dev_do_close. Otherwise, the suspend notifier may race with unregister and cause cmd_timeout even after hdev has

[PATCH 5.7 255/393] power: supply: check if calc_soc succeeded in pm860x_init_battery

2020-08-17 Thread Greg Kroah-Hartman
From: Tom Rix [ Upstream commit ccf193dee1f0fff55b556928591f7818bac1b3b1 ] clang static analysis flags this error 88pm860x_battery.c:522:19: warning: Assigned value is garbage or undefined [core.uninitialized.Assign] info->start_soc = soc; ^

[PATCH 5.7 303/393] fsl/fman: check dereferencing null pointer

2020-08-17 Thread Greg Kroah-Hartman
From: Florinel Iordache [ Upstream commit cc5d229a122106733a85c279d89d7703f21e4d4f ] Add a safe check to avoid dereferencing null pointer Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support") Signed-off-by: Florinel Iordache Signed-off-by: David S. Miller Signed-off-by: Sasha Levin ---

[PATCH 5.7 261/393] net: dsa: rtl8366: Fix VLAN semantics

2020-08-17 Thread Greg Kroah-Hartman
From: Linus Walleij [ Upstream commit 15ab7906cc9290afb006df1bb1074907fbcc7061 ] The RTL8366 would not handle adding new members (ports) to a VLAN: the code assumed that ->port_vlan_add() was only called once for a single port. When intializing the switch with

[PATCH 5.7 302/393] fsl/fman: fix unreachable code

2020-08-17 Thread Greg Kroah-Hartman
From: Florinel Iordache [ Upstream commit cc79fd8f557767de90ff199d3b6fb911df43160a ] The parameter 'priority' is incorrectly forced to zero which ultimately induces logically dead code in the subsequent lines. Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support") Signed-off-by: Florinel

[PATCH 5.7 301/393] fsl/fman: fix dereference null return value

2020-08-17 Thread Greg Kroah-Hartman
From: Florinel Iordache [ Upstream commit 0572054617f32670abab4b4e89a876954d54b704 ] Check before using returned value to avoid dereferencing null pointer. Fixes: 18a6c85fcc78 ("fsl/fman: Add FMan Port Support") Signed-off-by: Florinel Iordache Signed-off-by: David S. Miller Signed-off-by:

[PATCH 5.7 305/393] gpio: dont use same lockdep class for all devm_gpiochip_add_data users

2020-08-17 Thread Greg Kroah-Hartman
From: Ahmad Fatoum [ Upstream commit 5f402bb17533113c21d61c2d4bc4ef4a6fa1c9a5 ] Commit 959bc7b22bd2 ("gpio: Automatically add lockdep keys") documents in its commits message its intention to "create a unique class key for each driver". It does so by having gpiochip_add_data add in-place the

[PATCH 5.7 313/393] nfsd: avoid a NULL dereference in __cld_pipe_upcall()

2020-08-17 Thread Greg Kroah-Hartman
From: Scott Mayhew [ Upstream commit df60446cd1fb487becd1f36f4c0da9e0e523c0cf ] If the rpc_pipefs is unmounted, then the rpc_pipe->dentry becomes NULL and dereferencing the dentry->d_sb will trigger an oops. The only reason we're doing that is to determine the nfsd_net, which could instead be

[PATCH 5.7 306/393] net: thunderx: initialize VFs mailbox mutex before first usage

2020-08-17 Thread Greg Kroah-Hartman
From: Dean Nelson [ Upstream commit c1055b76ad00aed0e8b79417080f212d736246b6 ] A VF's mailbox mutex is not getting initialized by nicvf_probe() until after it is first used. And such usage is resulting in... [ 28.270927] [ cut here ] [ 28.270934]

[PATCH 5.7 314/393] SUNRPC: Fix ("SUNRPC: Add "@len" parameter to gss_unwrap()")

2020-08-17 Thread Greg Kroah-Hartman
From: Chuck Lever [ Upstream commit 986a4b63d3bc5f2c0eb4083b05aff2bf883b7b2f ] Braino when converting "buf->len -=" to "buf->len = len -". The result is under-estimation of the ralign and rslack values. On krb5p mounts, this has caused READDIR to fail with EIO, and KASAN splats when decoding

[PATCH 5.7 308/393] dlm: Fix kobject memleak

2020-08-17 Thread Greg Kroah-Hartman
From: Wang Hai [ Upstream commit 0ffddafc3a3970ef7013696e7f36b3d378bc4c16 ] Currently the error return path from kobject_init_and_add() is not followed by a call to kobject_put() - which means we are leaking the kobject. Set do_unreg = 1 before kobject_init_and_add() to ensure that

[PATCH 5.7 343/393] crypto: ccp - Fix use of merged scatterlists

2020-08-17 Thread Greg Kroah-Hartman
From: John Allen commit 8a302808c60d441d9884cb00ea7f2b534f2e3ca5 upstream. Running the crypto manager self tests with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS may result in several types of errors when using the ccp-crypto driver: alg: skcipher: cbc-des3-ccp encryption failed on test vector 0;

[PATCH 5.7 331/393] USB: serial: cp210x: enable usb generic throttle/unthrottle

2020-08-17 Thread Greg Kroah-Hartman
From: Brant Merryman commit 4387b3dbb079d482d3c2b43a703ceed4dd27ed28 upstream. Assign the .throttle and .unthrottle functions to be generic function in the driver structure to prevent data loss that can otherwise occur if the host does not enable USB throttling. Signed-off-by: Brant Merryman

[PATCH 5.7 342/393] crypto: qat - fix double free in qat_uclo_create_batch_init_list

2020-08-17 Thread Greg Kroah-Hartman
From: Tom Rix commit c06c76602e03bde24ee69a2022a829127e504202 upstream. clang static analysis flags this error qat_uclo.c:297:3: warning: Attempt to free released memory [unix.Malloc] kfree(*init_tab_base); ^ When input *init_tab_base is

[PATCH 5.7 341/393] crypto: hisilicon - dont sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified

2020-08-17 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit 5ead051780404b5cb22147170acadd1994dc3236 upstream. There is this call chain: sec_alg_skcipher_encrypt -> sec_alg_skcipher_crypto -> sec_alg_alloc_and_calc_split_sizes -> kcalloc where we call sleeping allocator function even if CRYPTO_TFM_REQ_MAY_SLEEP was not

[PATCH 5.7 328/393] vsock: fix potential null pointer dereference in vsock_poll()

2020-08-17 Thread Greg Kroah-Hartman
From: Stefano Garzarella [ Upstream commit 1980c05844830a44708c98c96d600833aa3fae08 ] syzbot reported this issue where in the vsock_poll() we find the socket state at TCP_ESTABLISHED, but 'transport' is null: general protection fault, probably for non-canonical address 0xdc12:

[PATCH 5.7 319/393] net: Fix potential memory leak in proto_register()

2020-08-17 Thread Greg Kroah-Hartman
From: Miaohe Lin [ Upstream commit 0f5907af39137f8183ed536aaa00f322d7365130 ] If we failed to assign proto idx, we free the twsk_slab_name but forget to free the twsk_slab. Add a helper function tw_prot_cleanup() to free these together and also use this helper function in proto_unregister().

[PATCH 5.7 370/393] Revert "parisc: Drop LDCW barrier in CAS code when running UP"

2020-08-17 Thread Greg Kroah-Hartman
From: Helge Deller commit 462fb756c7de1ffe5bc6099149136031c2d9c02a upstream. This reverts commit e6eb5fe9123f05dcbf339ae5c0b6d32fcc0685d5. We need to optimize it differently. A follow up patch will correct it. Signed-off-by: Helge Deller Cc: # v5.2+ Signed-off-by: Greg Kroah-Hartman ---

[PATCH 5.7 371/393] Revert "parisc: Use ldcw instruction for SMP spinlock release barrier"

2020-08-17 Thread Greg Kroah-Hartman
From: Helge Deller commit 6e9f06ee6c9566f3606d93182ac8f803a148504b upstream. This reverts commit 9e5c602186a692a7e848c0da17aed40f49d30519. No need to use the ldcw instruction as SMP spinlock release barrier. Revert it to gain back speed again. Signed-off-by: Helge Deller Cc: # v5.2+

[PATCH 5.7 369/393] Revert "parisc: Improve interrupt handling in arch_spin_lock_flags()"

2020-08-17 Thread Greg Kroah-Hartman
From: Helge Deller commit 3d05b8aebc5f10ee3ab129b61100196855dd7249 upstream. This reverts commit 2772f0efd5bbd5413db3d22e363b779ca0fa5310. It turns out that we want to implement the spinlock code differently. Signed-off-by: Helge Deller Cc: # v5.7+ Signed-off-by: Greg Kroah-Hartman ---

  1   2   3   4   5   6   7   8   9   10   >