[RFC][PATCH 5/5] thermal: int340x: Use new device interface

2020-05-04 Thread Srinivas Pandruvada
Use the new framework to send notifications for: - Setting temperature threshold for notification to avoid polling - Send THERMAL_TRIP_REACHED event on reaching threshold - Send THERMAL_TRIP_UPDATE when firmware change the the existing trip temperature Signed-off-by: Srinivas Pandruvada ---

[RFC][PATCH 3/5] thermal: Add support for setting notification thresholds

2020-05-04 Thread Srinivas Pandruvada
Add new attributes in thermal syfs when a thermal drivers provides callbacks for them and CONFIG_THERMAL_USER_EVENT_INTERFACE is defined. These attribute allow user space to stop polling for temperature. These attributes are: - temp_thres_low: Specify a notification temperature for a low

[RFC][PATCH 4/5] thermal: Add support for setting polling interval

2020-05-04 Thread Srinivas Pandruvada
Add new attribute in the thermal syfs for setting temperature sampling interval when CONFIG_THERMAL_USER_EVENT_INTERFACE is defined. The default value is 0, which means no polling. At this interval user space will get an event THERMAL_TEMP_SAMPLE with temperature sample. This reuses existing

[RFC][PATCH 0/5] thermal: Add new mechanism to get thermal notification

2020-05-04 Thread Srinivas Pandruvada
I presented this idea during LPC 2018. Refer to the following link: https://linuxplumbersconf.org/event/2/contributions/182/attachments/38/45/LPC_2018_Thermal-Srinivas-Rui.pdf There was broad agreement about this. At that time, there was no use case for non x86 systems. But now there is interest

[RFC][PATCH 1/5] thermal: Add support for /dev/thermal_notify

2020-05-04 Thread Srinivas Pandruvada
This change adds an optional feature to add a new device entry /dev/thermal_notify. When config CONFIG_THERMAL_USER_EVENT_INTERFACE is selected, this new device entry is created. Thermal core or any thermal driver can use thermal_dev_send_event() interface to send events. Each user events

Re: [PATCH RESEND net-next] net: dsa: felix: allow the device to be disabled

2020-05-04 Thread David Miller
From: Michael Walle Date: Mon, 4 May 2020 18:52:28 +0200 > If there is no specific configuration of the felix switch in the device > tree, but only the default configuration (ie. given by the SoCs dtsi > file), the probe fails because no CPU port has been set. On the other > hand you cannot set

[PATCH 4.4 15/18] ASoC: wm8960: Fix WM8960_SYSCLK_PLL mode

2020-05-04 Thread Greg Kroah-Hartman
From: Stuart Henderson commit 6bb7451429084cefcb3a18fff809f7992595d2af upstream. With the introduction of WM8960_SYSCLK_AUTO mode, WM8960_SYSCLK_PLL mode was made unusable. Ensure we're not PLL mode before trying to use MCLK. Fixes: 3176bf2d7ccd ("ASoC: wm8960: update pll and clock setting

[PATCH net-next v2 3/4] net: ipa: define IMEM memory region for IPA

2020-05-04 Thread Alex Elder
Define a region of IMEM memory available for use by IPA in the platform configuration data. Initialize it from ipa_mem_init(). The memory must be mapped for access through an SMMU. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa.h | 5 ++ drivers/net/ipa/ipa_data-sc7180.c | 2 +

[PATCH 4.9 04/18] drm/qxl: qxl_release leak in qxl_hw_surface_alloc()

2020-05-04 Thread Greg Kroah-Hartman
From: Vasily Averin commit a65aa9c3676ffccb21361d52fcfedd5b5ff387d7 upstream. Cc: sta...@vger.kernel.org Fixes: 8002db6336dd ("qxl: convert qxl driver to proper use for reservations") Signed-off-by: Vasily Averin Link:

[PATCH 4.4 14/18] [media] exynos4-is: fix a format string bug

2020-05-04 Thread Greg Kroah-Hartman
From: Rasmus Villemoes commit 76a563675485849f6f9ad5b30df220438b3628c1 upstream. Ironically, 7d4020c3c400 ("[media] exynos4-is: fix some warnings when compiling on arm64") fixed some format string bugs but introduced a new one. buf_index is a simple int, so it should be printed with %d, not

[PATCH 4.9 05/18] btrfs: fix block group leak when removing fails

2020-05-04 Thread Greg Kroah-Hartman
From: Xiyu Yang commit f6033c5e333238f299c3ae03fac8cc1365b23b77 upstream. btrfs_remove_block_group() invokes btrfs_lookup_block_group(), which returns a local reference of the block group that contains the given bytenr to "block_group" with increased refcount. When btrfs_remove_block_group()

[PATCH 4.4 18/18] selinux: properly handle multiple messages in selinux_netlink_send()

2020-05-04 Thread Greg Kroah-Hartman
From: Paul Moore commit fb73974172ffaaf57a7c42f35424d9aece1a5af6 upstream. Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first

[PATCH 4.4 17/18] ipv6: use READ_ONCE() for inet->hdrincl as in ipv4

2020-05-04 Thread Greg Kroah-Hartman
From: Olivier Matz commit 59e3e4b52663a9d97efbce7307f62e4bc5c9ce91 upstream. As it was done in commit 8f659a03a0ba ("net: ipv4: fix for a race condition in raw_sendmsg") and commit 20b50d79974e ("net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()") for ipv4, copy the value

[PATCH net-next v2 4/4] net: ipa: define SMEM memory region for IPA

2020-05-04 Thread Alex Elder
Arrange to use an item from SMEM memory for IPA. SMEM item number 497 is designated to be used by the IPA. Specify the item ID and size of the region in platform configuration data. Allocate and get a pointer to this region from ipa_mem_init(). The memory must be mapped for access through an

[PATCH 4.9 11/18] RDMA/mlx4: Initialize ib_spec on the stack

2020-05-04 Thread Greg Kroah-Hartman
From: Alaa Hleihel commit c08cfb2d8d78bfe81b37cc6ba84f0875bddd0d5c upstream. Initialize ib_spec on the stack before using it, otherwise we will have garbage values that will break creating default rules with invalid parsing error. Fixes: a37a1a428431 ("IB/mlx4: Add mechanism to support flow

[PATCH 4.9 01/18] ext4: fix special inode number checks in __ext4_iget()

2020-05-04 Thread Greg Kroah-Hartman
From: Theodore Ts'o commit 191ce17876c9367819c4b0a25b503c0f6d9054d8 upstream. The check for special (reserved) inode number checks in __ext4_iget() was broken by commit 8a363970d1dc: ("ext4: avoid declaring fs inconsistent due to invalid file handles"). This was caused by a botched reversal of

[PATCH 4.4 10/18] i2c: designware-pci: use IRQF_COND_SUSPEND flag

2020-05-04 Thread Greg Kroah-Hartman
From: Andy Shevchenko commit 08c6e8cc66282a082484480c1a5641bc27d26c55 upstream. This is effectively reapplies the commit b0898fdaffb2 ("i2c: designware-pci: use IRQF_COND_SUSPEND flag") after the commit d80d134182ba ("i2c: designware: Move common probe code into i2c_dw_probe()"). Original

[PATCH 4.9 14/18] ALSA: opti9xx: shut up gcc-10 range warning

2020-05-04 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit 5ce00760a84848d008554c693ceb6286f4d9c509 upstream. gcc-10 points out a few instances of suspicious integer arithmetic leading to value truncation: sound/isa/opti9xx/opti92x-ad1848.c: In function 'snd_opti9xx_configure': sound/isa/opti9xx/opti92x-ad1848.c:322:43:

[PATCH 4.14 17/26] RDMA/mlx4: Initialize ib_spec on the stack

2020-05-04 Thread Greg Kroah-Hartman
From: Alaa Hleihel commit c08cfb2d8d78bfe81b37cc6ba84f0875bddd0d5c upstream. Initialize ib_spec on the stack before using it, otherwise we will have garbage values that will break creating default rules with invalid parsing error. Fixes: a37a1a428431 ("IB/mlx4: Add mechanism to support flow

Re: [PATCH v1 0/3] allow ramoops to collect all kmesg_dump events

2020-05-04 Thread Kees Cook
On Sat, May 02, 2020 at 10:35:52AM -0400, Pavel Tatashin wrote: > Currently, ramoops is capable to collect dmesg buffer only during > panic and oops events. However, it is desirable for shutdown performance > analysis reasons to optionally allow collecting dmesg buffers during other > events as

[PATCH 4.14 10/26] ALSA: hda/realtek - Two front mics on a Lenovo ThinkCenter

2020-05-04 Thread Greg Kroah-Hartman
From: Hui Wang commit ef0b3203c758b6b8abdb5dca651880347eae6b8c upstream. This new Lenovo ThinkCenter has two front mics which can't be handled by PA so far, so apply the fixup ALC283_FIXUP_HEADSET_MIC to change the location for one of the mics. Cc: Signed-off-by: Hui Wang Link:

[PATCH 4.14 19/26] vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn()

2020-05-04 Thread Greg Kroah-Hartman
From: Sean Christopherson commit 5cbf3264bc715e9eb384e2b68601f8c02bb9a61d upstream. Use follow_pfn() to get the PFN of a PFNMAP VMA instead of assuming that vma->vm_pgoff holds the base PFN of the VMA. This fixes a bug where attempting to do VFIO_IOMMU_MAP_DMA on an arbitrary PFNMAP'd region

[PATCH 4.14 12/26] ALSA: pcm: oss: Place the plugin buffer overflow checks correctly

2020-05-04 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 4285de0725b1bf73608abbcd35ad7fd3ddc0b61e upstream. The checks of the plugin buffer overflow in the previous fix by commit f2ecf903ef06 ("ALSA: pcm: oss: Avoid plugin buffer overflow") are put in the wrong places mistakenly, which leads to the expected (repeated)

[PATCH 4.9 15/18] nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl

2020-05-04 Thread Greg Kroah-Hartman
From: Andreas Gruenbacher commit 7648f939cb919b9d15c21fff8cd9eba908d595dc upstream. nfs3_set_acl keeps track of the acl it allocated locally to determine if an acl needs to be released at the end. This results in a memory leak when the function allocates an acl as well as a default acl. Fix

Re: [PATCH v4 4/4] thermal: cpuidle: Register cpuidle cooling device

2020-05-04 Thread Daniel Lezcano
Hi, On 29/04/2020 23:01, Daniel Lezcano wrote: > On 29/04/2020 22:02, Lukasz Luba wrote: >> >> >> On 4/29/20 11:36 AM, Daniel Lezcano wrote: >>> The cpuidle driver can be used as a cooling device by injecting idle >>> cycles. The DT binding for the idle state added an optional >>> >>> When the

[PATCH 4.14 14/26] PM: hibernate: Freeze kernel threads in software_resume()

2020-05-04 Thread Greg Kroah-Hartman
From: Dexuan Cui commit 2351f8d295ed63393190e39c2f7c1fee1a80578f upstream. Currently the kernel threads are not frozen in software_resume(), so between dpm_suspend_start(PMSG_QUIESCE) and resume_target_kernel(), system_freezable_power_efficient_wq can still try to submit SCSI commands and this

[PATCH 4.14 18/26] vfio: avoid possible overflow in vfio_iommu_type1_pin_pages

2020-05-04 Thread Greg Kroah-Hartman
From: Yan Zhao commit 0ea971f8dcd6dee78a9a30ea70227cf305f11ff7 upstream. add parentheses to avoid possible vaddr overflow. Fixes: a54eb55045ae ("vfio iommu type1: Add support for mediated devices") Signed-off-by: Yan Zhao Signed-off-by: Alex Williamson Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.14 21/26] scsi: target/iblock: fix WRITE SAME zeroing

2020-05-04 Thread Greg Kroah-Hartman
From: David Disseldorp commit 1d2ff149b263c9325875726a7804a0c75ef7112e upstream. SBC4 specifies that WRITE SAME requests with the UNMAP bit set to zero "shall perform the specified write operation to each LBA specified by the command". Commit 2237498f0b5c ("target/iblock: Convert WRITE_SAME to

[PATCH 4.19 14/37] dm multipath: use updated MPATHF_QUEUE_IO on mapping for bio-based mpath

2020-05-04 Thread Greg Kroah-Hartman
From: Gabriel Krisman Bertazi commit 5686dee34dbfe0238c0274e0454fa0174ac0a57a upstream. When adding devices that don't have a scsi_dh on a BIO based multipath, I was able to consistently hit the warning below and lock-up the system. The problem is that __map_bio reads the flag before it

[PATCH 4.14 07/26] btrfs: fix partial loss of prealloc extent past i_size after fsync

2020-05-04 Thread Greg Kroah-Hartman
From: Filipe Manana commit f135cea30de5f74d5bfb5116682073841fb4af8f upstream. When we have an inode with a prealloc extent that starts at an offset lower than the i_size and there is another prealloc extent that starts at an offset beyond i_size, we can end up losing part of the first prealloc

[PATCH 4.19 13/37] dm writecache: fix data corruption when reloading the target

2020-05-04 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit 31b22120194b5c0d460f59e0c98504de1d3f1f14 upstream. The dm-writecache reads metadata in the target constructor. However, when we reload the target, there could be another active instance running on the same device. This is the sequence of operations when doing a

[PATCH 4.19 06/37] ALSA: hda/realtek - Two front mics on a Lenovo ThinkCenter

2020-05-04 Thread Greg Kroah-Hartman
From: Hui Wang commit ef0b3203c758b6b8abdb5dca651880347eae6b8c upstream. This new Lenovo ThinkCenter has two front mics which can't be handled by PA so far, so apply the fixup ALC283_FIXUP_HEADSET_MIC to change the location for one of the mics. Cc: Signed-off-by: Hui Wang Link:

[PATCH 4.19 10/37] PM: ACPI: Output correct message on target power state

2020-05-04 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit a9b760b0266f563b4784f695bbd0e717610dc10a upstream. Transitioned power state logged at the end of setting ACPI power. However, D3cold won't be in the message because state can only be D3hot at most. Use target_state to corretly report when power state is D3cold. Cc:

[PATCH 4.19 01/37] drm/edid: Fix off-by-one in DispID DTD pixel clock

2020-05-04 Thread Greg Kroah-Hartman
From: Ville Syrjälä commit 6292b8efe32e6be408af364132f09572aed14382 upstream. The DispID DTD pixel clock is documented as: "00 00 00 h → FF FF FF h | Pixel clock ÷ 10,000 0.01 → 167,772.16 Mega Pixels per Sec" Which seems to imply that we to add one to the raw value. Reality seems to agree as

[PATCH 4.14 06/26] btrfs: fix block group leak when removing fails

2020-05-04 Thread Greg Kroah-Hartman
From: Xiyu Yang commit f6033c5e333238f299c3ae03fac8cc1365b23b77 upstream. btrfs_remove_block_group() invokes btrfs_lookup_block_group(), which returns a local reference of the block group that contains the given bytenr to "block_group" with increased refcount. When btrfs_remove_block_group()

[PATCH 4.19 05/37] btrfs: fix block group leak when removing fails

2020-05-04 Thread Greg Kroah-Hartman
From: Xiyu Yang commit f6033c5e333238f299c3ae03fac8cc1365b23b77 upstream. btrfs_remove_block_group() invokes btrfs_lookup_block_group(), which returns a local reference of the block group that contains the given bytenr to "block_group" with increased refcount. When btrfs_remove_block_group()

[PATCH 4.14 24/26] nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl

2020-05-04 Thread Greg Kroah-Hartman
From: Andreas Gruenbacher commit 7648f939cb919b9d15c21fff8cd9eba908d595dc upstream. nfs3_set_acl keeps track of the acl it allocated locally to determine if an acl needs to be released at the end. This results in a memory leak when the function allocates an acl as well as a default acl. Fix

[PATCH 4.19 11/37] PM: hibernate: Freeze kernel threads in software_resume()

2020-05-04 Thread Greg Kroah-Hartman
From: Dexuan Cui commit 2351f8d295ed63393190e39c2f7c1fee1a80578f upstream. Currently the kernel threads are not frozen in software_resume(), so between dpm_suspend_start(PMSG_QUIESCE) and resume_target_kernel(), system_freezable_power_efficient_wq can still try to submit SCSI commands and this

[PATCH net-next v2 1/1] arm64: dts: sdm845: add IPA iommus property

2020-05-04 Thread Alex Elder
Add an "iommus" property to the IPA node in "sdm845.dtsi". It is required because there are two regions of memory the IPA accesses through an SMMU. The next few patches define and map those regions. Signed-off-by: Alex Elder --- NOTE: This was posted in error previously as part of another

[PATCH 4.14 26/26] selinux: properly handle multiple messages in selinux_netlink_send()

2020-05-04 Thread Greg Kroah-Hartman
From: Paul Moore commit fb73974172ffaaf57a7c42f35424d9aece1a5af6 upstream. Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first

[PATCH 4.14 22/26] iommu/amd: Fix legacy interrupt remapping for x2APIC-enabled system

2020-05-04 Thread Greg Kroah-Hartman
From: Suravee Suthikulpanit commit b74aa02d7a30ee5e262072a7d6e8deff10b37924 upstream. Currently, system fails to boot because the legacy interrupt remapping mode does not enable 128-bit IRTE (GA), which is required for x2APIC support. Fix by using AMD_IOMMU_GUEST_IR_LEGACY_GA mode when booting

Re: [PATCH 1/3] leds: add aw2013 driver

2020-05-04 Thread Pavel Machek
Hi! > +#define AW2013_NAME "aw2013" That's not really useful define. Make it NAME? Drop it? > +#define AW2013_TIME_STEP 130 I'd add comment with /* units */. > +#define STATE_OFF 0 > +#define STATE_KEEP 1 > +#define STATE_ON 2 We should add enum into core for this... > +static int

[GIT PULL] tee subsystem fix for v5.8

2020-05-04 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull this small fix for a Smatch warning in tee_shm_alloc(). Thanks, Jens The following changes since commit ae83d0b416db002fe95601e7f97f64b59514d936: Linux 5.7-rc2 (2020-04-19 14:35:30 -0700) are available in the Git repository at:

[PATCH 4.14 09/26] mmc: sdhci-pci: Fix eMMC driver strength for BYT-based controllers

2020-05-04 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 1a8eb6b373c2af6533c13d1ea11f504e5010ed9a upstream. BIOS writers have begun the practice of setting 40 ohm eMMC driver strength even though the eMMC may not support it, on the assumption that the kernel will validate the value against the eMMC (Extended CSD

[PATCH 4.19 07/37] ALSA: usb-audio: Correct a typo of NuPrime DAC-10 USB ID

2020-05-04 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 547d2c9cf4f1f72adfecacbd5b093681fb0e8b3e upstream. The USB vendor ID of NuPrime DAC-10 is not 16b0 but 16d0. Fixes: f656891c6619 ("ALSA: usb-audio: add more quirks for DSD interfaces") Cc: Link: https://lore.kernel.org/r/20200430124755.15940-1-ti...@suse.de

[PATCH 4.19 02/37] drm/qxl: qxl_release leak in qxl_draw_dirty_fb()

2020-05-04 Thread Greg Kroah-Hartman
From: Vasily Averin commit 85e9b88af1e6164f19ec71381efd5e2bcfc17620 upstream. ret should be changed to release allocated struct qxl_release Cc: sta...@vger.kernel.org Fixes: 8002db6336dd ("qxl: convert qxl driver to proper use for reservations") Signed-off-by: Vasily Averin Link:

[PATCH 4.19 27/37] nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl

2020-05-04 Thread Greg Kroah-Hartman
From: Andreas Gruenbacher commit 7648f939cb919b9d15c21fff8cd9eba908d595dc upstream. nfs3_set_acl keeps track of the acl it allocated locally to determine if an acl needs to be released at the end. This results in a memory leak when the function allocates an acl as well as a default acl. Fix

[PATCH 4.19 00/37] 4.19.121-rc1 review

2020-05-04 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.121 release. There are 37 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 Wed, 06 May 2020 16:52:55 +. Anything

[PATCH 5.4 11/57] btrfs: transaction: Avoid deadlock due to bad initialization timing of fs_info::journal_info

2020-05-04 Thread Greg Kroah-Hartman
From: Qu Wenruo commit fcc99734d1d4ced30167eb02e17f656735cb9928 upstream. [BUG] One run of btrfs/063 triggered the following lockdep warning: WARNING: possible recursive locking detected 5.6.0-rc7-custom+ #48 Not tainted

[PATCH 4.19 32/37] mmc: cqhci: Avoid false "cqhci: CQE stuck on" by not open-coding timeout loop

2020-05-04 Thread Greg Kroah-Hartman
From: Douglas Anderson commit b1ac62a7ac386d76968af5f374a4a7a82a35fe31 upstream. Open-coding a timeout loop invariably leads to errors with handling the timeout properly in one corner case or another. In the case of cqhci we might report "CQE stuck on" even if it wasn't stuck on. You'd just

[PATCH 4.19 17/37] RDMA/mlx5: Set GRH fields in query QP on RoCE

2020-05-04 Thread Greg Kroah-Hartman
From: Aharon Landau commit 2d7e3ff7b6f2c614eb21d0dc348957a47eaffb57 upstream. GRH fields such as sgid_index, hop limit, et. are set in the QP context when QP is created/modified. Currently, when query QP is performed, we fill the GRH fields only if the GRH bit is set in the QP context, but

[PATCH 4.19 15/37] scsi: qla2xxx: set UNLOADING before waiting for session deletion

2020-05-04 Thread Greg Kroah-Hartman
From: Martin Wilck commit 856e152a3c08bf7987cbd41900741d83d9cddc8e upstream. The purpose of the UNLOADING flag is to avoid port login procedures to continue when a controller is in the process of shutting down. It makes sense to set this flag before starting session teardown. Furthermore, use

[PATCH 4.19 34/37] mmc: sdhci-pci: Fix eMMC driver strength for BYT-based controllers

2020-05-04 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 1a8eb6b373c2af6533c13d1ea11f504e5010ed9a upstream. BIOS writers have begun the practice of setting 40 ohm eMMC driver strength even though the eMMC may not support it, on the assumption that the kernel will validate the value against the eMMC (Extended CSD

[PATCH 5.4 13/57] mmc: sdhci-xenon: fix annoying 1.8V regulator warning

2020-05-04 Thread Greg Kroah-Hartman
From: Marek Behún commit bb32e1987bc55ce1db400faf47d85891da3c9b9f upstream. For some reason the Host Control2 register of the Xenon SDHCI controller sometimes reports the bit representing 1.8V signaling as 0 when read after it was written as 1. Subsequent read reports 1. This causes the

[PATCH 5.4 12/57] mmc: cqhci: Avoid false "cqhci: CQE stuck on" by not open-coding timeout loop

2020-05-04 Thread Greg Kroah-Hartman
From: Douglas Anderson commit b1ac62a7ac386d76968af5f374a4a7a82a35fe31 upstream. Open-coding a timeout loop invariably leads to errors with handling the timeout properly in one corner case or another. In the case of cqhci we might report "CQE stuck on" even if it wasn't stuck on. You'd just

[PATCH 4.19 16/37] scsi: qla2xxx: check UNLOADING before posting async work

2020-05-04 Thread Greg Kroah-Hartman
From: Martin Wilck commit 5a263892d7d0b4fe351363f8d1a14c6a75955475 upstream. qlt_free_session_done() tries to post async PRLO / LOGO, and waits for the completion of these async commands. If UNLOADING is set, this is doomed to timeout, because the async logout command will never complete. The

[PATCH 4.19 20/37] RDMA/core: Fix race between destroy and release FD object

2020-05-04 Thread Greg Kroah-Hartman
From: Leon Romanovsky commit f0abc761bbb9418876cc4d1ebc473e4ea6352e42 upstream. The call to ->lookup_put() was too early and it caused an unlock of the read/write protection of the uobject after the FD was put. This allows a race: CPU1 CPU2

[PATCH 4.19 21/37] vfio: avoid possible overflow in vfio_iommu_type1_pin_pages

2020-05-04 Thread Greg Kroah-Hartman
From: Yan Zhao commit 0ea971f8dcd6dee78a9a30ea70227cf305f11ff7 upstream. add parentheses to avoid possible vaddr overflow. Fixes: a54eb55045ae ("vfio iommu type1: Add support for mediated devices") Signed-off-by: Yan Zhao Signed-off-by: Alex Williamson Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.19 18/37] RDMA/mlx4: Initialize ib_spec on the stack

2020-05-04 Thread Greg Kroah-Hartman
From: Alaa Hleihel commit c08cfb2d8d78bfe81b37cc6ba84f0875bddd0d5c upstream. Initialize ib_spec on the stack before using it, otherwise we will have garbage values that will break creating default rules with invalid parsing error. Fixes: a37a1a428431 ("IB/mlx4: Add mechanism to support flow

[PATCH 4.19 24/37] scsi: target/iblock: fix WRITE SAME zeroing

2020-05-04 Thread Greg Kroah-Hartman
From: David Disseldorp commit 1d2ff149b263c9325875726a7804a0c75ef7112e upstream. SBC4 specifies that WRITE SAME requests with the UNMAP bit set to zero "shall perform the specified write operation to each LBA specified by the command". Commit 2237498f0b5c ("target/iblock: Convert WRITE_SAME to

Re: [PATCH v1 1/3] printk: honor the max_reason field in kmsg_dumper

2020-05-04 Thread Kees Cook
On Mon, May 04, 2020 at 01:15:00PM -0400, Steven Rostedt wrote: > On Sat, 2 May 2020 10:35:53 -0400 > Pavel Tatashin wrote: > > > kmsg_dump() allows to dump kmesg buffer for various system events: oops, > > panic, reboot, etc. It provides an interface to register a callback call > > for

[PATCH 5.4 20/57] ALSA: usb-audio: Correct a typo of NuPrime DAC-10 USB ID

2020-05-04 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 547d2c9cf4f1f72adfecacbd5b093681fb0e8b3e upstream. The USB vendor ID of NuPrime DAC-10 is not 16b0 but 16d0. Fixes: f656891c6619 ("ALSA: usb-audio: add more quirks for DSD interfaces") Cc: Link: https://lore.kernel.org/r/20200430124755.15940-1-ti...@suse.de

[PATCH 5.4 23/57] ALSA: pcm: oss: Place the plugin buffer overflow checks correctly

2020-05-04 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 4285de0725b1bf73608abbcd35ad7fd3ddc0b61e upstream. The checks of the plugin buffer overflow in the previous fix by commit f2ecf903ef06 ("ALSA: pcm: oss: Avoid plugin buffer overflow") are put in the wrong places mistakenly, which leads to the expected (repeated)

[PATCH 5.4 17/57] mmc: meson-mx-sdio: remove the broken ->card_busy() op

2020-05-04 Thread Greg Kroah-Hartman
From: Martin Blumenstingl commit ddca1092c4324c89cf692b5efe655aa251864b51 upstream. The recent commit 0d84c3e6a5b2 ("mmc: core: Convert to mmc_poll_for_busy() for erase/trim/discard") makes use of the ->card_busy() op for SD cards. This uncovered that the ->card_busy() op in the Meson SDIO

[PATCH 5.4 22/57] ALSA: line6: Fix POD HD500 audio playback

2020-05-04 Thread Greg Kroah-Hartman
From: Vasily Khoruzhick commit cc18b2f4f3f1d7ed3125ac1840794f9feab0325c upstream. Apparently interface 1 is control interface akin to HD500X, setting LINE6_CAP_CONTROL and choosing it as ctrl_if fixes audio playback on POD HD500. Signed-off-by: Vasily Khoruzhick Cc: Link:

[PATCH 5.4 45/57] vfio/type1: Fix VA->PA translation for PFNMAP VMAs in vaddr_get_pfn()

2020-05-04 Thread Greg Kroah-Hartman
From: Sean Christopherson commit 5cbf3264bc715e9eb384e2b68601f8c02bb9a61d upstream. Use follow_pfn() to get the PFN of a PFNMAP VMA instead of assuming that vma->vm_pgoff holds the base PFN of the VMA. This fixes a bug where attempting to do VFIO_IOMMU_MAP_DMA on an arbitrary PFNMAP'd region

[PATCH 5.4 28/57] PM: ACPI: Output correct message on target power state

2020-05-04 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit a9b760b0266f563b4784f695bbd0e717610dc10a upstream. Transitioned power state logged at the end of setting ACPI power. However, D3cold won't be in the message because state can only be D3hot at most. Use target_state to corretly report when power state is D3cold. Cc:

[PATCH 5.4 38/57] RDMA/siw: Fix potential siw_mem refcnt leak in siw_fastreg_mr()

2020-05-04 Thread Greg Kroah-Hartman
From: Jason Gunthorpe commit 6e051971b0e2eeb0ce7ec65d3cc8180450512d36 upstream. siw_fastreg_mr() invokes siw_mem_id2obj(), which returns a local reference of the siw_mem object to "mem" with increased refcnt. When siw_fastreg_mr() returns, "mem" becomes invalid, so the refcount should be

[PATCH 5.4 08/57] btrfs: fix transaction leak in btrfs_recover_relocation

2020-05-04 Thread Greg Kroah-Hartman
From: Xiyu Yang commit 1402d17dfd9657be0da8458b2079d03c2d61c86a upstream. btrfs_recover_relocation() invokes btrfs_join_transaction(), which joins a btrfs_trans_handle object into transactions and returns a reference of it with increased refcount to "trans". When btrfs_recover_relocation()

[PATCH 5.4 09/57] btrfs: fix block group leak when removing fails

2020-05-04 Thread Greg Kroah-Hartman
From: Xiyu Yang commit f6033c5e333238f299c3ae03fac8cc1365b23b77 upstream. btrfs_remove_block_group() invokes btrfs_lookup_block_group(), which returns a local reference of the block group that contains the given bytenr to "block_group" with increased refcount. When btrfs_remove_block_group()

[PATCH 5.4 27/57] IB/rdmavt: Always return ERR_PTR from rvt_create_mmap_info()

2020-05-04 Thread Greg Kroah-Hartman
From: Sudip Mukherjee commit 47c370c1a5eea9b2f6f026d49e060c3748c89667 upstream. The commit below modified rvt_create_mmap_info() to return ERR_PTR's but didn't update the callers to handle them. Modify rvt_create_mmap_info() to only return ERR_PTR and fix all error checking after

[PATCH 5.4 40/57] RDMA/core: Fix race between destroy and release FD object

2020-05-04 Thread Greg Kroah-Hartman
From: Leon Romanovsky commit f0abc761bbb9418876cc4d1ebc473e4ea6352e42 upstream. The call to ->lookup_put() was too early and it caused an unlock of the read/write protection of the uobject after the FD was put. This allows a race: CPU1 CPU2

[PATCH 5.4 05/57] drm/qxl: qxl_release leak in qxl_hw_surface_alloc()

2020-05-04 Thread Greg Kroah-Hartman
From: Vasily Averin commit a65aa9c3676ffccb21361d52fcfedd5b5ff387d7 upstream. Cc: sta...@vger.kernel.org Fixes: 8002db6336dd ("qxl: convert qxl driver to proper use for reservations") Signed-off-by: Vasily Averin Link:

[PATCH 5.4 37/57] RDMA/mlx4: Initialize ib_spec on the stack

2020-05-04 Thread Greg Kroah-Hartman
From: Alaa Hleihel commit c08cfb2d8d78bfe81b37cc6ba84f0875bddd0d5c upstream. Initialize ib_spec on the stack before using it, otherwise we will have garbage values that will break creating default rules with invalid parsing error. Fixes: a37a1a428431 ("IB/mlx4: Add mechanism to support flow

Re: [PATCH v3 1/2] timer: make deferrable cpu unbound timers really not bound to a cpu

2020-05-04 Thread kbuild test robot
Hi Prasad, Thank you for the patch! Yet something to improve: [auto build test ERROR on tip/timers/core] [also build test ERROR on tip/auto-latest tip/timers/nohz v5.7-rc4 next-20200501] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we

[PATCH 5.4 07/57] NFSv4.1: fix handling of backchannel binding in BIND_CONN_TO_SESSION

2020-05-04 Thread Greg Kroah-Hartman
From: Olga Kornievskaia commit dff58530c4ca8ce7ee5a74db431c6e35362cf682 upstream. Currently, if the client sends BIND_CONN_TO_SESSION with NFS4_CDFC4_FORE_OR_BOTH but only gets NFS4_CDFS4_FORE back it ignores that it wasn't able to enable a backchannel. To make sure, the client sends

[PATCH 5.6 20/73] mmc: meson-mx-sdio: Set MMC_CAP_WAIT_WHILE_BUSY

2020-05-04 Thread Greg Kroah-Hartman
From: Martin Blumenstingl commit e53b868b3cf5beeaa2f851ec6740112bf4d6a8cb upstream. The Meson SDIO controller uses the DAT0 lane for hardware busy detection. Set MMC_CAP_WAIT_WHILE_BUSY accordingly. This fixes the following error observed with Linux 5.7 (pre-rc-1): mmc1: Card stuck being

[PATCH v3] iio: bmp280: fix compensation of humidity

2020-05-04 Thread Andreas Klinger
Limit the output of humidity compensation to the range between 0 and 100 percent. Depending on the calibration parameters of the individual sensor it happens, that a humidity above 100 percent or below 0 percent is calculated, which don't make sense in terms of relative humidity. Add a clamp to

[PATCH 5.6 02/73] dma-buf: Fix SET_NAME ioctl uapi

2020-05-04 Thread Greg Kroah-Hartman
From: Daniel Vetter commit a5bff92eaac45bdf6221badf9505c26792fdf99e upstream. The uapi is the same on 32 and 64 bit, but the number isn't. Everyone who botched this please re-read: https://www.kernel.org/doc/html/v5.4-preprc-cpu/ioctl/botching-up-ioctls.html Also, the type argument for the

[PATCH 5.4 53/57] nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl

2020-05-04 Thread Greg Kroah-Hartman
From: Andreas Gruenbacher commit 7648f939cb919b9d15c21fff8cd9eba908d595dc upstream. nfs3_set_acl keeps track of the acl it allocated locally to determine if an acl needs to be released at the end. This results in a memory leak when the function allocates an acl as well as a default acl. Fix

[PATCH 5.6 12/73] btrfs: fix transaction leak in btrfs_recover_relocation

2020-05-04 Thread Greg Kroah-Hartman
From: Xiyu Yang commit 1402d17dfd9657be0da8458b2079d03c2d61c86a upstream. btrfs_recover_relocation() invokes btrfs_join_transaction(), which joins a btrfs_trans_handle object into transactions and returns a reference of it with increased refcount to "trans". When btrfs_recover_relocation()

[PATCH 5.4 56/57] arm64: vdso: Add -fasynchronous-unwind-tables to cflags

2020-05-04 Thread Greg Kroah-Hartman
From: Vincenzo Frascino commit 1578e5d03112e3e9d37e1c4d95b6dfb734c73955 upstream. On arm64 linux gcc uses -fasynchronous-unwind-tables -funwind-tables by default since gcc-8, so now the de facto platform ABI is to allow unwinding from async signal handlers. However on bare metal targets

[PATCH 5.4 51/57] Fix use after free in get_tree_bdev()

2020-05-04 Thread Greg Kroah-Hartman
From: David Howells commit dd7bc8158b413e0b580c491e8bd18cb91057c7c2 upstream. Commit 6fcf0c72e4b9, a fix to get_tree_bdev() put a missing blkdev_put() in the wrong place, before a warnf() that displays the bdev under consideration rather after it. This results in a silent lockup in

[GIT PULL] tee subsystem work for v5.8

2020-05-04 Thread Jens Wiklander
Hello arm-soc maintainers, Please pull these small tee subsystem patches. Thanks, Jens The following changes since commit ae83d0b416db002fe95601e7f97f64b59514d936: Linux 5.7-rc2 (2020-04-19 14:35:30 -0700) are available in the Git repository at:

[PATCH 5.6 14/73] btrfs: fix partial loss of prealloc extent past i_size after fsync

2020-05-04 Thread Greg Kroah-Hartman
From: Filipe Manana commit f135cea30de5f74d5bfb5116682073841fb4af8f upstream. When we have an inode with a prealloc extent that starts at an offset lower than the i_size and there is another prealloc extent that starts at an offset beyond i_size, we can end up losing part of the first prealloc

[PATCH 5.4 33/57] ARM: dts: imx6qdl-sr-som-ti: indicate powering off wifi is safe

2020-05-04 Thread Greg Kroah-Hartman
From: Russell King commit b7dc7205b2ae6b6c9d9cfc3e47d6f08da8647b10 upstream. We need to indicate that powering off the TI WiFi is safe, to avoid: wl18xx_driver wl18xx.2.auto: Unbalanced pm_runtime_enable! wl1271_sdio mmc0:0001:2: wl12xx_sdio_power_on: failed to get_sync(-13) which prevents

[PATCH 5.4 26/57] dlmfs_file_write(): fix the bogosity in handling non-zero *ppos

2020-05-04 Thread Greg Kroah-Hartman
From: Al Viro commit 3815f1be546e752327b5868af103ccdddcc4db77 upstream. 'count' is how much you want written, not the final position. Moreover, it can legitimately be less than the current position... Cc: sta...@vger.kernel.org Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman ---

[PATCH 5.4 34/57] scsi: qla2xxx: set UNLOADING before waiting for session deletion

2020-05-04 Thread Greg Kroah-Hartman
From: Martin Wilck commit 856e152a3c08bf7987cbd41900741d83d9cddc8e upstream. The purpose of the UNLOADING flag is to avoid port login procedures to continue when a controller is in the process of shutting down. It makes sense to set this flag before starting session teardown. Furthermore, use

[PATCH 5.4 29/57] PM: hibernate: Freeze kernel threads in software_resume()

2020-05-04 Thread Greg Kroah-Hartman
From: Dexuan Cui commit 2351f8d295ed63393190e39c2f7c1fee1a80578f upstream. Currently the kernel threads are not frozen in software_resume(), so between dpm_suspend_start(PMSG_QUIESCE) and resume_target_kernel(), system_freezable_power_efficient_wq can still try to submit SCSI commands and this

[PATCH 5.6 21/73] mmc: meson-mx-sdio: remove the broken ->card_busy() op

2020-05-04 Thread Greg Kroah-Hartman
From: Martin Blumenstingl commit ddca1092c4324c89cf692b5efe655aa251864b51 upstream. The recent commit 0d84c3e6a5b2 ("mmc: core: Convert to mmc_poll_for_busy() for erase/trim/discard") makes use of the ->card_busy() op for SD cards. This uncovered that the ->card_busy() op in the Meson SDIO

[PATCH 5.6 27/73] ALSA: pcm: oss: Place the plugin buffer overflow checks correctly

2020-05-04 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 4285de0725b1bf73608abbcd35ad7fd3ddc0b61e upstream. The checks of the plugin buffer overflow in the previous fix by commit f2ecf903ef06 ("ALSA: pcm: oss: Avoid plugin buffer overflow") are put in the wrong places mistakenly, which leads to the expected (repeated)

[PATCH 5.6 24/73] ALSA: usb-audio: Correct a typo of NuPrime DAC-10 USB ID

2020-05-04 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 547d2c9cf4f1f72adfecacbd5b093681fb0e8b3e upstream. The USB vendor ID of NuPrime DAC-10 is not 16b0 but 16d0. Fixes: f656891c6619 ("ALSA: usb-audio: add more quirks for DSD interfaces") Cc: Link: https://lore.kernel.org/r/20200430124755.15940-1-ti...@suse.de

[PATCH 5.6 35/73] PM: hibernate: Freeze kernel threads in software_resume()

2020-05-04 Thread Greg Kroah-Hartman
From: Dexuan Cui commit 2351f8d295ed63393190e39c2f7c1fee1a80578f upstream. Currently the kernel threads are not frozen in software_resume(), so between dpm_suspend_start(PMSG_QUIESCE) and resume_target_kernel(), system_freezable_power_efficient_wq can still try to submit SCSI commands and this

[PATCH 5.6 37/73] dm writecache: fix data corruption when reloading the target

2020-05-04 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit 31b22120194b5c0d460f59e0c98504de1d3f1f14 upstream. The dm-writecache reads metadata in the target constructor. However, when we reload the target, there could be another active instance running on the same device. This is the sequence of operations when doing a

[PATCH 5.6 48/73] RDMA/core: Fix overwriting of uobj in case of error

2020-05-04 Thread Greg Kroah-Hartman
From: Leon Romanovsky commit 83a2670212215a569ed133efc10c92055c96cc8c upstream. In case of failure to get file, the uobj is overwritten and causes to supply bad pointer as an input to uverbs_uobject_put(). BUG: KASAN: null-ptr-deref in atomic_fetch_sub

[PATCH 5.6 33/73] IB/rdmavt: Always return ERR_PTR from rvt_create_mmap_info()

2020-05-04 Thread Greg Kroah-Hartman
From: Sudip Mukherjee commit 47c370c1a5eea9b2f6f026d49e060c3748c89667 upstream. The commit below modified rvt_create_mmap_info() to return ERR_PTR's but didn't update the callers to handle them. Modify rvt_create_mmap_info() to only return ERR_PTR and fix all error checking after

[PATCH 5.6 47/73] RDMA/core: Prevent mixed use of FDs between shared ufiles

2020-05-04 Thread Greg Kroah-Hartman
From: Leon Romanovsky commit 0fb00941dc63990a10951146df216fc7b0e20bc2 upstream. FDs can only be used on the ufile that created them, they cannot be mixed to other ufiles. We are lacking a check to prevent it. BUG: KASAN: null-ptr-deref in atomic64_sub_and_test

Re: [PATCH v3 2/3] net: qrtr: Add MHI transport layer

2020-05-04 Thread David Miller
From: Manivannan Sadhasivam Date: Mon, 4 May 2020 20:19:06 +0530 > Hi Dave, > > On Mon, Apr 27, 2020 at 01:28:28PM +0530, Manivannan Sadhasivam wrote: >> MHI is the transport layer used for communicating to the external modems. >> Hence, this commit adds MHI transport layer support to QRTR for

[PATCH 5.6 00/73] 5.6.11-rc1 review

2020-05-04 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.6.11 release. There are 73 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 Wed, 06 May 2020 16:52:55 +. Anything

[PATCH 5.6 30/73] Drivers: hv: vmbus: Fix Suspend-to-Idle for Generation-2 VM

2020-05-04 Thread Greg Kroah-Hartman
From: Dexuan Cui commit 1a06d017fb3f388734ffbe5dedee6f8c3af5f2db upstream. Before the hibernation patchset (e.g. f53335e3289f), in a Generation-2 Linux VM on Hyper-V, the user can run "echo freeze > /sys/power/state" to freeze the system, i.e. Suspend-to-Idle. The user can press the keyboard or

<    1   2   3   4   5   6   7   8   9   10   >