[PATCH AUTOSEL 4.14 06/57] vfs: fix freeze protection in mnt_want_write_file() for overlayfs

2018-09-14 Thread Sasha Levin
From: Miklos Szeredi [ Upstream commit a6795a585929d94ca3e931bc8518f8deb8bbe627 ] The underlying real file used by overlayfs still contains the overlay path. This results in mnt_want_write_file() calls by the filesystem getting freeze protection on the wrong inode (the overlayfs one instead of t

[PATCH AUTOSEL 4.14 04/57] audit: fix use-after-free in audit_add_watch

2018-09-14 Thread Sasha Levin
From: Ronny Chevalier [ Upstream commit baa2a4fdd525c8c4b0f704d20457195b29437839 ] audit_add_watch stores locally krule->watch without taking a reference on watch. Then, it calls audit_add_to_parent, and uses the watch stored locally. Unfortunately, it is possible that audit_add_to_parent updat

[PATCH AUTOSEL 4.14 05/57] mtdchar: fix overflows in adjustment of `count`

2018-09-14 Thread Sasha Levin
From: Jann Horn [ Upstream commit 6c6bc9ea84d0008024606bf5ba10519e20d851bf ] The first checks in mtdchar_read() and mtdchar_write() attempt to limit `count` such that `*ppos + count <= mtd->size`. However, they ignore the possibility of `*ppos > mtd->size`, allowing the calculation of `count` to

[PATCH AUTOSEL 4.18 71/92] scsi: libfc: fixup 'sleeping function called from invalid context'

2018-09-14 Thread Sasha Levin
From: Hannes Reinecke [ Upstream commit fa519f701d27198a2858bb108fc18ea9d8c106a7 ] fc_rport_login() will be calling mutex_lock() while running inside an RCU-protected section, triggering the warning 'sleeping function called from invalid context'. To fix this we can drop the rcu functions here

[PATCH AUTOSEL 4.18 75/92] selftest: timers: Tweak raw_skew to SKIP when ADJ_OFFSET/other clock adjustments are in progress

2018-09-14 Thread Sasha Levin
From: John Stultz [ Upstream commit 1416270f4a1ae83ea84156ceba19a66a8f88be1f ] In the past we've warned when ADJ_OFFSET was in progress, usually caused by ntpd or some other time adjusting daemon running in non steady sate, which can cause the skew calculations to be incorrect. Thus, this patch

[PATCH AUTOSEL 4.18 91/92] pinctrl: qcom: spmi-gpio: Fix pmic_gpio_config_get() to be compliant

2018-09-14 Thread Sasha Levin
From: Douglas Anderson [ Upstream commit 1cf86bc21257a330e3af51f2a4e885f1a705f6a5 ] If you do this on an sdm845 board: grep "" /sys/kernel/debug/pinctrl/*spmi:pmic*/pinconf-groups ...it looks like nonsense. For every pin you see listed: input bias disabled, input bias high impedance, input

[PATCH AUTOSEL 4.14 03/57] arm64: dts: uniphier: Add missing cooling device properties for CPUs

2018-09-14 Thread Sasha Levin
From: Viresh Kumar [ Upstream commit af0e09d0c6762e486b0eb5cc4737396964c34fad ] The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then t

[PATCH AUTOSEL 4.18 79/92] drm/amd/pp: Send khz clock values to DC for smu7/8

2018-09-14 Thread Sasha Levin
From: Harry Wentland [ Upstream commit c3cb424a086921f6bb0449b10d998352a756d6d5 ] The previous change wasn't covering smu 7 and 8 and therefore DC was seeing wrong clock values. This fixes an issue where the pipes seem to hang with a 4k DP and 1080p HDMI display. Fixes: c3df50abc84b ("drm/amd/

[PATCH AUTOSEL 4.18 72/92] scsi: lpfc: Fix NVME Target crash in defer rcv logic

2018-09-14 Thread Sasha Levin
From: James Smart [ Upstream commit 6871e8144f935a1f08e7fc6269c894861ce494aa ] Kernel occasionally crashed with the following ops on NVME Target: BUG: unable to handle kernel NULL pointer dereference at 0058 IP: [] lpfc_nvmet_defer_rcv+0x50/0x70 [lpfc] Callback routine was calle

[PATCH AUTOSEL 4.18 73/92] scsi: lpfc: Fix panic if driver unloaded when port is offline

2018-09-14 Thread Sasha Levin
From: James Smart [ Upstream commit d580c6137476ab307a66e278cf7dbc666230f714 ] System crashes when the lpfc module is unloaded after making the port offline The nvme queue pointers were freed during port offline, but were later accessed in pci remove path. Validate the pointers in pci remove p

[PATCH AUTOSEL 4.18 78/92] arm64: perf: Disable PMU while processing counter overflows

2018-09-14 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit 3cce50dfec4a5b0414c974190940f47dd32c6dee ] The arm64 PMU updates the event counters and reprograms the counters in the overflow IRQ handler without disabling the PMU. This could potentially cause skews in for group counters, where the overflowed counters

[PATCH AUTOSEL 4.18 74/92] remoteproc: qcom: q6v5-pil: fix modem hang on SDM845 after axis2 clk unvote

2018-09-14 Thread Sasha Levin
From: Sibi Sankar [ Upstream commit 7cbb540a3a68e4d4a8bef2d9451afb1635b5d2d3 ] GCC_MSS_AXIS2 clock is used for disabling boot IMEM (a part of AP boot up). With Boot IMEM disable now a part TZ/ATF, AXIS2 clock is no longer required post AP boot up and expected to remain untouched. However if the

[PATCH AUTOSEL 4.18 90/92] pinctrl: msm: Fix msm_config_group_get() to be compliant

2018-09-14 Thread Sasha Levin
From: Douglas Anderson [ Upstream commit 05e0c828955c1cab58dd71a04539442e5375d917 ] If you do this on an sdm845 board: cat /sys/kernel/debug/pinctrl/340.pinctrl/pinconf-groups ...it looks like nonsense. For every pin you see listed: input bias bus hold, input bias disabled, input bias

[PATCH AUTOSEL 4.18 84/92] IB/nes: Fix a compiler warning

2018-09-14 Thread Sasha Levin
From: Bart Van Assche [ Upstream commit 4c5743bc4fe3233cecc1c184a773c79c8ee45bbe ] Avoid that the following compiler warning is reported when building with W=1: drivers/infiniband/hw/nes/nes_hw.c:646:51: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] Signed-off-

[PATCH AUTOSEL 4.18 76/92] ASoC: rt5651: Fix workqueue cancel vs irq free race on remove

2018-09-14 Thread Sasha Levin
From: Hans de Goede [ Upstream commit 8d2d7bcdc1645dc243f7735278675b083c0e506c ] On removal we must free the IRQ *before* cancelling the jack-detect work, so that the jack-detect work cannot be rescheduled by the IRQ. Before this commit we were cancelling the jack-detect work from the driver re

[PATCH AUTOSEL 4.18 85/92] block/DAC960.c: fix defined but not used build warnings

2018-09-14 Thread Sasha Levin
From: Randy Dunlap [ Upstream commit 3993e501bf853cce85c5114a704b86b8f486790c ] Fix build warnings in DAC960.c when CONFIG_PROC_FS is not enabled by marking the unused functions as __maybe_unused. ../drivers/block/DAC960.c:6429:12: warning: 'dac960_proc_show' defined but not used [-Wunused-fun

[PATCH AUTOSEL 4.18 86/92] IB/mlx5: fix uaccess beyond "count" in debugfs read/write handlers

2018-09-14 Thread Sasha Levin
From: Jann Horn [ Upstream commit 60e6627f12a78203a093ca05b7bca15627747d81 ] In general, accessing userspace memory beyond the length of the supplied buffer in VFS read/write handlers can lead to both kernel memory corruption (via kernel_read()/kernel_write(), which can e.g. be triggered via sys

[PATCH AUTOSEL 4.18 69/92] selftests/android: initialize heap_type to avoid compiling warning

2018-09-14 Thread Sasha Levin
From: Li Zhijian [ Upstream commit cc7c673032fc7427087e74b75f732b43db38a256 ] Initialize heap_type to ION_HEAP_TYPE_SYSTEM to avoid "used uninitialized" compiler warning. heap_type gets used after initialization, this change is to just keep the compiler happy. root@vm-lkp-nex04-8G-7 ~/linux-v4.

[PATCH AUTOSEL 4.18 70/92] ALSA: pcm: Fix snd_interval_refine first/last with open min/max

2018-09-14 Thread Sasha Levin
From: Timo Wischer [ Upstream commit ff2d6acdf6f13d9f8fdcd890844c6d7535ac1f10 ] Without this commit the following intervals [x y), (x y) were be replaced to (y-1 y) by snd_interval_refine_last(). This was also done if y-1 is part of the previous interval. With this changes it will be replaced wi

[PATCH AUTOSEL 4.18 64/92] rcu: Fix grace-period hangs due to race with CPU offline

2018-09-14 Thread Sasha Levin
From: "Paul E. McKenney" [ Upstream commit 1e64b15a4b102e1cd059d4d798b7a78f93341333 ] Without special fail-safe quiescent-state-propagation checks, grace-period hangs can result from the following scenario: 1. CPU 1 goes offline. 2. Because CPU 1 is the only CPU in the system blockin

[PATCH AUTOSEL 4.18 67/92] rtc: bq4802: add error handling for devm_ioremap

2018-09-14 Thread Sasha Levin
From: Zhouyang Jia [ Upstream commit 7874b919866ba91bac253fa219d3d4c82bb944df ] When devm_ioremap fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling devm_ioremap. Signed-off-by: Zhouyang Jia Signed-off-by: Alexandre Belloni

[PATCH AUTOSEL 4.18 62/92] mfd: 88pm860x-i2c: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)

2018-09-14 Thread Sasha Levin
From: Peter Rosin [ Upstream commit 8c8f74f327a76604a499fad8c54c15e1c0ee8051 ] Locking the root adapter for __i2c_transfer will deadlock if the device sits behind a mux-locked I2C mux. Switch to the finer-grained i2c_lock_bus with the I2C_LOCK_SEGMENT flag. If the device does not sit behind a mu

[PATCH AUTOSEL 4.18 63/92] input: rohm_bu21023: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)

2018-09-14 Thread Sasha Levin
From: Peter Rosin [ Upstream commit 193c2a07cfaacb9249ab0e3d34bce32490879355 ] Locking the root adapter for __i2c_transfer will deadlock if the device sits behind a mux-locked I2C mux. Switch to the finer-grained i2c_lock_bus with the I2C_LOCK_SEGMENT flag. If the device does not sit behind a mu

[PATCH AUTOSEL 4.18 57/92] gpio: pxa: Fix potential NULL dereference

2018-09-14 Thread Sasha Levin
From: Wei Yongjun [ Upstream commit 9506755633d0b32ef76f67c345000178e9b0dfc4 ] platform_get_resource() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. This is detected by Coccinelle semantic patch. @@ expression

[PATCH AUTOSEL 4.18 38/92] mmc: sdhci-of-esdhc: set proper dma mask for ls104x chips

2018-09-14 Thread Sasha Levin
From: Laurentiu Tudor [ Upstream commit 5552d7ad596c3fea953f40fef74170ce0760c04d ] SDHCI controller in ls1043a and ls1046a generate 40-bit wide addresses when doing DMA. Make sure that the corresponding dma mask is correctly configured. Context: when enabling smmu on these chips the following p

[PATCH AUTOSEL 4.18 48/92] coresight: tpiu: Fix disabling timeouts

2018-09-14 Thread Sasha Levin
From: Robin Murphy [ Upstream commit ccff2dfaceaca4517432f5c149594215fe9098cc ] Probing the TPIU driver under UBSan triggers an out-of-bounds shift warning in coresight_timeout(): ... [5.677530] UBSAN: Undefined behaviour in drivers/hwtracing/coresight/coresight.c:929:16 [5.685542] shi

[PATCH AUTOSEL 4.18 56/92] staging: bcm2835-audio: Don't leak workqueue if open fails

2018-09-14 Thread Sasha Levin
From: Tuomas Tynkkynen [ Upstream commit 678c5b119307c40f9a17152512f9c949d0ec7292 ] Currently, if bcm2835_audio_open() fails partway, the allocated workqueue is leaked. Avoid that. While at it, propagate the return value of bcm2835_audio_open_connection() on failure instead of returning -1. Si

[PATCH AUTOSEL 4.18 51/92] tools/testing/nvdimm: Fix support for emulating controller temperature

2018-09-14 Thread Sasha Levin
From: Dan Williams [ Upstream commit e5d772fbe7685aae0dff99f3b54158a0ec32155e ] In addition to populating the value the payload also needs to set the "controller temperature valid" flag. Fixes: cdd77d3e1930 ("nfit, libnvdimm: deprecate the generic SMART ioctl") Signed-off-by: Dan Williams Sign

[PATCH AUTOSEL 4.18 55/92] lightnvm: pblk: enable line minor version detection

2018-09-14 Thread Sasha Levin
From: Matias Bjørling [ Upstream commit 99b8dad1b6e52721904220322a947f7b75056303 ] When recovering a line, an extra check was added when debugging was active, such that minor version where also checked. Unfortunately, this used the ifdef NVM_DEBUG, which is not correct. Instead use the proper D

[PATCH AUTOSEL 4.18 49/92] coresight: ETM: Add support for Arm Cortex-A73 and Cortex-A35

2018-09-14 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit 5cedd22370a0a460b663c06de1fc10b4ba3c5d0b ] Add ETM PIDs of the Arm cortex-A CPUs to the white list of ETMs. While at it add a helper macro to make it easier to add the new entries. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Math

[PATCH AUTOSEL 4.18 42/92] drm/nouveau/debugfs: Wake up GPU before doing any reclocking

2018-09-14 Thread Sasha Levin
From: Karol Herbst [ Upstream commit eaeb9010bb4bcdc20e58254fa42f3fe730a7f908 ] Fixes various reclocking related issues on prime systems. Signed-off-by: Karol Herbst Signed-off-by: Martin Peres Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin --- drivers/gpu/drm/nouveau/nouveau_debugfs

[PATCH AUTOSEL 4.18 47/92] coresight: Handle errors in finding input/output ports

2018-09-14 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit fe470f5f7f684ed15bc49b6183a64237547910ff ] If we fail to find the input / output port for a LINK component while enabling a path, we should fail gracefully rather than assuming port "0". Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by

[PATCH AUTOSEL 4.18 46/92] sched/fair: Fix util_avg of new tasks for asymmetric systems

2018-09-14 Thread Sasha Levin
From: Quentin Perret [ Upstream commit 8fe5c5a937d0f4e84221631833a2718afde52285 ] When a new task wakes-up for the first time, its initial utilization is set to half of the spare capacity of its CPU. The current implementation of post_init_entity_util_avg() uses SCHED_CAPACITY_SCALE directly as

[PATCH AUTOSEL 4.18 50/92] f2fs: do checkpoint in kill_sb

2018-09-14 Thread Sasha Levin
From: Jaegeuk Kim [ Upstream commit 1cb50f87e10696e8cc61fb62d0d948e11b0e6dc1 ] When unmounting f2fs in force mode, we can get it stuck by io_schedule() by some pending IOs in meta_inode. io_schedule+0xd/0x30 wait_on_page_bit_common+0xc6/0x130 __filemap_fdatawait_range+0xbd/0x100 filemap_fdatawa

[PATCH AUTOSEL 4.18 52/92] drm/amd/display: support access ddc for mst branch

2018-09-14 Thread Sasha Levin
From: Eric Yang [ Upstream commit 0a14544661fad1606cc96aece30b2950fd9c4c81 ] [Why] Megachip dockings accesses ddc line through display driver when installing FW. Previously, we would fail every transaction because link attached to mst branch did not have their ddc transaction type set. [How] Se

[PATCH AUTOSEL 4.18 53/92] ASoC: qdsp6: q6afe-dai: fix a range check in of_q6afe_parse_dai_data()

2018-09-14 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit b8110a87b75f948d978c06e130cc68026645c4a1 ] The main thing is that the data->priv[] array has AFE_PORT_MAX elements so the > condition should be >=. But we may as well check for negative values as well just to be safe. Fixes: 24c4cbcfac09 ("ASoC: qdsp6: q6a

[PATCH AUTOSEL 4.18 37/92] tty: fix termios input-speed encoding

2018-09-14 Thread Sasha Levin
From: Johan Hovold [ Upstream commit fada18c48d774b9e837928ecdce6a5d5fdd11ee7 ] Make sure to clear the CIBAUD bits before OR-ing the new mask when encoding the termios input baud rate. This could otherwise lead to an incorrect input rate being reported back and incidentally set on subsequent te

[PATCH AUTOSEL 4.18 43/92] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-09-14 Thread Sasha Levin
From: Thierry Reding [ Upstream commit b59fb482b52269977ee5de205308e5b236a03917 ] Depending on the kernel configuration, early ARM architecture setup code may have attached the GPU to a DMA/IOMMU mapping that transparently uses the IOMMU to back the DMA API. Tegra requires special handling for I

[PATCH AUTOSEL 4.18 41/92] drm/nouveau: Fix runtime PM leak in drm_open()

2018-09-14 Thread Sasha Levin
From: Lyude Paul [ Upstream commit 922a8c82fafdec99688bbaea6c5889f562a42cdc ] Noticed this as I was skimming through, if we fail to allocate memory for cli we'll end up returning without dropping the runtime PM ref we got. Additionally, we'll even return the wrong return code! (ret most likely w

[PATCH AUTOSEL 4.18 45/92] parport: sunbpp: fix error return code

2018-09-14 Thread Sasha Levin
From: Julia Lawall [ Upstream commit faa1a47388b33623e4d504c23569188907b039a0 ] Return an error code on failure. Change leading spaces to tab on the first if. Problem found using Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman Signed

[PATCH AUTOSEL 4.18 36/92] tty: fix termios input-speed encoding when using BOTHER

2018-09-14 Thread Sasha Levin
From: Johan Hovold [ Upstream commit 1cee38f0363a88db374e50b232ca17b9a4c12fa0 ] When the termios CIBAUD bits are left unset (i.e. B0), we use the same output and input speed and should leave CIBAUD unchanged. When the user requests a rate using BOTHER and c_ospeed which the driver cannot set ex

[PATCH AUTOSEL 4.18 39/92] mmc: tegra: prevent HS200 on Tegra 3

2018-09-14 Thread Sasha Levin
From: Stefan Agner [ Upstream commit 127407e36f4fe3a1d5e8b9998b479956ce83a7dc ] The stack assumes that SDHC controller which support SD3.0 (SDR104) do support HS200. This is not the case for Tegra 3, which does support SD 3.0 but only supports eMMC spec 4.41. Use SDHCI_QUIRK2_BROKEN_HS200 to in

[PATCH AUTOSEL 4.18 35/92] serial: 8250: of: Correct of_platform_serial_setup() error handling

2018-09-14 Thread Sasha Levin
From: Alexander Sverdlin [ Upstream commit b29330d829042512fabb2bfa3bbfa32df1115594 ] Don't dispose IRQ mapping before it has been created. Fixes: aa9594740 ("serial: 8250_of: Add IO space support") Signed-off-by: Alexander Sverdlin Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin

[PATCH AUTOSEL 4.18 33/92] ASoC: hdmi-codec: fix routing

2018-09-14 Thread Sasha Levin
From: Russell King [ Upstream commit d30e23d69981a4b665f5ce8711335df986576389 ] Commit 943fa0228252 ("ASoC: hdmi-codec: Use different name for playback streams") broke hdmi-codec's routing between it's output "TX" widget and the S/PDIF or I2S streams by renaming the streams. Whether an error oc

[PATCH AUTOSEL 4.18 40/92] mmc: sdhci: do not try to use 3.3V signaling if not supported

2018-09-14 Thread Sasha Levin
From: Stefan Agner [ Upstream commit 1b5190c2e74c47ebe4bcecf7a072358ad9f1feaa ] For eMMC devices it is valid to only support 1.8V signaling. When vqmmc is set to a fixed 1.8V regulator the stack tries to set 3.3V initially and prints the following warning: mmc1: Switching to 3.3V signalling v

[PATCH AUTOSEL 4.18 31/92] liquidio: fix hang when re-binding VF host drv after running DPDK VF driver

2018-09-14 Thread Sasha Levin
From: Rick Farrington [ Upstream commit ac13d6d8eaded15c67265eafc32f439ea3a0ac4a ] When configuring SLI_PKTn_OUTPUT_CONTROL, VF driver was assuming that IPTR mode was disabled by reset, which was not true. Since DPDK driver had set IPTR mode previously, the VF driver (which uses buf-ptr-only mo

[PATCH AUTOSEL 4.18 24/92] efi/esrt: Only call efi_mem_reserve() for boot services memory

2018-09-14 Thread Sasha Levin
From: Ard Biesheuvel [ Upstream commit 61f0d55569463a1af897117ff47d202b0ccb2e24 ] The following commit: 7e1550b8f208 ("efi: Drop type and attribute checks in efi_mem_desc_lookup()") refactored the implementation of efi_mem_desc_lookup() so that the type check is moved to the callers, one of

[PATCH AUTOSEL 4.18 23/92] sched/core: Use smp_mb() in wake_woken_function()

2018-09-14 Thread Sasha Levin
From: Andrea Parri [ Upstream commit 76e079fefc8f62bd9b2cd2950814d1ee806e31a5 ] wake_woken_function() synchronizes with wait_woken() as follows: [wait_woken] [wake_woken_function] entry->flags &= ~wq_flag_woken;condition = true; smp_mb();

[PATCH AUTOSEL 4.18 28/92] ARM: hisi: fix error handling and missing of_node_put

2018-09-14 Thread Sasha Levin
From: Nicholas Mc Guire [ Upstream commit 9f30b5ae0585ca5234fe979294b8f897299dec99 ] of_iomap() can return NULL which seems critical here and thus should be explicitly flagged so that the cause of system halting can be understood. As of_find_compatible_node() is returning a device node with refc

[PATCH AUTOSEL 4.18 13/92] KVM: PPC: Book3S HV: Add of_node_put() in success path

2018-09-14 Thread Sasha Levin
From: Nicholas Mc Guire [ Upstream commit 51eaa08f029c7343df846325d7cf047be8b96e81 ] The call to of_find_compatible_node() is returning a pointer with incremented refcount so it must be explicitly decremented after the last use. As here it is only being used for checking of node presence but the

[PATCH AUTOSEL 4.18 14/92] security: check for kstrdup() failure in lsm_append()

2018-09-14 Thread Sasha Levin
From: Eric Biggers [ Upstream commit 87ea58433208d17295e200d56be5e2a4fe4ce7d6 ] lsm_append() should return -ENOMEM if memory allocation failed. Fixes: d69dece5f5b6 ("LSM: Add /sys/kernel/security/lsm") Signed-off-by: Eric Biggers Signed-off-by: James Morris Signed-off-by: Sasha Levin --- se

[PATCH AUTOSEL 4.18 19/92] pinctrl: mt7622: Fix probe fail by misuse the selector

2018-09-14 Thread Sasha Levin
From: Sean Wang [ Upstream commit 238262af08a20e5f1932fcf606b8b84370ac8b77 ] After the commit acf137951367 ("pinctrl: core: Return selector to the pinctrl driver") and the commit 47f1242d19c3 ("pinctrl: pinmux: Return selector to the pinctrl driver"), it's necessary to add the fixes needed for t

[PATCH AUTOSEL 4.18 15/92] PM / devfreq: use put_device() instead of kfree()

2018-09-14 Thread Sasha Levin
From: Arvind Yadav [ Upstream commit 2d803dc8f7a5f622ac47c3b650834ada3a2659b9 ] Never directly free @dev after calling device_register() or device_unregister(), even if device_register() returned an error. Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav

[PATCH AUTOSEL 4.18 12/92] evm: Don't deadlock if a crypto algorithm is unavailable

2018-09-14 Thread Sasha Levin
From: Matthew Garrett [ Upstream commit e2861fa71641c6414831d628a1f4f793b6562580 ] When EVM attempts to appraise a file signed with a crypto algorithm the kernel doesn't have support for, it will cause the kernel to trigger a module load. If the EVM policy includes appraisal of kernel modules th

[PATCH AUTOSEL 4.18 20/92] pinctrl: rza1: Fix selector use for groups and functions

2018-09-14 Thread Sasha Levin
From: Tony Lindgren [ Upstream commit dc4003d260594aa300028c3c5d040c5719abd19b ] We must use a mutex around the generic_add functions and save the function and group selector in case we need to remove them. Otherwise the selector use will be racy for deferred probe at least. Fixes: 5a49b644b307

[PATCH AUTOSEL 4.18 10/92] mtd: rawnand: fscm: Avoid collision on PC def when compiling for MIPS

2018-09-14 Thread Sasha Levin
From: Boris Brezillon [ Upstream commit 8f3931ed975e1d775b87ce85d65ecacd54138359 ] We want to allow this driver to be selected when COMPILE_TEST=y, this means the driver can be compiled for any arch, including MIPS. When compiling this driver for MIPS, we end up with a collision on the 'PC' macr

[PATCH AUTOSEL 4.18 05/92] mtdchar: fix overflows in adjustment of `count`

2018-09-14 Thread Sasha Levin
From: Jann Horn [ Upstream commit 6c6bc9ea84d0008024606bf5ba10519e20d851bf ] The first checks in mtdchar_read() and mtdchar_write() attempt to limit `count` such that `*ppos + count <= mtd->size`. However, they ignore the possibility of `*ppos > mtd->size`, allowing the calculation of `count` to

[PATCH AUTOSEL 4.18 04/92] audit: fix use-after-free in audit_add_watch

2018-09-14 Thread Sasha Levin
From: Ronny Chevalier [ Upstream commit baa2a4fdd525c8c4b0f704d20457195b29437839 ] audit_add_watch stores locally krule->watch without taking a reference on watch. Then, it calls audit_add_to_parent, and uses the watch stored locally. Unfortunately, it is possible that audit_add_to_parent updat

[PATCH AUTOSEL 4.18 09/92] Bluetooth: Use lock_sock_nested in bt_accept_enqueue

2018-09-14 Thread Sasha Levin
From: Philipp Puschmann [ Upstream commit b71c69c26b4916d11b8d403d8e667bbd191f1b8f ] Fixes this warning that was provoked by a pairing: [60258.016221] WARNING: possible recursive locking detected [60258.021558] 4.15.0-RD1812-BSP #1 Tainted: G O [60258.027146] -

[PATCH AUTOSEL 4.18 11/92] mtd: rawnand: sunxi: Add an U suffix to NFC_PAGE_OP definition

2018-09-14 Thread Sasha Levin
From: Boris Brezillon [ Upstream commit cf3e3fd2e94f4648f17fbd5e0e26409d5d1face9 ] Fixes the "warning: large integer implicitly truncated to unsigned type [-Woverflow]" warning when compiled for x86. This is needed in order to allow compiling this driver when COMPILE_TEST=y. Reported-by: Steph

[PATCH AUTOSEL 4.18 07/92] bpf: fix rcu annotations in compute_effective_progs()

2018-09-14 Thread Sasha Levin
From: Roman Gushchin [ Upstream commit 3960f4fd6585608e8cc285d9665821985494e147 ] The progs local variable in compute_effective_progs() is marked as __rcu, which is not correct. This is a local pointer, which is initialized by bpf_prog_array_alloc(), which also now returns a generic non-rcu poin

[PATCH AUTOSEL 4.18 03/92] arm64: dts: uniphier: Add missing cooling device properties for CPUs

2018-09-14 Thread Sasha Levin
From: Viresh Kumar [ Upstream commit af0e09d0c6762e486b0eb5cc4737396964c34fad ] The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then t

Re: [PATCH AUTOSEL 4.18 51/92] tools/testing/nvdimm: Fix support for emulating controller temperature

2018-09-14 Thread Dan Williams
On Fri, Sep 14, 2018 at 6:40 PM, Sasha Levin wrote: > On Fri, Sep 14, 2018 at 06:34:43PM -0700, Dan Williams wrote: >>On Fri, Sep 14, 2018 at 6:30 PM, Sasha Levin >> wrote: >>> From: Dan Williams >>> >>> [ Upstream commit e5d772fbe7685aae0dff99f3b54158a0ec32155e ] >>> >>> In addition to populatin

Re: [PATCH] iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor.

2018-09-14 Thread Song Qiang
On Sat, Sep 15, 2018 at 12:13:22AM +0530, Himanshu Jha wrote: > Hi Song, > > On Thu, Sep 13, 2018 at 10:22:29AM +0800, Song Qiang wrote: > > This driver was originally written by ST in 2016 as a misc input device > > driver, and hasn't been maintained for a long time. I grabbed some code > > from

Re: [PATCH v6 3/3] staging: mt7621-mmc: Fix debug macro IRQ_MSG and its usages

2018-09-14 Thread Nishad Kamdar
On Mon, Sep 10, 2018 at 05:05:13PM +0200, Greg Kroah-Hartman wrote: > On Sat, Sep 01, 2018 at 03:51:10AM +0530, Nishad Kamdar wrote: > > Replace all usages of IRQ_MSG with with dev_ without __func__ > > or __LINE__ or current->comm and current->pid. Remove the do {} > > while(0) loop for the single

INFO: task hung in fsnotify_connector_destroy_workfn (2)

2018-09-14 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:11da3a7f84f1 Linux 4.19-rc3 git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=141ffbca40 kernel config: https://syzkaller.appspot.com/x/.config?x=9917ff4b798e1a1e dashboard link: https://syzkaller.a

[PATCH 1/2] staging: rtl8723bs: Fix a sleep-in-atomic-context bug in issue_deauth_ex()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.17 are: [FUNC] msleep drivers/staging/rtl8723bs/core/rtw_mlme_ext.c, 3805: msleep in issue_deauth_ex drivers/staging/rtl8723bs/core/rtw_mlme_ext.c, 6336: issue_deauth_ex in disco

[PATCH 2/2] staging: rtl8723bs: Fix two sleep-in-atomic-context bugs in _rtw_pwr_wakeup()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.17 are: [FUNC] msleep drivers/staging/rtl8723bs/core/rtw_pwrctrl.c, 1243: msleep in _rtw_pwr_wakeup drivers/staging/rtl8723bs/core/rtw_ioctl_set.c, 510: _rtw_pwr_wakeup in rtw_se

Re: KSM not working in 4.9 Kernel

2018-09-14 Thread Pintu Kumar
On Fri, 14 Sep 2018, 10:42 pm Yang Shi, wrote: > > Hi Pintu, > > I recall there are some ksm test cases in LTP. Did you try them out? No. I haven't seen the LTP test. I will check out now. But I wonder what is the problem with my test? > On Fri, Sep 14, 2018 at 7:28 AM Pintu Kumar wrote: > > >

[PATCH v7 0/1] staging: mt7621-mmc: Fix debug macros and their usages

2018-09-14 Thread Nishad Kamdar
This patch fixes the the debug macro IRQ_MSG(). It deletes IRQ_MSG() and all its users as currently it is a no-op. Changes in v7: - Delete IRQ_MSG() macro and its users. - Patchset reduced to 1 patch as the patches fixing N_MSG() and ERR_MSG() have been accepted. Changes in v6: - Delete

[PATCH] staging: rtl8188eu: Fix a sleep-in-atomic-context bug in issue_deauth_ex()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call path (from bottom to top) in Linux-4.17 is: [FUNC] msleep drivers/staging/rtl8188eu/core/rtw_mlme_ext.c, 1536: msleep in issue_deauth_ex drivers/staging/rtl8188eu/core/rtw_mlme_ext.c, 5110: issue_deauth_ex in disconn

[PATCH v7 1/1] staging: mt7621-mmc: Delete IRQ_MSG() and its users.

2018-09-14 Thread Nishad Kamdar
This patch removes IRQ_MSG() and its users as currently it is a no-op. Signed-off-by: Nishad Kamdar --- Changes in v7: - Delete IRQ_MSG() and all its users Changes in v6: - No change Changes in v5: - No change --- drivers/staging/mt7621-mmc/dbg.h | 12 drivers/staging/mt7621-m

Re: [PATCH v5] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire

2018-09-14 Thread Paul E. McKenney
On Fri, Sep 14, 2018 at 05:08:21PM -0400, Alan Stern wrote: > More than one kernel developer has expressed the opinion that the LKMM > should enforce ordering of writes by locking. In other words, given > the following code: > > WRITE_ONCE(x, 1); > spin_unlock(&s): > spin_lock(&

Re: [PATCH 4/9] x86/intel_rdt: Fix invalid mode warning when

2018-09-14 Thread Reinette Chatre
On 9/14/2018 1:32 PM, Fenghua Yu wrote: > From: Reinette Chatre > > multiple resources are managed The above snippet is redundant. We can remove it in the next version. Reinette

Re: [PATCH 4/9] x86/intel_rdt: Fix invalid mode warning when

2018-09-14 Thread Reinette Chatre
On 9/14/2018 9:36 PM, Reinette Chatre wrote: > On 9/14/2018 1:32 PM, Fenghua Yu wrote: >> From: Reinette Chatre >> >> multiple resources are managed > > The above snippet is redundant. We can remove it in the next version. Apologies, I responded too fast. The subject intended to read: x86/intel_

[PATCH] mm: use match_string() helper to simplify the code

2018-09-14 Thread zhong jiang
match_string() returns the index of an array for a matching string, which can be used intead of open coded implementation. Signed-off-by: zhong jiang --- mm/mempolicy.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 2e76a8f..

[PATCH] iio: adc: max9611: Avoid implicit enum conversion warning

2018-09-14 Thread Nathan Chancellor
Clang warns when an enumerated type is implicitly converted to another. drivers/iio/adc/max9611.c:292:16: warning: implicit conversion from enumeration type 'enum max9611_conf_ids' to different enumeration type 'enum max9611_csa_gain' [-Wenum-conversion] *csa_gain = gain_se

[PATCH] misc: echo: Remove unnecessary parentheses and simplify check for zero

2018-09-14 Thread Nathan Chancellor
Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/misc/echo/echo.c:384:27: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((ec->nonupdate_dwell == 0)) { ^~~~ drivers/mis

Re: [PATCH] arm: common: use match_string() helper to simplify the code

2018-09-14 Thread zhong jiang
On 2018/9/15 7:52, kbuild test robot wrote: > Hi zhong, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on arm-soc/for-next] > [also build test ERROR on v4.19-rc3 next-20180913] > [if your patch is applied to the wrong git tree, please drop us a note to > help imp

Re: [PATCH] cpufreq: intel_pstate: Optimize IO boost in non HWP mode

2018-09-14 Thread Francisco Jerez
"Rafael J. Wysocki" writes: > On Tuesday, September 11, 2018 7:35:15 PM CEST Francisco Jerez wrote: >> >> "Rafael J. Wysocki" writes: >> >> > On Thursday, September 6, 2018 6:20:08 AM CEST Francisco Jerez wrote: >> > >> >> Srinivas Pandruvada writes: >> >>=20 >> >> > [...] >> >> > >> >> >> > >

Re: [PTCH] x86: APM: fix build warning when PROC_FS is not enabled

2018-09-14 Thread Christoph Hellwig
Thanks, this looks good to me: Reviewed-by: Christoph Hellwig

Re: [patch V2 04/10] x86/mm/cpa: Add debug mechanism

2018-09-14 Thread kbuild test robot
Hi Thomas, I love your patch! Perhaps something to improve: [auto build test WARNING on tip/x86/core] [also build test WARNING on v4.19-rc3 next-20180913] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

<    2   3   4   5   6   7