[PATCH 4.14 76/91] drm/amdgpu: Fix buffer overflow in INFO ioctl

2020-09-01 Thread Greg Kroah-Hartman
From: Alex Deucher commit b5b97cab55eb71daba3283c8b1d2cce456d511a1 upstream. The values for "se_num" and "sh_num" come from the user in the ioctl. They can be in the 0-255 range but if they're more than AMDGPU_GFX_MAX_SE (4) or AMDGPU_GFX_MAX_SH_PER_SE (2) then it results in an out of bounds

Re: [PATCH v2] iio: sx9310: Prefer async probe

2020-09-01 Thread Daniel Campello
On Tue, Sep 1, 2020 at 9:43 AM Stephen Boyd wrote: > > Quoting Douglas Anderson (2020-09-01 08:19:43) > > On one board I found that: > > probe of 5-0028 returned 1 after 259547 usecs > > > > While some of this time is attributable to the pile of i2c transfers > > that we do at probe time, the

[PATCH 4.14 71/91] writeback: Fix sync livelock due to b_dirty_time processing

2020-09-01 Thread Greg Kroah-Hartman
From: Jan Kara commit f9cae926f35e8230330f28c7b743ad088611a8de upstream. When we are processing writeback for sync(2), move_expired_inodes() didn't set any inode expiry value (older_than_this). This can result in writeback never completing if there's steady stream of inodes added to

Re: [PATCH RFC 2/2] target/kvm: Add interfaces needed for log dirty

2020-09-01 Thread Anup Patel
On Mon, Aug 31, 2020 at 8:09 AM Jiangyifei wrote: > > > > -Original Message- > > From: Anup Patel [mailto:a...@brainfault.org] > > Sent: Friday, August 28, 2020 12:54 PM > > To: Jiangyifei > > Cc: Paul Walmsley ; Palmer Dabbelt > > ; Albert Ou ; Anup Patel > > ; Alistair Francis ; Atish

[PATCH 4.14 85/91] USB: gadget: u_f: Unbreak offset calculation in VLAs

2020-09-01 Thread Greg Kroah-Hartman
From: Andy Shevchenko commit bfd08d06d978d0304eb6f7855b548aa2cd1c5486 upstream. Inadvertently the commit b1cd1b65afba ("USB: gadget: u_f: add overflow checks to VLA macros") makes VLA macros to always return 0 due to different scope of two variables of the same name. Obviously we need to have

[PATCH 4.14 63/91] vt_ioctl: change VT_RESIZEX ioctl to check for error return from vc_resize()

2020-09-01 Thread Greg Kroah-Hartman
From: George Kennedy commit bc5269ca765057a1b762e79a1cfd267cd7bf1c46 upstream. vc_resize() can return with an error after failure. Change VT_RESIZEX ioctl to save struct vc_data values that are modified and restore the original values in case of error. Signed-off-by: George Kennedy Cc: stable

[PATCH 4.14 83/91] USB: gadget: u_f: add overflow checks to VLA macros

2020-09-01 Thread Greg Kroah-Hartman
From: Brooke Basile commit b1cd1b65afba95971fa457dfdb2c941c60d38c5b upstream. size can potentially hold an overflowed value if its assigned expression is left unchecked, leading to a smaller than needed allocation when vla_group_size() is used by callers to allocate memory. To fix this, add a

[PATCH 4.14 81/91] usb: host: ohci-exynos: Fix error handling in exynos_ohci_probe()

2020-09-01 Thread Greg Kroah-Hartman
From: Tang Bin commit 1d4169834628d18b2392a2da92b7fbf5e8e2ce89 upstream. If the function platform_get_irq() failed, the negative value returned will not be detected here. So fix error handling in exynos_ohci_probe(). And when get irq failed, the function platform_get_irq() logs an error

[PATCH 4.14 64/91] serial: samsung: Removes the IRQ not found warning

2020-09-01 Thread Greg Kroah-Hartman
From: Tamseel Shams commit 8c6c378b0cbe0c9f1390986b5f8ffb5f6ff7593b upstream. In few older Samsung SoCs like s3c2410, s3c2412 and s3c2440, UART IP is having 2 interrupt lines. However, in other SoCs like s3c6400, s5pv210, exynos5433, and exynos4210 UART is having only 1 interrupt line. Due to

[PATCH 4.14 91/91] ALSA: usb-audio: Update documentation comment for MS2109 quirk

2020-09-01 Thread Greg Kroah-Hartman
From: Hector Martin commit 74a2a7de81a2ef20732ec02087314e92692a7a1b upstream. As the recent fix addressed the channel swap problem more properly, update the comment as well. Fixes: 1b7ecc241a67 ("ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109") Signed-off-by: Hector

[PATCH 4.14 89/91] tpm: Unify the mismatching TPM space buffer sizes

2020-09-01 Thread Greg Kroah-Hartman
From: Jarkko Sakkinen [ Upstream commit 6c4e79d99e6f42b79040f1a33cd4018f5425030b ] The size of the buffers for storing context's and sessions can vary from arch to arch as PAGE_SIZE can be anything between 4 kB and 256 kB (the maximum for PPC64). Define a fixed buffer size set to 16 kB. This

[PATCH 4.14 87/91] usb: storage: Add unusual_uas entry for Sony PSZ drives

2020-09-01 Thread Greg Kroah-Hartman
From: Alan Stern commit 20934c0de13b49a072fb1e0ca79fe0fe0e40eae5 upstream. The PSZ-HA* family of USB disk drives from Sony can't handle the REPORT OPCODES command when using the UAS protocol. This patch adds an appropriate quirks entry. Reported-and-tested-by: Till Dörges Signed-off-by: Alan

[PATCH 4.14 88/91] btrfs: check the right error variable in btrfs_del_dir_entries_in_log

2020-09-01 Thread Greg Kroah-Hartman
From: Josef Bacik [ Upstream commit fb2fecbad50964b9f27a3b182e74e437b40753ef ] With my new locking code dbench is so much faster that I tripped over a transaction abort from ENOSPC. This turned out to be because btrfs_del_dir_entries_in_log was checking for ret == -ENOSPC, but this function

Re: [PATCH v2 1/4] ARM: exynos: clear L310_AUX_CTRL_NS_LOCKDOWN in default l2c_aux_val

2020-09-01 Thread Guillaume Tucker
On 01/09/2020 16:25, Krzysztof Kozlowski wrote: > On Tue, 1 Sep 2020 at 16:42, Guillaume Tucker > wrote: >> >> On 01/09/2020 14:51, Krzysztof Kozlowski wrote: >>> On Tue, 1 Sep 2020 at 15:45, Krzysztof Kozlowski wrote: On Tue, 1 Sep 2020 at 15:34, Guillaume Tucker wrote: >

Re: [RFC RESEND PATCH 0/1] USB EHCI: repeated resets on full and low speed devices

2020-09-01 Thread Khalid Aziz
On 9/1/20 10:36 AM, Alan Stern wrote: > On Tue, Sep 01, 2020 at 09:15:46AM -0700, Khalid Aziz wrote: >> On 8/31/20 8:31 PM, Alan Stern wrote: >>> Can you collect a usbmon trace showing an example of this problem? >>> >> >> I have attached usbmon traces for when USB hub with keyboards and mouse >>

[PATCH 4.14 68/91] serial: 8250: change lock order in serial8250_do_startup()

2020-09-01 Thread Greg Kroah-Hartman
From: Sergey Senozhatsky commit 205d300aea75623e1ae4aa43e0d265ab9cf195fd upstream. We have a number of "uart.port->desc.lock vs desc.lock->uart.port" lockdep reports coming from 8250 driver; this causes a bit of trouble to people, so let's fix it. The problem is reverse lock order in two

[PATCH 4.19 012/125] ASoC: tegra: Fix reference count leaks.

2020-09-01 Thread Greg Kroah-Hartman
From: Qiushi Wu [ Upstream commit deca195383a6085be62cb453079e03e04d618d6e ] Calling pm_runtime_get_sync increments the counter even in case of failure, causing incorrect ref count if pm_runtime_put is not called in error handling paths. Call pm_runtime_put if pm_runtime_get_sync fails.

[PATCH 4.14 61/91] USB: lvtest: return proper error code in probe

2020-09-01 Thread Greg Kroah-Hartman
From: Evgeny Novikov commit 531412492ce93ea29b9ca3b4eb5e3ed771f851dd upstream. lvs_rh_probe() can return some nonnegative value from usb_control_msg() when it is less than "USB_DT_HUB_NONVAR_SIZE + 2" that is considered as a failure. Make lvs_rh_probe() return -EINVAL in this case. Found by

[PATCH 4.14 65/91] serial: pl011: Fix oops on -EPROBE_DEFER

2020-09-01 Thread Greg Kroah-Hartman
From: Lukas Wunner commit 27afac93e3bd7fa89749cf11da5d86ac9cde4dba upstream. If probing of a pl011 gets deferred until after free_initmem(), an oops ensues because pl011_console_match() is called which has been freed. Fix by removing the __init attribute from the function and those it calls.

[PATCH 4.19 001/125] powerpc/64s: Dont init FSCR_DSCR in __init_FSCR()

2020-09-01 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 0828137e8f16721842468e33df0460044a0c588b upstream. __init_FSCR() was added originally in commit 2468dcf641e4 ("powerpc: Add support for context switching the TAR register") (Feb 2013), and only set FSCR_TAR. At that point FSCR (Facility Status and Control

Re: [PATCH v2 6/9] spi: spi-s3c64xx: Check return values

2020-09-01 Thread Lukasz Stelmach
It was <2020-08-25 wto 21:06>, when Sylwester Nawrocki wrote: > On 8/21/20 18:13, Łukasz Stelmach wrote: >> Check return values in prepare_dma() and s3c64xx_spi_config() and >> propagate errors upwards. >> >> Signed-off-by: Łukasz Stelmach >> --- >> drivers/spi/spi-s3c64xx.c | 47

[PATCH 4.14 66/91] serial: pl011: Dont leak amba_ports entry on driver register error

2020-09-01 Thread Greg Kroah-Hartman
From: Lukas Wunner commit 89efbe70b27dd325d8a8c177743a26b885f7faec upstream. pl011_probe() calls pl011_setup_port() to reserve an amba_ports[] entry, then calls pl011_register_port() to register the uart driver with the tty layer. If registration of the uart driver fails, the amba_ports[]

[PATCH 4.14 67/91] serial: 8250_exar: Fix number of ports for Commtech PCIe cards

2020-09-01 Thread Greg Kroah-Hartman
From: Valmer Huhn commit c6b9e95dde7b54e6a53c47241201ab5a4035c320 upstream. The following in 8250_exar.c line 589 is used to determine the number of ports for each Exar board: nr_ports = board->num_ports ? board->num_ports : pcidev->device & 0x0f; If the number of ports a card has is not

[PATCH 4.19 040/125] drm/nouveau: Fix reference count leak in nouveau_connector_detect

2020-09-01 Thread Greg Kroah-Hartman
From: Aditya Pakki [ Upstream commit 990a1162986e8eff7ca18cc5a0e03b4304392ae2 ] nouveau_connector_detect() calls pm_runtime_get_sync and in turn increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki Signed-off-by:

[PATCH 4.19 016/125] media: pci: ttpci: av7110: fix possible buffer overflow caused by bad DMA value in debiirq()

2020-09-01 Thread Greg Kroah-Hartman
From: Jia-Ju Bai [ Upstream commit 6499a0db9b0f1e903d52f8244eacc1d4be00eea2 ] The value av7110->debi_virt is stored in DMA memory, and it is assigned to data, and thus data[0] can be modified at any time by malicious hardware. In this case, "if (data[0] < 2)" can be passed, but then data[0] can

[PATCH 4.19 007/125] net: ena: Make missed_tx stat incremental

2020-09-01 Thread Greg Kroah-Hartman
From: Shay Agroskin [ Upstream commit ccd143e5150f24b9ba15145c7221b61dd9e41021 ] Most statistics in ena driver are incremented, meaning that a stat's value is a sum of all increases done to it since driver/queue initialization. This patch makes all statistics this way, effectively making

[PATCH 4.19 020/125] drm/amdkfd: Fix reference count leaks.

2020-09-01 Thread Greg Kroah-Hartman
From: Qiushi Wu [ Upstream commit 20eca0123a35305e38b344d571cf32768854168c ] kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Signed-off-by: Qiushi Wu

[PATCH 4.19 045/125] scsi: fcoe: Memory leak fix in fcoe_sysfs_fcf_del()

2020-09-01 Thread Greg Kroah-Hartman
From: Javed Hasan [ Upstream commit e95b4789ff4380733006836d28e554dc296b2298 ] In fcoe_sysfs_fcf_del(), we first deleted the fcf from the list and then freed it if ctlr_dev was not NULL. This was causing a memory leak. Free the fcf even if ctlr_dev is NULL. Link:

[PATCH 4.19 039/125] drm/nouveau: fix reference count leak in nv50_disp_atomic_commit

2020-09-01 Thread Greg Kroah-Hartman
From: Aditya Pakki [ Upstream commit a2cdf39536b0d21fb06113f5e16692513d7bcb9c ] nv50_disp_atomic_commit() calls calls pm_runtime_get_sync and in turn increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki

[PATCH 4.19 025/125] drm/amdgpu/display: fix ref count leak when pm_runtime_get_sync fails

2020-09-01 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit f79f94765f8c39db0b7dec1d335ab046aac03f20 ] The call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost

[PATCH 4.19 024/125] drm/amdgpu: fix ref count leak in amdgpu_display_crtc_set_config

2020-09-01 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit e008fa6fb41544b63973a529b704ef342f47cc65 ] in amdgpu_display_crtc_set_config, the call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning.

Re: [PATCH 4/5] media: uvcvideo: Protect uvc queue file operations against disconnect

2020-09-01 Thread Guenter Roeck
uxtv.org/media_tree.git master > config: x86_64-randconfig-s031-20200901 (attached as .config) > compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 > reproduce: > # apt-get install sparse > # sparse version: v0.6.2-191-g10164920-dirty > # save the attached .config to linux

Re: [PATCH] memory: tegra: Remove GPU from DRM IOMMU group

2020-09-01 Thread Dmitry Osipenko
01.09.2020 18:32, Thierry Reding пишет: > From: Thierry Reding > > Commit 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU > group") added the GPU to the DRM IOMMU group, which doesn't make any > sense. This causes problems when Nouveau tries to attach to the SMMU > and causes it to

[PATCH 4.19 038/125] drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open

2020-09-01 Thread Greg Kroah-Hartman
From: Aditya Pakki [ Upstream commit bfad51c7633325b5d4b32444efe04329d53297b2 ] nouveau_fbcon_open() calls calls pm_runtime_get_sync() that increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki Signed-off-by: Ben

[PATCH 4.19 000/125] 4.19.143-rc1 review

2020-09-01 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.143 release. There are 125 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, 03 Sep 2020 15:09:01 +. Anything

[PATCH 4.14 42/91] media: gpio-ir-tx: improve precision of transmitted signal due to scheduling

2020-09-01 Thread Greg Kroah-Hartman
From: Sean Young [ Upstream commit ea8912b788f8144e7d32ee61e5ccba45424bef83 ] usleep_range() may take longer than the max argument due to scheduling, especially under load. This is causing random errors in the transmitted IR. Remove the usleep_range() in favour of busy-looping with udelay().

[PATCH 4.19 029/125] f2fs: fix error path in do_recover_data()

2020-09-01 Thread Greg Kroah-Hartman
From: Chao Yu [ Upstream commit 9627a7b31f3c4ff8bc8f3be3683983ffe6eaebe6 ] - don't panic kernel if f2fs_get_node_page() fails in f2fs_recover_inline_data() or f2fs_recover_inline_xattr(); - return error number of f2fs_truncate_blocks() to f2fs_recover_inline_data()'s caller; Signed-off-by:

[PATCH 4.14 58/91] HID: i2c-hid: Always sleep 60ms after I2C_HID_PWR_ON commands

2020-09-01 Thread Greg Kroah-Hartman
From: Hans de Goede commit eef4016243e94c438f177ca8226876eb873b9c75 upstream. Before this commit i2c_hid_parse() consists of the following steps: 1. Send power on cmd 2. usleep_range(1000, 5000) 3. Send reset cmd 4. Wait for reset to complete (device interrupt, or msleep(100)) 5. Send power on

[PATCH 4.14 82/91] overflow.h: Add allocation size calculation helpers

2020-09-01 Thread Greg Kroah-Hartman
From: Kees Cook commit 610b15c50e86eb1e4b77274fabcaea29ac72d6a8 upstream. In preparation for replacing unchecked overflows for memory allocations, this creates helpers for the 3 most common calculations: array_size(a, b): 2-dimensional array array3_size(a, b, c): 3-dimensional array

[PATCH 4.19 050/125] USB: sisusbvga: Fix a potential UB casued by left shifting a negative value

2020-09-01 Thread Greg Kroah-Hartman
From: Changming Liu [ Upstream commit 2b53a19284f537168fb506f2f40d7fda40a01162 ] The char buffer buf, receives data directly from user space, so its content might be negative and its elements are left shifted to form an unsigned integer. Since left shifting a negative value is undefined

[PATCH 4.19 046/125] EDAC/ie31200: Fallback if host bridge device is already initialized

2020-09-01 Thread Greg Kroah-Hartman
From: Jason Baron [ Upstream commit 709ed1bcef12398ac1a35c149f3e582db04456c2 ] The Intel uncore driver may claim some of the pci ids from ie31200 which means that the ie31200 edac driver will not initialize them as part of pci_register_driver(). Let's add a fallback for this case to

[PATCH 4.14 62/91] vt: defer kfree() of vc_screenbuf in vc_do_resize()

2020-09-01 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit f8d1653daec02315e06d30246cff4af72e76e54e upstream. syzbot is reporting UAF bug in set_origin() from vc_do_resize() [1], for vc_do_resize() calls kfree(vc->vc_screenbuf) before calling set_origin(). Unfortunately, in set_origin(), vc->vc_sw->con_set_origin() might

[PATCH 4.19 055/125] nvme-fc: Fix wrong return value in __nvme_fc_init_request()

2020-09-01 Thread Greg Kroah-Hartman
From: Tianjia Zhang [ Upstream commit f34448cd0dc697723fb5f4118f8431d9233b370d ] On an error exit path, a negative error code should be returned instead of a positive return value. Fixes: e399441de9115 ("nvme-fabrics: Add host support for FC transport") Cc: James Smart Signed-off-by: Tianjia

[PATCH 4.14 84/91] USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb()

2020-09-01 Thread Greg Kroah-Hartman
From: Brooke Basile commit 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52 upstream. Some values extracted by ncm_unwrap_ntb() could possibly lead to several different out of bounds reads of memory. Specifically the values passed to netdev_alloc_skb_ip_align() need to be checked so that memory is not

[PATCH 4.14 80/91] USB: Ignore UAS for JMicron JMS567 ATA/ATAPI Bridge

2020-09-01 Thread Greg Kroah-Hartman
From: Cyril Roelandt commit 9aa37788e7ebb3f489fb4b71ce07adadd444264a upstream. This device does not support UAS properly and a similar entry already exists in drivers/usb/storage/unusual_uas.h. Without this patch, storage_probe() defers the handling of this device to UAS, which cannot handle it

[PATCH 4.19 056/125] null_blk: fix passing of REQ_FUA flag in null_handle_rq

2020-09-01 Thread Greg Kroah-Hartman
From: Hou Pu [ Upstream commit 2d62e6b038e729c3e4bfbfcfbd44800ef0883680 ] REQ_FUA should be checked using rq->cmd_flags instead of req_op(). Fixes: deb78b419dfda ("nullb: emulate cache") Signed-off-by: Hou Pu Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin ---

[PATCH 4.19 053/125] media: gpio-ir-tx: improve precision of transmitted signal due to scheduling

2020-09-01 Thread Greg Kroah-Hartman
From: Sean Young [ Upstream commit ea8912b788f8144e7d32ee61e5ccba45424bef83 ] usleep_range() may take longer than the max argument due to scheduling, especially under load. This is causing random errors in the transmitted IR. Remove the usleep_range() in favour of busy-looping with udelay().

[PATCH 4.19 059/125] jbd2: make sure jh have b_transaction set in refile/unfile_buffer

2020-09-01 Thread Greg Kroah-Hartman
From: Lukas Czerner [ Upstream commit 24dc9864914eb5813173cfa53313fcd02e4aea7d ] Callers of __jbd2_journal_unfile_buffer() and __jbd2_journal_refile_buffer() assume that the b_transaction is set. In fact if it's not, we can end up with journal_head refcounting errors leading to crash much later

Re: [PATCH] PCI: qcom: Make sure PCIe is reset before init for rev 2.1.0

2020-09-01 Thread Bjorn Andersson
On Tue 01 Sep 07:49 CDT 2020, Ansuel Smith wrote: > Qsdk U-Boot can incorrectly leave the PCIe interface in an undefined > state if bootm command is used instead of bootipq. This is caused by the > not deinit of PCIe when bootm is called. Reset the PCIe before init > anyway to fix this U-Boot

[PATCH 4.19 033/125] rtlwifi: rtl8192cu: Prevent leaking urb

2020-09-01 Thread Greg Kroah-Hartman
From: Reto Schneider [ Upstream commit 03128643eb5453a798db5770952c73dc64fcaf00 ] If usb_submit_urb fails the allocated urb should be unanchored and released. Signed-off-by: Reto Schneider Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200622132113.14508-3-c...@reto-schneider.ch

[PATCH 4.19 034/125] mips/vdso: Fix resource leaks in genvdso.c

2020-09-01 Thread Greg Kroah-Hartman
From: Peng Fan [ Upstream commit a859647b4e6bfeb192284d27d24b6a0c914cae1d ] Close "fd" before the return of map_vdso() and close "out_file" in main(). Signed-off-by: Peng Fan Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/vdso/genvdso.c | 10 ++ 1 file

[PATCH 4.19 010/125] ASoC: img: Fix a reference count leak in img_i2s_in_set_fmt

2020-09-01 Thread Greg Kroah-Hartman
From: Qiushi Wu [ Upstream commit c4c59b95b7f7d4cef5071b151be2dadb33f3287b ] pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if pm_runtime_put_noidle() is not called in error handling paths. Thus call

[PATCH 4.14 69/91] writeback: Protect inode->i_io_list with inode->i_lock

2020-09-01 Thread Greg Kroah-Hartman
From: Jan Kara commit b35250c0816c7cf7d0a8de92f5fafb6a7508a708 upstream. Currently, operations on inode->i_io_list are protected by wb->list_lock. In the following patches we'll need to maintain consistency between inode->i_state and inode->i_io_list so change the code so that inode->i_lock

Re: [PATCH v2 2/7] Revert "kbuild: disable clang's default use of -fmerge-all-constants"

2020-09-01 Thread Fangrui Song
On 2020-08-31, Nathan Chancellor wrote: On Mon, Aug 31, 2020 at 05:23:21PM -0700, Nick Desaulniers wrote: This reverts commit 87e0d4f0f37fb0c8c4aeeac46fff5e957738df79. This was fixed in clang-6; the minimum supported version of clang in the kernel is clang-10 (10.0.1). Link:

[PATCH 4.19 014/125] arm64: dts: qcom: msm8916: Pull down PDM GPIOs during sleep

2020-09-01 Thread Greg Kroah-Hartman
From: Stephan Gerhold [ Upstream commit e2ee9edc282961783d519c760bbaa20fed4dec38 ] The original qcom kernel changed the PDM GPIOs to be pull-down during sleep at some point. Reportedly this was done because there was some "leakage at PDM outputs during sleep":

[PATCH 4.19 074/125] scsi: qla2xxx: Check if FW supports MQ before enabling

2020-09-01 Thread Greg Kroah-Hartman
From: Saurav Kashyap [ Upstream commit dffa11453313a115157b19021cc2e27ea98e624c ] OS boot during Boot from SAN was stuck at dracut emergency shell after enabling NVMe driver parameter. For non-MQ support the driver was enabling MQ. Add a check to confirm if FW supports MQ. Link:

Re: [PATCH] x86/uaccess: Use pointer masking to limit uaccess speculation

2020-09-01 Thread Josh Poimboeuf
On Tue, Sep 01, 2020 at 03:00:44PM +, David Laight wrote: > e user-space accesses. > > > > Well, yes, but that's a much bigger job which can be done later. > > Isn't this all rather difficult to exploit though? > (Unlike the original Spectre which trivially let kernel > memory be read.) >

[PATCH 4.19 076/125] Revert "scsi: qla2xxx: Fix crash on qla2x00_mailbox_command"

2020-09-01 Thread Greg Kroah-Hartman
From: Saurav Kashyap [ Upstream commit de7e6194301ad31c4ce95395eb678e51a1b907e5 ] FCoE adapter initialization failed for ISP8021 with the following patch applied. In addition, reproduction of the issue the patch originally tried to address has been unsuccessful. This reverts commit

[PATCH 4.19 077/125] macvlan: validate setting of multiple remote source MAC addresses

2020-09-01 Thread Greg Kroah-Hartman
From: Alvin Šipraga [ Upstream commit 8b61fba503904acae24aeb2bd5569b4d6544d48f ] Remote source MAC addresses can be set on a 'source mode' macvlan interface via the IFLA_MACVLAN_MACADDR_DATA attribute. This commit tightens the validation of these MAC addresses to match the validation already

Re: [PATCH 00/13] remoteproc: Add support for detaching from rproc

2020-09-01 Thread Arnaud POULIQUEN
Hi Mathieu, On 8/26/20 6:45 PM, Mathieu Poirier wrote: > Following the work done here [1] this set provides support for the > remoteproc core to release resources associated with a remote processor > without having to switch it off. That way a platform driver can be removed > or the applcation

[PATCH 4.19 035/125] cec-api: prevent leaking memory through hole in structure

2020-09-01 Thread Greg Kroah-Hartman
From: Hans Verkuil [ Upstream commit 6c42227c3467549ddc65efe99c869021d2f4a570 ] Fix this smatch warning: drivers/media/cec/core/cec-api.c:156 cec_adap_g_log_addrs() warn: check that 'log_addrs' doesn't leak information (struct has a hole after 'features') Signed-off-by: Hans Verkuil

[PATCH 4.19 079/125] powerpc/perf: Fix soft lockups due to missed interrupt accounting

2020-09-01 Thread Greg Kroah-Hartman
From: Athira Rajeev [ Upstream commit 17899eaf88d689529b866371344c8f269ba79b5f ] Performance monitor interrupt handler checks if any counter has overflown and calls record_and_restart() in core-book3s which invokes perf_event_overflow() to record the sample information. Apart from creating

[PATCH 4.19 083/125] btrfs: reset compression level for lzo on remount

2020-09-01 Thread Greg Kroah-Hartman
From: Marcos Paulo de Souza commit 282dd7d7718444679b046b769d872b188818ca35 upstream. Currently a user can set mount "-o compress" which will set the compression algorithm to zlib, and use the default compress level for zlib (3): relatime,compress=zlib:3,space_cache If the user remounts the

[PATCH 4.19 003/125] net: Fix potential wrong skb->protocol in skb_vlan_untag()

2020-09-01 Thread Greg Kroah-Hartman
From: Miaohe Lin [ Upstream commit 55eff0eb7460c3d50716ed9eccf22257b046ca92 ] We may access the two bytes after vlan_hdr in vlan_set_encap_proto(). So we should pull VLAN_HLEN + sizeof(unsigned short) in skb_vlan_untag() or we may access the wrong data. Fixes: 0d5501c1c828 ("net: Always untag

[PATCH 4.19 078/125] net: gianfar: Add of_node_put() before goto statement

2020-09-01 Thread Greg Kroah-Hartman
From: Sumera Priyadarsini [ Upstream commit 989e4da042ca4a56bbaca9223d1a93639ad11e17 ] Every iteration of for_each_available_child_of_node() decrements reference count of the previous node, however when control is transferred from the middle of the loop, as in the case of a return or break or

[PATCH 4.19 084/125] btrfs: fix space cache memory leak after transaction abort

2020-09-01 Thread Greg Kroah-Hartman
From: Filipe Manana commit bbc37d6e475eee8ffa2156ec813efc6bbb43c06d upstream. If a transaction aborts it can cause a memory leak of the pages array of a block group's io_ctl structure. The following steps explain how that can happen: 1) Transaction N is committing, currently in state

[PATCH 4.19 089/125] serial: samsung: Removes the IRQ not found warning

2020-09-01 Thread Greg Kroah-Hartman
From: Tamseel Shams commit 8c6c378b0cbe0c9f1390986b5f8ffb5f6ff7593b upstream. In few older Samsung SoCs like s3c2410, s3c2412 and s3c2440, UART IP is having 2 interrupt lines. However, in other SoCs like s3c6400, s5pv210, exynos5433, and exynos4210 UART is having only 1 interrupt line. Due to

Re: [PATCH 1/4] pidfd: support PIDFD_NONBLOCK in pidfd_open()

2020-09-01 Thread Oleg Nesterov
On 09/01, Christian Brauner wrote: > > On Tue, Sep 01, 2020 at 06:23:10PM +0200, Oleg Nesterov wrote: > > On 08/31, Christian Brauner wrote: > > > > > > --- /dev/null > > > +++ b/include/uapi/linux/pidfd.h > > > @@ -0,0 +1,12 @@ > > > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */

[PATCH 4.19 063/125] ext4: handle option set by mount flags correctly

2020-09-01 Thread Greg Kroah-Hartman
From: Lukas Czerner [ Upstream commit f25391ebb475d3ffb3aa61bb90e3594c841749ef ] Currently there is a problem with mount options that can be both set by vfs using mount flags or by a string parsing in ext4. i_version/iversion options gets lost after remount, for example $ mount -o i_version

[PATCH 4.19 022/125] drm/amdgpu: fix ref count leak in amdgpu_driver_open_kms

2020-09-01 Thread Greg Kroah-Hartman
From: Navid Emamdoost [ Upstream commit 9ba8923cbbe11564dd1bf9f3602add9a9cfbb5c6 ] in amdgpu_driver_open_kms the call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning.

[PATCH 4.19 065/125] ext4: correctly restore system zone info when remount fails

2020-09-01 Thread Greg Kroah-Hartman
From: Jan Kara [ Upstream commit 0f5bde1db174f6c471f0bd27198575719dabe3e5 ] When remounting filesystem fails late during remount handling and block_validity mount option is also changed during the remount, we fail to restore system zone information to a state matching the mount option. This is

[PATCH 4.19 021/125] drm/radeon: fix multiple reference count leak

2020-09-01 Thread Greg Kroah-Hartman
From: Aditya Pakki [ Upstream commit 6f2e8acdb48ed166b65d47837c31b177460491ec ] On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Signed-off-by: Aditya Pakki Signed-off-by: Alex

Re: [PATCH 07/28] 53c700: improve non-coherent DMA handling

2020-09-01 Thread Matthew Wilcox
On Tue, Sep 01, 2020 at 06:41:12PM +0200, Helge Deller wrote: > > I still have a zoo of machines running for such testing, including a > > 715/64 and two 730. > > I'm going to test this git tree on the 715/64: The 715/64 is a 7100LC machine though. I think you need to boot on the 730 to test the

[PATCH 4.19 086/125] USB: lvtest: return proper error code in probe

2020-09-01 Thread Greg Kroah-Hartman
From: Evgeny Novikov commit 531412492ce93ea29b9ca3b4eb5e3ed771f851dd upstream. lvs_rh_probe() can return some nonnegative value from usb_control_msg() when it is less than "USB_DT_HUB_NONVAR_SIZE + 2" that is considered as a failure. Make lvs_rh_probe() return -EINVAL in this case. Found by

[PATCH 4.19 087/125] vt: defer kfree() of vc_screenbuf in vc_do_resize()

2020-09-01 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit f8d1653daec02315e06d30246cff4af72e76e54e upstream. syzbot is reporting UAF bug in set_origin() from vc_do_resize() [1], for vc_do_resize() calls kfree(vc->vc_screenbuf) before calling set_origin(). Unfortunately, in set_origin(), vc->vc_sw->con_set_origin() might

[PATCH 4.19 104/125] irqchip/stm32-exti: Avoid losing interrupts due to clearing pending bits by mistake

2020-09-01 Thread Greg Kroah-Hartman
From: qiuguorui1 commit e579076ac0a3bebb440fab101aef3c42c9f4c709 upstream. In the current code, when the eoi callback of the exti clears the pending bit of the current interrupt, it will first read the values of fpr and rpr, then logically OR the corresponding bit of the interrupt number, and

[PATCH 4.19 106/125] drm/amd/pm: correct Vega10 swctf limit setting

2020-09-01 Thread Greg Kroah-Hartman
From: Evan Quan commit b05d71b51078fc428c6b72582126d9d75d3c1f4c upstream. Correct the Vega10 thermal swctf limit. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1267 Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org

[RFC PATCH] certs: Add EFI_CERT_X509_GUID support for dbx entries

2020-09-01 Thread Eric Snowberg
The Secure Boot Forbidden Signature Database, dbx, contains a list of now revoked signatures and keys previously approved to boot with UEFI Secure Boot enabled. The dbx is capable of containing any number of EFI_CERT_X509_SHA256_GUID, EFI_CERT_SHA256_GUID, and EFI_CERT_X509_GUID entries.

[PATCH 4.19 105/125] drm/amdgpu: Fix buffer overflow in INFO ioctl

2020-09-01 Thread Greg Kroah-Hartman
From: Alex Deucher commit b5b97cab55eb71daba3283c8b1d2cce456d511a1 upstream. The values for "se_num" and "sh_num" come from the user in the ioctl. They can be in the 0-255 range but if they're more than AMDGPU_GFX_MAX_SE (4) or AMDGPU_GFX_MAX_SH_PER_SE (2) then it results in an out of bounds

[PATCH 4.19 107/125] drm/amd/pm: correct Vega12 swctf limit setting

2020-09-01 Thread Greg Kroah-Hartman
From: Evan Quan commit e0ffd340249699ad27a6c91abdfa3e89f7823941 upstream. Correct the Vega12 thermal swctf limit. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.19 108/125] USB: yurex: Fix bad gfp argument

2020-09-01 Thread Greg Kroah-Hartman
From: Alan Stern commit f176ede3a3bde5b398a6777a7f9ff091baa2d3ff upstream. The syzbot fuzzer identified a bug in the yurex driver: It passes GFP_KERNEL as a memory-allocation flag to usb_submit_urb() at a time when its state is TASK_INTERRUPTIBLE, not TASK_RUNNING: do not call blocking ops

[PATCH 4.19 113/125] usb: host: ohci-exynos: Fix error handling in exynos_ohci_probe()

2020-09-01 Thread Greg Kroah-Hartman
From: Tang Bin commit 1d4169834628d18b2392a2da92b7fbf5e8e2ce89 upstream. If the function platform_get_irq() failed, the negative value returned will not be detected here. So fix error handling in exynos_ohci_probe(). And when get irq failed, the function platform_get_irq() logs an error

[PATCH 4.19 114/125] USB: gadget: u_f: add overflow checks to VLA macros

2020-09-01 Thread Greg Kroah-Hartman
From: Brooke Basile commit b1cd1b65afba95971fa457dfdb2c941c60d38c5b upstream. size can potentially hold an overflowed value if its assigned expression is left unchecked, leading to a smaller than needed allocation when vla_group_size() is used by callers to allocate memory. To fix this, add a

[PATCH 4.19 111/125] USB: quirks: Ignore duplicate endpoint on Sound Devices MixPre-D

2020-09-01 Thread Greg Kroah-Hartman
From: Alan Stern commit 068834a2773b6a12805105cfadbb3d4229fc6e0a upstream. The Sound Devices MixPre-D audio card suffers from the same defect as the Sound Devices USBPre2: an endpoint shared between a normal audio interface and a vendor-specific interface, in violation of the USB spec. Since

[PATCH 4.19 118/125] usb: storage: Add unusual_uas entry for Sony PSZ drives

2020-09-01 Thread Greg Kroah-Hartman
From: Alan Stern commit 20934c0de13b49a072fb1e0ca79fe0fe0e40eae5 upstream. The PSZ-HA* family of USB disk drives from Sony can't handle the REPORT OPCODES command when using the UAS protocol. This patch adds an appropriate quirks entry. Reported-and-tested-by: Till Dörges Signed-off-by: Alan

[PATCH 4.19 116/125] USB: gadget: u_f: Unbreak offset calculation in VLAs

2020-09-01 Thread Greg Kroah-Hartman
From: Andy Shevchenko commit bfd08d06d978d0304eb6f7855b548aa2cd1c5486 upstream. Inadvertently the commit b1cd1b65afba ("USB: gadget: u_f: add overflow checks to VLA macros") makes VLA macros to always return 0 due to different scope of two variables of the same name. Obviously we need to have

Re: [RFC PATCH v7 17/23] kernel/entry: Add support for core-wide protection of kernel-mode

2020-09-01 Thread Joel Fernandes
On Tue, Sep 01, 2020 at 05:54:53PM +0200, Thomas Gleixner wrote: > On Fri, Aug 28 2020 at 15:51, Julien Desfossez wrote: > > @@ -112,59 +113,84 @@ static __always_inline void exit_to_user_mode(void) > > /* Workaround to allow gradual conversion of architecture code */ > > void __weak

[PATCH 3/6] mtd: rawnand: gpmi: Simplify with dev_err_probe()

2020-09-01 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH 4.19 110/125] USB: quirks: Add no-lpm quirk for another Raydium touchscreen

2020-09-01 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit 5967116e8358899ebaa22702d09b0af57fef23e1 upstream. There's another Raydium touchscreen needs the no-lpm quirk: [1.339149] usb 1-9: New USB device found, idVendor=2386, idProduct=350e, bcdDevice= 0.00 [1.339150] usb 1-9: New USB device strings: Mfr=1,

[PATCH 1/6] mtd: onenand: Simplify with dev_err_probe()

2020-09-01 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/mtd/nand/onenand/onenand_omap2.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH 4.19 109/125] usb: uas: Add quirk for PNY Pro Elite

2020-09-01 Thread Greg Kroah-Hartman
From: Thinh Nguyen commit 9a469bc9f32dd33c7aac5744669d21a023a719cd upstream. PNY Pro Elite USB 3.1 Gen 2 device (SSD) doesn't respond to ATA_12 pass-through command (i.e. it just hangs). If it doesn't support this command, it should respond properly to the host. Let's just add a quirk to be

[PATCH 4.19 121/125] usb: dwc3: gadget: Fix handling ZLP

2020-09-01 Thread Greg Kroah-Hartman
From: Thinh Nguyen [ Upstream commit d2ee3ff79e6a3d4105e684021017d100524dc560 ] The usb_request->zero doesn't apply for isoc. Also, if we prepare a 0-length (ZLP) TRB for the OUT direction, we need to prepare an extra TRB to pad up to the MPS alignment. Use the same bounce buffer for the ZLP

Re: [PATCH v3 02/23] alpha: use asm-generic/mmu_context.h for no-op implementations

2020-09-01 Thread Matt Turner
On Tue, Sep 1, 2020 at 7:15 AM Nicholas Piggin wrote: > > Cc: Richard Henderson > Cc: Ivan Kokshaysky > Cc: Matt Turner > Cc: linux-al...@vger.kernel.org > Signed-off-by: Nicholas Piggin > --- > > Please ack or nack if you object to this being mered via > Arnd's tree. That would be great.

[PATCH 4.19 115/125] USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb()

2020-09-01 Thread Greg Kroah-Hartman
From: Brooke Basile commit 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52 upstream. Some values extracted by ncm_unwrap_ntb() could possibly lead to several different out of bounds reads of memory. Specifically the values passed to netdev_alloc_skb_ip_align() need to be checked so that memory is not

[PATCH 6/6] mtd: rawnand: qcom: Simplify with dev_err_probe()

2020-09-01 Thread Krzysztof Kozlowski
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski --- drivers/mtd/nand/raw/qcom_nandc.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git

[PATCH v16 16/20] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU

2020-09-01 Thread Rob Clark
From: Jordan Crouse Add a special implementation for the SMMU attached to most Adreno GPU target triggered from the qcom,adreno-smmu compatible string. The new Adreno SMMU implementation will enable split pagetables (TTBR1) for the domain attached to the GPU device (SID 0) and hard code it

[PATCH 4.19 125/125] ALSA: usb-audio: Update documentation comment for MS2109 quirk

2020-09-01 Thread Greg Kroah-Hartman
From: Hector Martin commit 74a2a7de81a2ef20732ec02087314e92692a7a1b upstream. As the recent fix addressed the channel swap problem more properly, update the comment as well. Fixes: 1b7ecc241a67 ("ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109") Signed-off-by: Hector

[PATCH v16 14/20] iommu/arm-smmu: Prepare for the adreno-smmu implementation

2020-09-01 Thread Rob Clark
From: Jordan Crouse Do a bit of prep work to add the upcoming adreno-smmu implementation. Add an hook to allow the implementation to choose which context banks to allocate. Move some of the common structs to arm-smmu.h in anticipation of them being used by the implementations and update some

Re: [PATCH v2 1/9] docs: Document IO Address Space ID (IOASID) APIs

2020-09-01 Thread Jacob Pan
Hi Eric, On Thu, 27 Aug 2020 18:21:07 +0200 Auger Eric wrote: > Hi Jacob, > On 8/24/20 12:32 PM, Jean-Philippe Brucker wrote: > > On Fri, Aug 21, 2020 at 09:35:10PM -0700, Jacob Pan wrote: > >> IOASID is used to identify address spaces that can be targeted by > >> device DMA. It is a

[PATCH v16 06/20] drm/msm: Drop context arg to gpu->submit()

2020-09-01 Thread Rob Clark
From: Jordan Crouse Now that we can get the ctx from the submitqueue, the extra arg is redundant. Signed-off-by: Jordan Crouse [split out of previous patch to reduce churny noise] Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson --- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 12

<    3   4   5   6   7   8   9   10   11   12   >