This is the start of the stable review cycle for the 5.4.28 release.
There are 102 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Thu, 26 Mar 2020 13:06:42 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.28-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.4.28-rc1
Johan Hovold <[email protected]>
staging: greybus: loopback_test: fix potential path truncations
Johan Hovold <[email protected]>
staging: greybus: loopback_test: fix potential path truncation
Jernej Skrabec <[email protected]>
drm/bridge: dw-hdmi: fix AVI frame colorimetry
Sagi Grimberg <[email protected]>
nvmet-tcp: set MSG_MORE only if we actually have more to send
Cristian Marussi <[email protected]>
arm64: smp: fix crash_smp_send_stop() behaviour
Cristian Marussi <[email protected]>
arm64: smp: fix smp_send_stop() behaviour
Kai-Heng Feng <[email protected]>
ALSA: hda/realtek: Fix pop noise on ALC225
Thomas Gleixner <[email protected]>
futex: Unbreak futex hashing
Peter Zijlstra <[email protected]>
futex: Fix inode life-time issue
Joerg Roedel <[email protected]>
x86/mm: split vmalloc_sync_all()
Qian Cai <[email protected]>
page-flags: fix a crash at SetPageError(THP_SWAP)
Vlastimil Babka <[email protected]>
mm, slub: prevent kmalloc_node crashes and memory leaks
Linus Torvalds <[email protected]>
mm: slub: be more careful about the double cmpxchg of freelist
Roman Penyaev <[email protected]>
epoll: fix possible lost wakeup on epoll_ctl() path
Michal Hocko <[email protected]>
mm: do not allow MADV_PAGEOUT for CoW pages
Baoquan He <[email protected]>
mm/hotplug: fix hot remove failure in SPARSEMEM|!VMEMMAP case
Chris Down <[email protected]>
mm, memcg: throttle allocators based on ancestral memory.high
Chris Down <[email protected]>
mm, memcg: fix corruption on 64-bit divisor in memory.high throttling
Chunguang Xu <[email protected]>
memcg: fix NULL pointer dereference in __mem_cgroup_usage_unregister_event
Alexander Shishkin <[email protected]>
stm class: sys-t: Fix the use of time_after()
Qiujun Huang <[email protected]>
drm/lease: fix WARNING in idr_destroy
Tom St Denis <[email protected]>
drm/amd/amdgpu: Fix GPR read from debugfs (v2)
Filipe Manana <[email protected]>
btrfs: fix log context list corruption after rename whiteout error
Steven Rostedt (VMware) <[email protected]>
xhci: Do not open code __print_symbolic() in xhci trace events
Vincenzo Frascino <[email protected]>
arm64: compat: Fix syscall number of compat_clock_getres
Corentin Labbe <[email protected]>
rtc: max8907: add missing select REGMAP_IRQ
Jessica Yu <[email protected]>
modpost: move the namespace field in Module.symvers last
Alexander Shishkin <[email protected]>
intel_th: pci: Add Elkhart Lake CPU support
Alexander Shishkin <[email protected]>
intel_th: Fix user-visible error codes
Alexander Shishkin <[email protected]>
intel_th: msu: Fix the unexpected state warning
Samuel Thibault <[email protected]>
staging/speakup: fix get_word non-space look-ahead
Johan Hovold <[email protected]>
staging: greybus: loopback_test: fix poll-mask build breakage
Michael Straube <[email protected]>
staging: rtl8188eu: Add device id for MERCUSYS MW150US v2
Nathan Chancellor <[email protected]>
kbuild: Disable -Wpointer-to-enum-cast
Murphy Zhou <[email protected]>
CIFS: fiemap: do not return EINVAL if get nothing
Masahiro Yamada <[email protected]>
mmc: sdhci-cadence: set SDHCI_QUIRK2_PRESET_VALUE_BROKEN for UniPhier
Michał Mirosław <[email protected]>
mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2
Ricky Wu <[email protected]>
mmc: rtsx_pci: Fix support for speed-modes that relies on tuning
Tomas Novotny <[email protected]>
iio: light: vcnl4000: update sampling periods for vcnl4040
Tomas Novotny <[email protected]>
iio: light: vcnl4000: update sampling periods for vcnl4200
Eugen Hristev <[email protected]>
iio: adc: at91-sama5d2_adc: fix differential channels in triggered mode
Olivier Moysan <[email protected]>
iio: adc: stm32-dfsdm: fix sleep in atomic context
Stephan Gerhold <[email protected]>
iio: magnetometer: ak8974: Fix negative raw values in sysfs
Alexandru Tachici <[email protected]>
iio: accel: adxl372: Set iio_chan BE
Fabrice Gasnier <[email protected]>
iio: trigger: stm32-timer: disable master mode when stopping
Wen-chien Jesse Sung <[email protected]>
iio: st_sensors: remap SMO8840 to LIS2DH12
Petr Štetiar <[email protected]>
iio: chemical: sps30: fix missing triggered buffer dependency
Eric Biggers <[email protected]>
tty: fix compat TIOCGSERIAL checking wrong function ptr
Eric Biggers <[email protected]>
tty: fix compat TIOCGSERIAL leaking uninitialized memory
Takashi Iwai <[email protected]>
ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks
Takashi Iwai <[email protected]>
ALSA: pcm: oss: Avoid plugin buffer overflow
Takashi Iwai <[email protected]>
ALSA: seq: oss: Fix running status after receiving sysex
Takashi Iwai <[email protected]>
ALSA: seq: virmidi: Fix running status after receiving sysex
Jian-Hong Pan <[email protected]>
ALSA: hda/realtek - Enable the headset of Acer N50-600 with ALC662
Jian-Hong Pan <[email protected]>
ALSA: hda/realtek - Enable headset mic of Acer X2660G with ALC662
Takashi Iwai <[email protected]>
ALSA: line6: Fix endless MIDI read loop
Anthony Mallet <[email protected]>
USB: cdc-acm: fix rounding error in TIOCSSERIAL
Anthony Mallet <[email protected]>
USB: cdc-acm: fix close_delay and closing_wait units in TIOCSSERIAL
Heikki Krogerus <[email protected]>
usb: typec: ucsi: displayport: Fix a potential race during registration
Heikki Krogerus <[email protected]>
usb: typec: ucsi: displayport: Fix NULL pointer dereference
Alberto Mattea <[email protected]>
usb: xhci: apply XHCI_SUSPEND_DELAY to AMD XHCI controller 1022:145c
Scott Chen <[email protected]>
USB: serial: pl2303: add device-id for HP LD381
Ran Wang <[email protected]>
usb: host: xhci-plat: add a shutdown
Daniele Palmas <[email protected]>
USB: serial: option: add ME910G1 ECM composition 0x110b
Hans de Goede <[email protected]>
usb: quirks: add NO_LPM quirk for RTL8153 based ethernet adapters
Kai-Heng Feng <[email protected]>
USB: Disable LPM on WD19's Realtek Hub
Sasha Levin <[email protected]>
Revert "drm/fbdev: Fallback to non tiled mode if all tiles not present"
Christian Brauner <[email protected]>
binderfs: use refcount for binder control devices too
Jonathan Neuschäfer <[email protected]>
parse-maintainers: Mark as executable
Carlo Nonato <[email protected]>
block, bfq: fix overwrite of bfq_group pointer in bfq_find_set_group()
Dongli Zhang <[email protected]>
xenbus: req->err should be updated before req->state
Dongli Zhang <[email protected]>
xenbus: req->body should be updated before req->state
Josip Pavic <[email protected]>
drm/amd/display: fix dcc swath size calculations on dcn1
Bhawanpreet Lakha <[email protected]>
drm/amd/display: Clear link settings on MST disable connector
Yintian Tao <[email protected]>
drm/amdgpu: clean wptr on wb when gpu recovery
Alexandre Ghiti <[email protected]>
riscv: Fix range looking for kernel image memblock
Damien Le Moal <[email protected]>
riscv: Force flat memory model with no-mmu
Aaro Koskinen <[email protected]>
spi: spi_register_controller(): free bus id on error paths
Olivier Moysan <[email protected]>
ASoC: stm32: sai: manage rebind issue
Vincent Chen <[email protected]>
riscv: avoid the PIC offset of static percpu data in module beyond 2G limits
Mike Snitzer <[email protected]>
dm integrity: use dm_bio_record and dm_bio_restore
Mike Snitzer <[email protected]>
dm bio record: save/restore bi_end_io and bi_integrity
Daniel Axtens <[email protected]>
altera-stapl: altera_get_note: prevent write beyond end of 'key'
luanshi <[email protected]>
drivers/perf: arm_pmu_acpi: Fix incorrect checking of gicc pointer
Joakim Zhang <[email protected]>
drivers/perf: fsl_imx8_ddr: Correct the CLEAR bit definition
Marek Szyprowski <[email protected]>
drm/exynos: hdmi: don't leak enable HDMI_EN regulator if probe fails
Marek Szyprowski <[email protected]>
drm/exynos: dsi: fix workaround for the legacy clock name
Marek Szyprowski <[email protected]>
drm/exynos: dsi: propagate error value and silence meaningless warning
Thommy Jakobsson <[email protected]>
spi/zynqmp: remove entry that causes a cs glitch
Evan Green <[email protected]>
spi: pxa2xx: Add CS control clock quirk
Kishon Vijay Abraham I <[email protected]>
ARM: dts: dra7: Add "dma-ranges" property to PCIe RC DT nodes
Steve French <[email protected]>
cifs: add missing mount option to /proc/mounts
Paulo Alcantara (SUSE) <[email protected]>
cifs: fix potential mismatch of UNC paths
Naveen N. Rao <[email protected]>
powerpc: Include .BTF section
Yuji Sasaki <[email protected]>
spi: qup: call spi_qup_pm_resume_runtime before suspending
Grygorii Strashko <[email protected]>
ARM: dts: dra7-l4: mark timer13-16 as pwm capable
Grygorii Strashko <[email protected]>
phy: ti: gmii-sel: do not fail in case of gmii
Grygorii Strashko <[email protected]>
phy: ti: gmii-sel: fix set of copy-paste errors
Evan Benn <[email protected]>
drm/mediatek: Find the cursor plane instead of hard coding it
Vignesh Raghavendra <[email protected]>
spi: spi-omap2-mcspi: Support probe deferral for DMA channels
Linus Torvalds <[email protected]>
locks: reinstate locks_delete_block optimization
yangerkun <[email protected]>
locks: fix a potential use-after-free problem when wakeup a waiter
-------------
Diffstat:
Documentation/kbuild/modules.rst | 4 +-
Makefile | 4 +-
arch/arm/boot/dts/dra7-l4.dtsi | 4 +
arch/arm/boot/dts/dra7.dtsi | 2 +
arch/arm64/include/asm/unistd.h | 2 +-
arch/arm64/kernel/smp.c | 25 ++++-
arch/powerpc/kernel/vmlinux.lds.S | 6 ++
arch/riscv/Kconfig | 1 +
arch/riscv/kernel/module.c | 16 ++++
arch/riscv/mm/init.c | 2 +-
arch/x86/mm/fault.c | 26 +++++-
block/bfq-cgroup.c | 9 +-
drivers/acpi/apei/ghes.c | 2 +-
drivers/android/binderfs.c | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 +-
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 +
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 +
.../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 +
.../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 4 +-
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 46 +++++----
drivers/gpu/drm/drm_client_modeset.c | 72 --------------
drivers/gpu/drm/drm_lease.c | 3 +-
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 12 ++-
drivers/gpu/drm/exynos/exynos_hdmi.c | 22 +++--
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 18 ++--
drivers/hwtracing/intel_th/msu.c | 13 +--
drivers/hwtracing/intel_th/pci.c | 5 +
drivers/hwtracing/stm/p_sys-t.c | 6 +-
drivers/iio/accel/adxl372.c | 1 +
drivers/iio/accel/st_accel_i2c.c | 2 +-
drivers/iio/adc/at91-sama5d2_adc.c | 15 +++
drivers/iio/adc/stm32-dfsdm-adc.c | 43 ++-------
drivers/iio/chemical/Kconfig | 2 +
drivers/iio/light/vcnl4000.c | 15 +--
drivers/iio/magnetometer/ak8974.c | 2 +-
drivers/iio/trigger/stm32-timer-trigger.c | 11 ++-
drivers/md/dm-bio-record.h | 15 +++
drivers/md/dm-integrity.c | 32 ++-----
drivers/misc/altera-stapl/altera.c | 12 +--
drivers/misc/cardreader/rts5227.c | 2 +-
drivers/misc/cardreader/rts5249.c | 2 +
drivers/misc/cardreader/rts5260.c | 2 +-
drivers/mmc/host/rtsx_pci_sdmmc.c | 13 ++-
drivers/mmc/host/sdhci-cadence.c | 18 +++-
drivers/mmc/host/sdhci-of-at91.c | 8 +-
drivers/nvme/target/tcp.c | 12 ++-
drivers/perf/arm_pmu_acpi.c | 7 +-
drivers/perf/fsl_imx8_ddr_perf.c | 10 +-
drivers/phy/ti/phy-gmii-sel.c | 10 +-
drivers/rtc/Kconfig | 1 +
drivers/spi/spi-omap2-mcspi.c | 77 ++++++++-------
drivers/spi/spi-pxa2xx.c | 23 +++++
drivers/spi/spi-qup.c | 11 ++-
drivers/spi/spi-zynqmp-gqspi.c | 3 -
drivers/spi/spi.c | 32 +++----
drivers/staging/greybus/tools/loopback_test.c | 21 +++--
drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 +
drivers/staging/speakup/main.c | 2 +-
drivers/tty/tty_io.c | 6 +-
drivers/usb/class/cdc-acm.c | 34 ++++---
drivers/usb/core/quirks.c | 6 ++
drivers/usb/host/xhci-pci.c | 3 +-
drivers/usb/host/xhci-plat.c | 1 +
drivers/usb/host/xhci-trace.h | 23 ++---
drivers/usb/serial/option.c | 2 +
drivers/usb/serial/pl2303.c | 1 +
drivers/usb/serial/pl2303.h | 1 +
drivers/usb/typec/ucsi/displayport.c | 12 ++-
drivers/xen/xenbus/xenbus_comms.c | 4 +
drivers/xen/xenbus/xenbus_xs.c | 9 +-
fs/btrfs/inode.c | 4 +
fs/cifs/cifs_dfs_ref.c | 2 +
fs/cifs/cifsfs.c | 2 +
fs/cifs/file.c | 3 +-
fs/cifs/smb2ops.c | 2 +-
fs/eventpoll.c | 8 +-
fs/inode.c | 1 +
fs/locks.c | 60 ++++++++----
include/linux/fs.h | 1 +
include/linux/futex.h | 17 ++--
include/linux/page-flags.h | 2 +-
include/linux/vmalloc.h | 5 +-
kernel/futex.c | 93 +++++++++++--------
kernel/notifier.c | 2 +-
mm/madvise.c | 12 ++-
mm/memcontrol.c | 103 +++++++++++++--------
mm/nommu.c | 10 +-
mm/slub.c | 32 ++++---
mm/sparse.c | 8 +-
mm/vmalloc.c | 11 ++-
scripts/Makefile.extrawarn | 1 +
scripts/export_report.pl | 2 +-
scripts/mod/modpost.c | 24 ++---
scripts/parse-maintainers.pl | 0
sound/core/oss/pcm_plugin.c | 12 ++-
sound/core/seq/oss/seq_oss_midi.c | 1 +
sound/core/seq/seq_virmidi.c | 1 +
sound/pci/hda/patch_realtek.c | 25 +++++
sound/soc/stm/stm32_sai_sub.c | 18 ++--
sound/usb/line6/driver.c | 2 +-
sound/usb/line6/midibuf.c | 2 +-
101 files changed, 773 insertions(+), 514 deletions(-)
From: Naveen N. Rao <[email protected]>
[ Upstream commit cb0cc635c7a9fa8a3a0f75d4d896721819c63add ]
Selecting CONFIG_DEBUG_INFO_BTF results in the below warning from ld:
ld: warning: orphan section `.BTF' from `.btf.vmlinux.bin.o' being placed in section `.BTF'
Include .BTF section in vmlinux explicitly to fix the same.
Signed-off-by: Naveen N. Rao <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sasha Levin <[email protected]>
---
arch/powerpc/kernel/vmlinux.lds.S | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 060a1acd7c6d7..4638d28633888 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -326,6 +326,12 @@ SECTIONS
*(.branch_lt)
}
+#ifdef CONFIG_DEBUG_INFO_BTF
+ .BTF : AT(ADDR(.BTF) - LOAD_OFFSET) {
+ *(.BTF)
+ }
+#endif
+
.opd : AT(ADDR(.opd) - LOAD_OFFSET) {
__start_opd = .;
KEEP(*(.opd))
--
2.20.1
From: Damien Le Moal <[email protected]>
[ Upstream commit aa2734202acc506d09c8e641db4da161f902df27 ]
Compilation errors trigger if ARCH_SPARSEMEM_ENABLE is enabled for
a nommu kernel. Since the sparsemem model does not make sense anyway
for the nommu case, do not allow selecting this option to always use
the flatmem model.
Signed-off-by: Damien Le Moal <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Reviewed-by: Palmer Dabbelt <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
arch/riscv/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index ade9699aa0dd6..a0fa4be94a68e 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -101,6 +101,7 @@ config ARCH_FLATMEM_ENABLE
config ARCH_SPARSEMEM_ENABLE
def_bool y
+ depends on MMU
select SPARSEMEM_VMEMMAP_ENABLE
config ARCH_SELECT_MEMORY_MODEL
--
2.20.1
From: Olivier Moysan <[email protected]>
[ Upstream commit 0d6defc7e0e437a9fd53622f7fd85740f38d5693 ]
The commit e894efef9ac7 ("ASoC: core: add support to card rebind")
allows to rebind the sound card after a rebind of one of its component.
With this commit, the sound card is actually rebound,
but may be no more functional. The following problems have been seen
with STM32 SAI driver.
1) DMA channel is not requested:
With the sound card rebind the simplified call sequence is:
stm32_sai_sub_probe
snd_soc_register_component
snd_soc_try_rebind_card
snd_soc_instantiate_card
devm_snd_dmaengine_pcm_register
The problem occurs because the pcm must be registered,
before snd_soc_instantiate_card() is called.
Modify SAI driver, to change the call sequence as follows:
stm32_sai_sub_probe
devm_snd_dmaengine_pcm_register
snd_soc_register_component
snd_soc_try_rebind_card
2) DMA channel is not released:
dma_release_channel() is not called when
devm_dmaengine_pcm_release() is executed.
This occurs because SND_DMAENGINE_PCM_DRV_NAME component,
has already been released through devm_component_release().
devm_dmaengine_pcm_release() should be called before
devm_component_release() to avoid this problem.
Call snd_dmaengine_pcm_unregister() and snd_soc_unregister_component()
explicitly from SAI driver, to have the right sequence.
Signed-off-by: Olivier Moysan <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
sound/soc/stm/stm32_sai_sub.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index 30bcd5d3a32a8..10eb4b8e8e7ee 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -1543,20 +1543,20 @@ static int stm32_sai_sub_probe(struct platform_device *pdev)
return ret;
}
- ret = devm_snd_soc_register_component(&pdev->dev, &stm32_component,
- &sai->cpu_dai_drv, 1);
+ ret = snd_dmaengine_pcm_register(&pdev->dev, conf, 0);
+ if (ret) {
+ dev_err(&pdev->dev, "Could not register pcm dma\n");
+ return ret;
+ }
+
+ ret = snd_soc_register_component(&pdev->dev, &stm32_component,
+ &sai->cpu_dai_drv, 1);
if (ret)
return ret;
if (STM_SAI_PROTOCOL_IS_SPDIF(sai))
conf = &stm32_sai_pcm_config_spdif;
- ret = devm_snd_dmaengine_pcm_register(&pdev->dev, conf, 0);
- if (ret) {
- dev_err(&pdev->dev, "Could not register pcm dma\n");
- return ret;
- }
-
return 0;
}
@@ -1565,6 +1565,8 @@ static int stm32_sai_sub_remove(struct platform_device *pdev)
struct stm32_sai_sub_data *sai = dev_get_drvdata(&pdev->dev);
clk_unprepare(sai->pdata->pclk);
+ snd_dmaengine_pcm_unregister(&pdev->dev);
+ snd_soc_unregister_component(&pdev->dev);
return 0;
}
--
2.20.1
From: Aaro Koskinen <[email protected]>
[ Upstream commit f9981d4f50b475d7dbb70f3022b87a3c8bba9fd6 ]
Some error paths leave the bus id allocated. As a result the IDR
allocation will fail after a deferred probe. Fix by freeing the bus id
always on error.
Signed-off-by: Aaro Koskinen <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/spi/spi.c | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 26b91ee0855dc..c186d3a944cd0 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2452,7 +2452,7 @@ int spi_register_controller(struct spi_controller *ctlr)
if (ctlr->use_gpio_descriptors) {
status = spi_get_gpio_descs(ctlr);
if (status)
- return status;
+ goto free_bus_id;
/*
* A controller using GPIO descriptors always
* supports SPI_CS_HIGH if need be.
@@ -2462,7 +2462,7 @@ int spi_register_controller(struct spi_controller *ctlr)
/* Legacy code path for GPIOs from DT */
status = of_spi_get_gpio_numbers(ctlr);
if (status)
- return status;
+ goto free_bus_id;
}
}
@@ -2470,17 +2470,14 @@ int spi_register_controller(struct spi_controller *ctlr)
* Even if it's just one always-selected device, there must
* be at least one chipselect.
*/
- if (!ctlr->num_chipselect)
- return -EINVAL;
+ if (!ctlr->num_chipselect) {
+ status = -EINVAL;
+ goto free_bus_id;
+ }
status = device_add(&ctlr->dev);
- if (status < 0) {
- /* free bus id */
- mutex_lock(&board_lock);
- idr_remove(&spi_master_idr, ctlr->bus_num);
- mutex_unlock(&board_lock);
- goto done;
- }
+ if (status < 0)
+ goto free_bus_id;
dev_dbg(dev, "registered %s %s\n",
spi_controller_is_slave(ctlr) ? "slave" : "master",
dev_name(&ctlr->dev));
@@ -2496,11 +2493,7 @@ int spi_register_controller(struct spi_controller *ctlr)
status = spi_controller_initialize_queue(ctlr);
if (status) {
device_del(&ctlr->dev);
- /* free bus id */
- mutex_lock(&board_lock);
- idr_remove(&spi_master_idr, ctlr->bus_num);
- mutex_unlock(&board_lock);
- goto done;
+ goto free_bus_id;
}
}
/* add statistics */
@@ -2515,7 +2508,12 @@ int spi_register_controller(struct spi_controller *ctlr)
/* Register devices from the device tree and ACPI */
of_register_spi_devices(ctlr);
acpi_register_spi_devices(ctlr);
-done:
+ return status;
+
+free_bus_id:
+ mutex_lock(&board_lock);
+ idr_remove(&spi_master_idr, ctlr->bus_num);
+ mutex_unlock(&board_lock);
return status;
}
EXPORT_SYMBOL_GPL(spi_register_controller);
--
2.20.1
From: Mike Snitzer <[email protected]>
[ Upstream commit 248aa2645aa7fc9175d1107c2593cc90d4af5a4e ]
In cases where dec_in_flight() has to requeue the integrity_bio_wait
work to transfer the rest of the data, the bio's __bi_remaining might
already have been decremented to 0, e.g.: if bio passed to underlying
data device was split via blk_queue_split().
Use dm_bio_{record,restore} rather than effectively open-coding them in
dm-integrity -- these methods now manage __bi_remaining too.
Depends-on: f7f0b057a9c1 ("dm bio record: save/restore bi_end_io and bi_integrity")
Reported-by: Daniel Glöckner <[email protected]>
Suggested-by: Mikulas Patocka <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/md/dm-integrity.c | 32 +++++++++-----------------------
1 file changed, 9 insertions(+), 23 deletions(-)
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index 57ac603f37410..145bc2e7eaf01 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -6,6 +6,8 @@
* This file is released under the GPL.
*/
+#include "dm-bio-record.h"
+
#include <linux/compiler.h>
#include <linux/module.h>
#include <linux/device-mapper.h>
@@ -292,11 +294,7 @@ struct dm_integrity_io {
struct completion *completion;
- struct gendisk *orig_bi_disk;
- u8 orig_bi_partno;
- bio_end_io_t *orig_bi_end_io;
- struct bio_integrity_payload *orig_bi_integrity;
- struct bvec_iter orig_bi_iter;
+ struct dm_bio_details bio_details;
};
struct journal_completion {
@@ -1447,14 +1445,9 @@ static void integrity_end_io(struct bio *bio)
{
struct dm_integrity_io *dio = dm_per_bio_data(bio, sizeof(struct dm_integrity_io));
- bio->bi_iter = dio->orig_bi_iter;
- bio->bi_disk = dio->orig_bi_disk;
- bio->bi_partno = dio->orig_bi_partno;
- if (dio->orig_bi_integrity) {
- bio->bi_integrity = dio->orig_bi_integrity;
+ dm_bio_restore(&dio->bio_details, bio);
+ if (bio->bi_integrity)
bio->bi_opf |= REQ_INTEGRITY;
- }
- bio->bi_end_io = dio->orig_bi_end_io;
if (dio->completion)
complete(dio->completion);
@@ -1539,7 +1532,7 @@ static void integrity_metadata(struct work_struct *w)
}
}
- __bio_for_each_segment(bv, bio, iter, dio->orig_bi_iter) {
+ __bio_for_each_segment(bv, bio, iter, dio->bio_details.bi_iter) {
unsigned pos;
char *mem, *checksums_ptr;
@@ -1583,7 +1576,7 @@ static void integrity_metadata(struct work_struct *w)
if (likely(checksums != checksums_onstack))
kfree(checksums);
} else {
- struct bio_integrity_payload *bip = dio->orig_bi_integrity;
+ struct bio_integrity_payload *bip = dio->bio_details.bi_integrity;
if (bip) {
struct bio_vec biv;
@@ -2002,20 +1995,13 @@ static void dm_integrity_map_continue(struct dm_integrity_io *dio, bool from_map
} else
dio->completion = NULL;
- dio->orig_bi_iter = bio->bi_iter;
-
- dio->orig_bi_disk = bio->bi_disk;
- dio->orig_bi_partno = bio->bi_partno;
+ dm_bio_record(&dio->bio_details, bio);
bio_set_dev(bio, ic->dev->bdev);
-
- dio->orig_bi_integrity = bio_integrity(bio);
bio->bi_integrity = NULL;
bio->bi_opf &= ~REQ_INTEGRITY;
-
- dio->orig_bi_end_io = bio->bi_end_io;
bio->bi_end_io = integrity_end_io;
-
bio->bi_iter.bi_size = dio->range.n_sectors << SECTOR_SHIFT;
+
generic_make_request(bio);
if (need_sync_io) {
--
2.20.1
From: Marek Szyprowski <[email protected]>
[ Upstream commit 3b6a9b19ab652efac7ad4c392add6f1235019568 ]
Move enabling and disabling HDMI_EN optional regulator to probe() function
to keep track on the regulator status. This fixes following warning if
probe() fails (for example when I2C DDC adapter cannot be yet gathered
due to the missing driver). This fixes following warning observed on
Arndale5250 board with multi_v7_defconfig:
[drm] Failed to get ddc i2c adapter by node
------------[ cut here ]------------
WARNING: CPU: 0 PID: 214 at drivers/regulator/core.c:2051 _regulator_put+0x16c/0x184
Modules linked in: ...
CPU: 0 PID: 214 Comm: systemd-udevd Not tainted 5.6.0-rc2-next-20200219-00040-g38af1dfafdbb #7570
Hardware name: Samsung Exynos (Flattened Device Tree)
[<c0312258>] (unwind_backtrace) from [<c030cc10>] (show_stack+0x10/0x14)
[<c030cc10>] (show_stack) from [<c0f0d3a0>] (dump_stack+0xcc/0xe0)
[<c0f0d3a0>] (dump_stack) from [<c0346a58>] (__warn+0xe0/0xf8)
[<c0346a58>] (__warn) from [<c0346b20>] (warn_slowpath_fmt+0xb0/0xb8)
[<c0346b20>] (warn_slowpath_fmt) from [<c0893f58>] (_regulator_put+0x16c/0x184)
[<c0893f58>] (_regulator_put) from [<c0893f8c>] (regulator_put+0x1c/0x2c)
[<c0893f8c>] (regulator_put) from [<c09b2664>] (release_nodes+0x17c/0x200)
[<c09b2664>] (release_nodes) from [<c09aebe8>] (really_probe+0x10c/0x350)
[<c09aebe8>] (really_probe) from [<c09aefa8>] (driver_probe_device+0x60/0x1a0)
[<c09aefa8>] (driver_probe_device) from [<c09af288>] (device_driver_attach+0x58/0x60)
[<c09af288>] (device_driver_attach) from [<c09af310>] (__driver_attach+0x80/0xbc)
[<c09af310>] (__driver_attach) from [<c09ace34>] (bus_for_each_dev+0x68/0xb4)
[<c09ace34>] (bus_for_each_dev) from [<c09ae00c>] (bus_add_driver+0x130/0x1e8)
[<c09ae00c>] (bus_add_driver) from [<c09afd98>] (driver_register+0x78/0x110)
[<c09afd98>] (driver_register) from [<bf139558>] (exynos_drm_init+0xe8/0x11c [exynosdrm])
[<bf139558>] (exynos_drm_init [exynosdrm]) from [<c0302fa8>] (do_one_initcall+0x50/0x220)
[<c0302fa8>] (do_one_initcall) from [<c03dc02c>] (do_init_module+0x60/0x210)
[<c03dc02c>] (do_init_module) from [<c03daf44>] (load_module+0x1c0c/0x2310)
[<c03daf44>] (load_module) from [<c03db85c>] (sys_finit_module+0xac/0xbc)
[<c03db85c>] (sys_finit_module) from [<c0301000>] (ret_fast_syscall+0x0/0x54)
Exception stack(0xecca3fa8 to 0xecca3ff0)
...
---[ end trace 276c91214635905c ]---
Signed-off-by: Marek Szyprowski <[email protected]>
Reviewed-by: Andrzej Hajda <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/gpu/drm/exynos/exynos_hdmi.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 09aa73c0f2add..0073a2b3b80a2 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1802,18 +1802,10 @@ static int hdmi_resources_init(struct hdmi_context *hdata)
hdata->reg_hdmi_en = devm_regulator_get_optional(dev, "hdmi-en");
- if (PTR_ERR(hdata->reg_hdmi_en) != -ENODEV) {
+ if (PTR_ERR(hdata->reg_hdmi_en) != -ENODEV)
if (IS_ERR(hdata->reg_hdmi_en))
return PTR_ERR(hdata->reg_hdmi_en);
- ret = regulator_enable(hdata->reg_hdmi_en);
- if (ret) {
- DRM_DEV_ERROR(dev,
- "failed to enable hdmi-en regulator\n");
- return ret;
- }
- }
-
return hdmi_bridge_init(hdata);
}
@@ -2020,6 +2012,15 @@ static int hdmi_probe(struct platform_device *pdev)
}
}
+ if (!IS_ERR(hdata->reg_hdmi_en)) {
+ ret = regulator_enable(hdata->reg_hdmi_en);
+ if (ret) {
+ DRM_DEV_ERROR(dev,
+ "failed to enable hdmi-en regulator\n");
+ goto err_hdmiphy;
+ }
+ }
+
pm_runtime_enable(dev);
audio_infoframe = &hdata->audio.infoframe;
@@ -2044,7 +2045,8 @@ static int hdmi_probe(struct platform_device *pdev)
err_rpm_disable:
pm_runtime_disable(dev);
-
+ if (!IS_ERR(hdata->reg_hdmi_en))
+ regulator_disable(hdata->reg_hdmi_en);
err_hdmiphy:
if (hdata->hdmiphy_port)
put_device(&hdata->hdmiphy_port->dev);
--
2.20.1
From: Stephan Gerhold <[email protected]>
commit b500c086e4110829a308c23e83a7cdc65b26228a upstream.
At the moment, reading from in_magn_*_raw in sysfs tends to return
large values around 65000, even though the output of ak8974 is actually
limited to ±32768. This happens because the value is never converted
to the signed 16-bit integer variant.
Add an explicit cast to s16 to fix this.
Fixes: 7c94a8b2ee8c ("iio: magn: add a driver for AK8974")
Signed-off-by: Stephan Gerhold <[email protected]>
Reviewed-by: Linus Waleij <[email protected]>
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/iio/magnetometer/ak8974.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/iio/magnetometer/ak8974.c
+++ b/drivers/iio/magnetometer/ak8974.c
@@ -564,7 +564,7 @@ static int ak8974_read_raw(struct iio_de
* We read all axes and discard all but one, for optimized
* reading, use the triggered buffer.
*/
- *val = le16_to_cpu(hw_values[chan->address]);
+ *val = (s16)le16_to_cpu(hw_values[chan->address]);
ret = IIO_VAL_INT;
}
From: Daniel Axtens <[email protected]>
[ Upstream commit 3745488e9d599916a0b40d45d3f30e3d4720288e ]
altera_get_note is called from altera_init, where key is kzalloc(33).
When the allocation functions are annotated to allow the compiler to see
the sizes of objects, and with FORTIFY_SOURCE, we see:
In file included from drivers/misc/altera-stapl/altera.c:14:0:
In function ‘strlcpy’,
inlined from ‘altera_init’ at drivers/misc/altera-stapl/altera.c:2189:5:
include/linux/string.h:378:4: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object passed as 1st parameter
__write_overflow();
^~~~~~~~~~~~~~~~~~
That refers to this code in altera_get_note:
if (key != NULL)
strlcpy(key, &p[note_strings +
get_unaligned_be32(
&p[note_table + (8 * i)])],
length);
The error triggers because the length of 'key' is 33, but the copy
uses length supplied as the 'length' parameter, which is always
256. Split the size parameter into key_len and val_len, and use the
appropriate length depending on what is being copied.
Detected by compiler error, only compile-tested.
Cc: "Igor M. Liplianin" <[email protected]>
Signed-off-by: Daniel Axtens <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/202002251042.D898E67AC@keescook
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/misc/altera-stapl/altera.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/misc/altera-stapl/altera.c b/drivers/misc/altera-stapl/altera.c
index 25e5f24b3fecd..5bdf574723144 100644
--- a/drivers/misc/altera-stapl/altera.c
+++ b/drivers/misc/altera-stapl/altera.c
@@ -2112,8 +2112,8 @@ static int altera_execute(struct altera_state *astate,
return status;
}
-static int altera_get_note(u8 *p, s32 program_size,
- s32 *offset, char *key, char *value, int length)
+static int altera_get_note(u8 *p, s32 program_size, s32 *offset,
+ char *key, char *value, int keylen, int vallen)
/*
* Gets key and value of NOTE fields in the JBC file.
* Can be called in two modes: if offset pointer is NULL,
@@ -2170,7 +2170,7 @@ static int altera_get_note(u8 *p, s32 program_size,
&p[note_table + (8 * i) + 4])];
if (value != NULL)
- strlcpy(value, value_ptr, length);
+ strlcpy(value, value_ptr, vallen);
}
}
@@ -2189,13 +2189,13 @@ static int altera_get_note(u8 *p, s32 program_size,
strlcpy(key, &p[note_strings +
get_unaligned_be32(
&p[note_table + (8 * i)])],
- length);
+ keylen);
if (value != NULL)
strlcpy(value, &p[note_strings +
get_unaligned_be32(
&p[note_table + (8 * i) + 4])],
- length);
+ vallen);
*offset = i + 1;
}
@@ -2449,7 +2449,7 @@ int altera_init(struct altera_config *config, const struct firmware *fw)
__func__, (format_version == 2) ? "Jam STAPL" :
"pre-standardized Jam 1.1");
while (altera_get_note((u8 *)fw->data, fw->size,
- &offset, key, value, 256) == 0)
+ &offset, key, value, 32, 256) == 0)
printk(KERN_INFO "%s: NOTE \"%s\" = \"%s\"\n",
__func__, key, value);
}
--
2.20.1
On 3/24/20 7:09 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.4.28 release.
> There are 102 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 26 Mar 2020 13:06:42 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.28-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
On 3/24/20 6:09 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.4.28 release.
> There are 102 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 26 Mar 2020 13:06:42 +0000.
> Anything received after that time might be too late.
>
Build results:
total: 158 pass: 158 fail: 0
Qemu test results:
total: 427 pass: 427 fail: 0
Guenter
On Tue, 24 Mar 2020 at 18:50, Greg Kroah-Hartman
<[email protected]> wrote:
>
> This is the start of the stable review cycle for the 5.4.28 release.
> There are 102 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 26 Mar 2020 13:06:42 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.28-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------------------------------------------
kernel: 5.4.28-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-5.4.y
git commit: 14bb11f6495febf1ba14babcf03935cc83827808
git describe: v5.4.27-103-g14bb11f6495f
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-5.4-oe/build/v5.4.27-103-g14bb11f6495f
No regressions (compared to build v5.4.26-51-ge72abf1f11a9)
No fixes (compared to build v5.4.26-51-ge72abf1f11a9)
Ran 27616 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c
- hi6220-hikey
- i386
- juno-r2
- juno-r2-compat
- juno-r2-kasan
- nxp-ls2088
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15
- x86
- x86-kasan
Test Suites
-----------
* build
* install-android-platform-tools-r2600
* install-android-platform-tools-r2800
* libgpiod
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-ipc-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* perf
* kselftest
* kvm-unit-tests
* libhugetlbfs
* ltp-commands-tests
* ltp-containers-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-io-tests
* ltp-math-tests
* network-basic-tests
* v4l2-compliance
* ltp-fs-tests
* spectre-meltdown-checker-test
* ltp-open-posix-tests
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
--
Linaro LKFT
https://lkft.linaro.org