[PATCH AUTOSEL 4.9 02/50] ath9k: Fix use-after-free Write in ath9k_htc_rx_msg

2020-06-08 Thread Sasha Levin
From: Qiujun Huang [ Upstream commit e4ff08a4d727146bb6717a39a8d399d834654345 ] Write out of slab bounds. We should check epid. The case reported by syzbot: https://lore.kernel.org/linux-usb/6ac55b05a1c05...@google.com BUG: KASAN: use-after-free in htc_process_conn_rsp drivers/net/w

[PATCH AUTOSEL 4.9 24/50] lib/mpi: Fix 64-bit MIPS build with Clang

2020-06-08 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 18f1ca46858eac22437819937ae44aa9a8f9f2fa ] When building 64r6_defconfig with CONFIG_MIPS32_O32 disabled and CONFIG_CRYPTO_RSA enabled: lib/mpi/generic_mpih-mul1.c:37:24: error: invalid use of a cast in a inline asm context requiring an l-value: remove t

[PATCH AUTOSEL 4.9 21/50] media: platform: fcp: Set appropriate DMA parameters

2020-06-08 Thread Sasha Levin
From: Kieran Bingham [ Upstream commit dd844fb8e50b12e65bbdc5746c9876c6735500df ] Enabling CONFIG_DMA_API_DEBUG=y and CONFIG_DMA_API_DEBUG_SG=y will enable extra validation on DMA operations ensuring that the size restraints are met. When using the FCP in conjunction with the VSP1/DU, and displ

[PATCH AUTOSEL 4.9 04/50] objtool: Ignore empty alternatives

2020-06-08 Thread Sasha Levin
From: Julien Thierry [ Upstream commit 7170cf47d16f1ba29eca07fd818870b7af0a93a5 ] The .alternatives section can contain entries with no original instructions. Objtool will currently crash when handling such an entry. Just skip that entry, but still give a warning to discourage useless entries.

[PATCH AUTOSEL 4.9 26/50] exit: Move preemption fixup up, move blocking operations down

2020-06-08 Thread Sasha Levin
From: Jann Horn [ Upstream commit 586b58cac8b4683eb58a1446fbc399de18974e40 ] With CONFIG_DEBUG_ATOMIC_SLEEP=y and CONFIG_CGROUPS=y, kernel oopses in non-preemptible context look untidy; after the main oops, the kernel prints a "sleeping function called from invalid context" report because exit_s

[PATCH AUTOSEL 4.9 05/50] net: ena: fix error returning in ena_com_get_hash_function()

2020-06-08 Thread Sasha Levin
From: Arthur Kiyanovski [ Upstream commit e9a1de378dd46375f9abfd8de1e6f59ee114a793 ] In case the "func" parameter is NULL we now return "-EINVAL". This shouldn't happen in general, but when it does happen, this is the proper way to handle it. We also check func for NULL in the beginning of the

[PATCH AUTOSEL 4.9 03/50] media: si2157: Better check for running tuner in init

2020-06-08 Thread Sasha Levin
From: Brad Love [ Upstream commit e955f959ac52e145f27ff2be9078b646d0352af0 ] Getting the Xtal trim property to check if running is less error prone. Reset if_frequency if state is unknown. Replaces the previous "garbage check". Signed-off-by: Brad Love Signed-off-by: Sean Young Signed-off-by

[PATCH AUTOSEL 4.14 67/72] mmc: sdhci-esdhc-imx: fix the mask for tuning start point

2020-06-08 Thread Sasha Levin
From: Haibo Chen [ Upstream commit 1194be8c949b8190b2882ad8335a5d98aa50c735 ] According the RM, the bit[6~0] of register ESDHC_TUNING_CTRL is TUNING_START_TAP, bit[7] of this register is to disable the command CRC check for standard tuning. So fix it here. Fixes: d87fc9663688 ("mmc: sdhci-esdhc

[PATCH AUTOSEL 4.14 42/72] powerpc/spufs: fix copy_to_user while atomic

2020-06-08 Thread Sasha Levin
From: Jeremy Kerr [ Upstream commit 88413a6bfbbe2f648df399b62f85c934460b7a4d ] Currently, we may perform a copy_to_user (through simple_read_from_buffer()) while holding a context's register_lock, while accessing the context save area. This change uses a temporary buffer for the context save ar

[PATCH AUTOSEL 4.14 57/72] x86/mm: Stop printing BRK addresses

2020-06-08 Thread Sasha Levin
From: Arvind Sankar [ Upstream commit 67d631b7c05eff955ccff4139327f0f92a5117e5 ] This currently leaks kernel physical addresses into userspace. Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Acked-by: Kees Cook Acked-by: Dave Hansen Link: https://lkml.kernel.org/r/2020022923112

[PATCH AUTOSEL 4.14 46/72] mips: cm: Fix an invalid error code of INTVN_*_ERR

2020-06-08 Thread Sasha Levin
From: Serge Semin [ Upstream commit 8a0efb8b101665a843205eab3d67ab09cb2d9a8d ] Commit 3885c2b463f6 ("MIPS: CM: Add support for reporting CM cache errors") adds cm2_causes[] array with map of error type ID and pointers to the short description string. There is a mistake in the table, since accord

[PATCH AUTOSEL 4.14 40/72] media: cec: silence shift wrapping warning in __cec_s_log_addrs()

2020-06-08 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 3b5af3171e2d5a73ae6f04965ed653d039904eb6 ] The log_addrs->log_addr_type[i] value is a u8 which is controlled by the user and comes from the ioctl. If it's over 31 then that results in undefined behavior (shift wrapping) and that leads to a Smatch static che

[PATCH AUTOSEL 4.14 48/72] nvme: refine the Qemu Identify CNS quirk

2020-06-08 Thread Sasha Levin
From: Christoph Hellwig [ Upstream commit b9a5c3d4c34d8bd9fd75f7f28d18a57cb68da237 ] Add a helper to check if we can use Identify CNS values > 1, and refine the Qemu quirk to not apply to reported versions larger than 1.1, as the Qemu implementation had been fixed by then. Signed-off-by: Christ

[PATCH AUTOSEL 4.14 36/72] lib/mpi: Fix 64-bit MIPS build with Clang

2020-06-08 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit 18f1ca46858eac22437819937ae44aa9a8f9f2fa ] When building 64r6_defconfig with CONFIG_MIPS32_O32 disabled and CONFIG_CRYPTO_RSA enabled: lib/mpi/generic_mpih-mul1.c:37:24: error: invalid use of a cast in a inline asm context requiring an l-value: remove t

[PATCH AUTOSEL 4.14 54/72] x86/boot: Correct relocation destination on old linkers

2020-06-08 Thread Sasha Levin
From: Arvind Sankar [ Upstream commit 5214028dd89e49ba27007c3ee475279e584261f0 ] For the 32-bit kernel, as described in 6d92bc9d483a ("x86/build: Build compressed x86 kernels as PIE"), pre-2.26 binutils generates R_386_32 relocations in PIE mode. Since the startup code does not perform reloc

[PATCH AUTOSEL 4.14 53/72] mwifiex: Fix memory corruption in dump_station

2020-06-08 Thread Sasha Levin
From: Pali Rohár [ Upstream commit 3aa42bae9c4d1641aeb36f1a8585cd1d506cf471 ] The mwifiex_cfg80211_dump_station() uses static variable for iterating over a linked list of all associated stations (when the driver is in UAP role). This has a race condition if .dump_station is called in parallel fo

[PATCH AUTOSEL 4.14 30/72] media: dvb: return -EREMOTEIO on i2c transfer failure.

2020-06-08 Thread Sasha Levin
From: Colin Ian King [ Upstream commit 96f3a9392799dd0f6472648a7366622ffd0989f3 ] Currently when i2c transfers fail the error return -EREMOTEIO is assigned to err but then later overwritten when the tuner attach call is made. Fix this by returning early with the error return code -EREMOTEIO on

[PATCH AUTOSEL 4.14 51/72] md: don't flush workqueue unconditionally in md_open

2020-06-08 Thread Sasha Levin
From: Guoqing Jiang [ Upstream commit f6766ff6afff70e2aaf39e1511e16d471de7c3ae ] We need to check mddev->del_work before flush workqueu since the purpose of flush is to ensure the previous md is disappeared. Otherwise the similar deadlock appeared if LOCKDEP is enabled, it is due to md_open hold

[PATCH AUTOSEL 4.14 33/72] audit: fix a net reference leak in audit_list_rules_send()

2020-06-08 Thread Sasha Levin
From: Paul Moore [ Upstream commit 3054d06719079388a543de6adb812638675ad8f5 ] If audit_list_rules_send() fails when trying to create a new thread to send the rules it also fails to cleanup properly, leaking a reference to a net structure. This patch fixes the error patch and renames audit_send_

[PATCH AUTOSEL 4.14 23/72] ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx

2020-06-08 Thread Sasha Levin
From: Qiujun Huang [ Upstream commit abeaa85054ff8cfe8b99aafc5c70ea067e5d0908 ] Free wmi later after cmd urb has been killed, as urb cb will access wmi. the case reported by syzbot: https://lore.kernel.org/linux-usb/0002fc05a1d61...@google.com BUG: KASAN: use-after-free in ath9k_wmi

[PATCH AUTOSEL 4.14 16/72] clocksource: dw_apb_timer_of: Fix missing clockevent timers

2020-06-08 Thread Sasha Levin
From: Serge Semin [ Upstream commit 6d2e16a3181bafb77b535095c39ad1c8b9558c8c ] Commit 100214889973 ("clocksource: dw_apb_timer_of: use clocksource_of_init") replaced a publicly available driver initialization method with one called by the timer_probe() method available after CLKSRC_OF. In curren

[PATCH AUTOSEL 4.19 096/106] mmc: via-sdmmc: Respect the cmd->busy_timeout from the mmc core

2020-06-08 Thread Sasha Levin
From: Ulf Hansson [ Upstream commit 966244ccd2919e28f2a77f204cd1c109cad8 ] Using a fixed 1s timeout for all commands (and data transfers) is a bit problematic. For some commands it means waiting longer than needed for the timer to expire, which may not a big issue, but still. For other comm

[PATCH AUTOSEL 4.14 09/72] spi: dw: Zero DMA Tx and Rx configurations on stack

2020-06-08 Thread Sasha Levin
From: Andy Shevchenko [ Upstream commit 3cb97e223d277f84171cc4ccecab31e08b2ee7b5 ] Some DMA controller drivers do not tolerate non-zero values in the DMA configuration structures. Zero them to avoid issues with such DMA controller drivers. Even despite above this is a good practice per se. Fixe

[PATCH AUTOSEL 4.19 095/106] staging: greybus: sdio: Respect the cmd->busy_timeout from the mmc core

2020-06-08 Thread Sasha Levin
From: Ulf Hansson [ Upstream commit a389087ee9f195fcf2f31cd771e9ec5f02c16650 ] Using a fixed 1s timeout for all commands is a bit problematic. For some commands it means waiting longer than needed for the timeout to expire, which may not a big issue, but still. For other commands, like for an e

Re: [PATCH v2 1/3] platform/x86: dell-wmi: add new backlight events

2020-06-08 Thread Pali Rohár
On Monday 08 June 2020 19:05:28 Y Paritcher wrote: > Add events with a type of 0x0010 and a code of 0x57 / 0x58, > this silences the following messages being logged on a > Dell Inspiron 5593: > > dell_wmi: Unknown key with type 0x0010 and code 0x0057 pressed > dell_wmi: Unknown key with type 0x001

[PATCH AUTOSEL 4.14 17/72] btrfs: do not ignore error from btrfs_next_leaf() when inserting checksums

2020-06-08 Thread Sasha Levin
From: Filipe Manana [ Upstream commit 7e4a3f7ed5d54926ec671bbb13e171cfe179cc50 ] We are currently treating any non-zero return value from btrfs_next_leaf() the same way, by going to the code that inserts a new checksum item in the tree. However if btrfs_next_leaf() returns an error (a value < 0)

[PATCH AUTOSEL 4.19 097/106] ixgbe: fix signed-integer-overflow warning

2020-06-08 Thread Sasha Levin
From: Xie XiuQi [ Upstream commit 3b70683fc4d68f5d915d9dc7e5ba72c732c7315c ] ubsan report this warning, fix it by adding a unsigned suffix. UBSAN: signed-integer-overflow in drivers/net/ethernet/intel/ixgbe/ixgbe_common.c:2246:26 65535 * 65537 cannot be represented in type 'int' CPU: 21 PID: 7

[PATCH AUTOSEL 4.14 18/72] ARM: 8978/1: mm: make act_mm() respect THREAD_SIZE

2020-06-08 Thread Sasha Levin
From: Linus Walleij [ Upstream commit e1de94380af588bdf6ad6f0cc1f75004c35bc096 ] Recent work with KASan exposed the folling hard-coded bitmask in arch/arm/mm/proc-macros.S: bic rd, sp, #8128 bic rd, rd, #63 This forms the bitmask 0x1FFF that is coinciding with (PAGE_SIZE << THREAD_

[PATCH AUTOSEL 4.14 08/72] net: ena: fix error returning in ena_com_get_hash_function()

2020-06-08 Thread Sasha Levin
From: Arthur Kiyanovski [ Upstream commit e9a1de378dd46375f9abfd8de1e6f59ee114a793 ] In case the "func" parameter is NULL we now return "-EINVAL". This shouldn't happen in general, but when it does happen, this is the proper way to handle it. We also check func for NULL in the beginning of the

[PATCH AUTOSEL 4.14 02/72] ath9k: Fix use-after-free Write in ath9k_htc_rx_msg

2020-06-08 Thread Sasha Levin
From: Qiujun Huang [ Upstream commit e4ff08a4d727146bb6717a39a8d399d834654345 ] Write out of slab bounds. We should check epid. The case reported by syzbot: https://lore.kernel.org/linux-usb/6ac55b05a1c05...@google.com BUG: KASAN: use-after-free in htc_process_conn_rsp drivers/net/w

[PATCH AUTOSEL 4.19 105/106] net_failover: fixed rollback in net_failover_open()

2020-06-08 Thread Sasha Levin
From: Vasily Averin [ Upstream commit e8224bfe77293494626f6eec1884fee7b87d0ced ] found by smatch: drivers/net/net_failover.c:65 net_failover_open() error: we previously assumed 'primary_dev' could be null (see line 43) Fixes: cfc80d9a1163 ("net: Introduce net_failover driver") Signed-off-by: V

[PATCH AUTOSEL 4.19 100/106] cpuidle: Fix three reference count leaks

2020-06-08 Thread Sasha Levin
From: Qiushi Wu [ Upstream commit c343bf1ba5efcbf2266a1fe3baefec9cc82f867f ] 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. Previous commit "b8eb718348b8" fixe

[PATCH AUTOSEL 4.19 106/106] string.h: fix incompatibility between FORTIFY_SOURCE and KASAN

2020-06-08 Thread Sasha Levin
From: Daniel Axtens [ Upstream commit 47227d27e2fcb01a9e8f5958d8997cf47a820afc ] The memcmp KASAN self-test fails on a kernel with both KASAN and FORTIFY_SOURCE. When FORTIFY_SOURCE is on, a number of functions are replaced with fortified versions, which attempt to check the sizes of the operan

[PATCH AUTOSEL 4.19 099/106] spi: dw: Return any value retrieved from the dma_transfer callback

2020-06-08 Thread Sasha Levin
From: Serge Semin [ Upstream commit f0410bbf7d0fb80149e3b17d11d31f5b5197873e ] DW APB SSI DMA-part of the driver may need to perform the requested SPI-transfer synchronously. In that case the dma_transfer() callback will return 0 as a marker of the SPI transfer being finished so the SPI core doe

[PATCH AUTOSEL 4.19 087/106] net: ethernet: fec: move GPR register offset and bit into DT

2020-06-08 Thread Sasha Levin
From: Fugang Duan [ Upstream commit 8a448bf832af537d26aa557d183a16943dce4510 ] The commit da722186f654 (net: fec: set GPR bit on suspend by DT configuration) set the GPR reigster offset and bit in driver for wake on lan feature. But it introduces two issues here: - one SOC has two instances, th

[PATCH AUTOSEL 4.19 085/106] m68k: mac: Don't call via_flush_cache() on Mac IIfx

2020-06-08 Thread Sasha Levin
From: Finn Thain [ Upstream commit bcc44f6b74106b31f0b0408b70305a40360d63b7 ] There is no VIA2 chip on the Mac IIfx, so don't call via_flush_cache(). This avoids a boot crash which appeared in v5.4. printk: console [ttyS0] enabled printk: bootconsole [debug0] disabled printk: bootconsole [debug

[PATCH AUTOSEL 4.19 090/106] MIPS: Fix IRQ tracing when call handle_fpe() and handle_msa_fpe()

2020-06-08 Thread Sasha Levin
From: YuanJunQing [ Upstream commit 31e1b3efa802f97a17628dde280006c4cee4ce5e ] Register "a1" is unsaved in this function, when CONFIG_TRACE_IRQFLAGS is enabled, the TRACE_IRQS_OFF macro will call trace_hardirqs_off(), and this may change register "a1". The changed register "a1" as argument w

[PATCH AUTOSEL 4.19 068/106] ath10k: Remove msdu from idr when management pkt send fails

2020-06-08 Thread Sasha Levin
From: Rakesh Pillai [ Upstream commit c730c477176ad4af86d9aae4d360a7ad840b073a ] Currently when the sending of any management pkt via wmi command fails, the packet is being unmapped freed in the error handling. But the idr entry added, which is used to track these packet is not getting removed.

[PATCH AUTOSEL 4.19 082/106] crypto: stm32/crc32 - fix run-time self test issue.

2020-06-08 Thread Sasha Levin
From: Nicolas Toromanoff [ Upstream commit a8cc3128bf2c01c4d448fe17149e87132113b445 ] Fix wrong crc32 initialisation value: "alg: shash: stm32_crc32 test failed (wrong result) on test vector 0, cfg="init+update+final aligned buffer" cra_name="crc32c" expects an init value of 0X, cra_name

[PATCH AUTOSEL 4.19 071/106] mt76: avoid rx reorder buffer overflow

2020-06-08 Thread Sasha Levin
From: Ryder Lee [ Upstream commit 7c4f744d6703757be959f521a7a441bf34745d99 ] Enlarge slot to support 11ax 256 BA (256 MPDUs in an AMPDU) Signed-off-by: Chih-Min Chen Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/agg-

[PATCH AUTOSEL 4.19 076/106] rtlwifi: Fix a double free in _rtl_usb_tx_urb_setup()

2020-06-08 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit beb12813bc75d4a23de43b85ad1c7cb28d27631e ] Seven years ago we tried to fix a leak but actually introduced a double free instead. It was an understandable mistake because the code was a bit confusing and the free was done in the wrong place. The "skb" point

[PATCH AUTOSEL 4.19 043/106] netfilter: nft_nat: return EOPNOTSUPP if type or flags are not supported

2020-06-08 Thread Sasha Levin
From: Pablo Neira Ayuso [ Upstream commit 0d7c83463fdf7841350f37960a7abadd3e650b41 ] Instead of EINVAL which should be used for malformed netlink messages. Fixes: eb31628e37a0 ("netfilter: nf_tables: Add support for IPv6 NAT") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- n

[PATCH AUTOSEL 4.19 058/106] MIPS: Truncate link address into 32bit for 32bit kernel

2020-06-08 Thread Sasha Levin
From: Jiaxun Yang [ Upstream commit ff487d41036035376e47972c7c522490b839ab37 ] LLD failed to link vmlinux with 64bit load address for 32bit ELF while bfd will strip 64bit address into 32bit silently. To fix LLD build, we should truncate load address provided by platform into 32bit for 32bit kern

[PATCH AUTOSEL 4.19 056/106] xfs: clean up the error handling in xfs_swap_extents

2020-06-08 Thread Sasha Levin
From: "Darrick J. Wong" [ Upstream commit 8bc3b5e4b70d28f8edcafc3c9e4de515998eea9e ] Make sure we release resources properly if we cannot clean out the COW extents in preparation for an extent swap. Fixes: 96987eea537d6c ("xfs: cancel COW blocks before swapext") Signed-off-by: Darrick J. Wong

[PATCH AUTOSEL 4.19 006/106] objtool: Ignore empty alternatives

2020-06-08 Thread Sasha Levin
From: Julien Thierry [ Upstream commit 7170cf47d16f1ba29eca07fd818870b7af0a93a5 ] The .alternatives section can contain entries with no original instructions. Objtool will currently crash when handling such an entry. Just skip that entry, but still give a warning to discourage useless entries.

[PATCH AUTOSEL 4.19 023/106] btrfs: do not ignore error from btrfs_next_leaf() when inserting checksums

2020-06-08 Thread Sasha Levin
From: Filipe Manana [ Upstream commit 7e4a3f7ed5d54926ec671bbb13e171cfe179cc50 ] We are currently treating any non-zero return value from btrfs_next_leaf() the same way, by going to the code that inserts a new checksum item in the tree. However if btrfs_next_leaf() returns an error (a value < 0)

[PATCH AUTOSEL 4.19 008/106] net: atlantic: make hw_get_regs optional

2020-06-08 Thread Sasha Levin
From: Mark Starovoytov [ Upstream commit d0f23741c202c685447050713907f3be39a985ee ] This patch fixes potential crash in case if hw_get_regs is NULL. Signed-off-by: Mark Starovoytov Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c

[PATCH AUTOSEL 4.19 038/106] media: dvb: return -EREMOTEIO on i2c transfer failure.

2020-06-08 Thread Sasha Levin
From: Colin Ian King [ Upstream commit 96f3a9392799dd0f6472648a7366622ffd0989f3 ] Currently when i2c transfers fail the error return -EREMOTEIO is assigned to err but then later overwritten when the tuner attach call is made. Fix this by returning early with the error return code -EREMOTEIO on

[PATCH AUTOSEL 4.19 027/106] spi: dw: Fix Rx-only DMA transfers

2020-06-08 Thread Sasha Levin
From: Serge Semin [ Upstream commit 46164fde6b7890e7a3982d54549947c8394c0192 ] Tx-only DMA transfers are working perfectly fine since in this case the code just ignores the Rx FIFO overflow interrupts. But it turns out the SPI Rx-only transfers are broken since nothing pushing any data to the sh

[PATCH AUTOSEL 4.19 009/106] net: ena: fix error returning in ena_com_get_hash_function()

2020-06-08 Thread Sasha Levin
From: Arthur Kiyanovski [ Upstream commit e9a1de378dd46375f9abfd8de1e6f59ee114a793 ] In case the "func" parameter is NULL we now return "-EINVAL". This shouldn't happen in general, but when it does happen, this is the proper way to handle it. We also check func for NULL in the beginning of the

[PATCH AUTOSEL 4.19 014/106] arm64: insn: Fix two bugs in encoding 32-bit logical immediates

2020-06-08 Thread Sasha Levin
From: Luke Nelson [ Upstream commit 579d1b3faa3735e781ff74aac0afd598515dbc63 ] This patch fixes two issues present in the current function for encoding arm64 logical immediates when using the 32-bit variants of instructions. First, the code does not correctly reject an all-ones 32-bit immediate

[PATCH AUTOSEL 4.19 012/106] spi: dw: Zero DMA Tx and Rx configurations on stack

2020-06-08 Thread Sasha Levin
From: Andy Shevchenko [ Upstream commit 3cb97e223d277f84171cc4ccecab31e08b2ee7b5 ] Some DMA controller drivers do not tolerate non-zero values in the DMA configuration structures. Zero them to avoid issues with such DMA controller drivers. Even despite above this is a good practice per se. Fixe

[PATCH AUTOSEL 4.19 035/106] e1000: Distribute switch variables for initialization

2020-06-08 Thread Sasha Levin
From: Kees Cook [ Upstream commit a34c7f5156654ebaf7eaace102938be7ff7036cb ] Variables declared in a switch statement before any case statements cannot be automatically initialized with compiler instrumentation (as they are not part of any execution flow). With GCC's proposed automatic stack var

[PATCH AUTOSEL 4.19 021/106] clocksource: dw_apb_timer: Make CPU-affiliation being optional

2020-06-08 Thread Sasha Levin
From: Serge Semin [ Upstream commit cee43dbf2ee3f430434e2b66994eff8a1aeda889 ] Currently the DW APB Timer driver binds each clockevent timers to a particular CPU. This isn't good for multiple reasons. First of all seeing the device is placed on APB bus (which makes it accessible from any CPU cor

[PATCH AUTOSEL 4.19 037/106] audit: fix a net reference leak in audit_send_reply()

2020-06-08 Thread Sasha Levin
From: Paul Moore [ Upstream commit a48b284b403a4a073d8beb72d2bb33e54df67fb6 ] If audit_send_reply() fails when trying to create a new thread to send the reply it also fails to cleanup properly, leaking a reference to a net structure. This patch fixes the error path and makes a handful of other

[PATCH AUTOSEL 4.19 013/106] x86/cpu/amd: Make erratum #1054 a legacy erratum

2020-06-08 Thread Sasha Levin
From: Kim Phillips [ Upstream commit e2abfc0448a46d8a137505aa180caf14070ec535 ] Commit 21b5ee59ef18 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF") mistakenly added erratum #1054 as an OS Visible Workaround (OSVW) ID 0. Erratum #1054 is not OSVW ID 0 [1

[PATCH AUTOSEL 4.19 031/106] ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx

2020-06-08 Thread Sasha Levin
From: Qiujun Huang [ Upstream commit abeaa85054ff8cfe8b99aafc5c70ea067e5d0908 ] Free wmi later after cmd urb has been killed, as urb cb will access wmi. the case reported by syzbot: https://lore.kernel.org/linux-usb/0002fc05a1d61...@google.com BUG: KASAN: use-after-free in ath9k_wmi

[PATCH AUTOSEL 4.19 017/106] Bluetooth: Add SCO fallback for invalid LMP parameters error

2020-06-08 Thread Sasha Levin
From: Hsin-Yu Chao [ Upstream commit 56b5453a86203a44726f523b4133c1feca49ce7c ] Bluetooth PTS test case HFP/AG/ACC/BI-12-I accepts SCO connection with invalid parameter at the first SCO request expecting AG to attempt another SCO request with the use of "safe settings" for given codec, base on s

[PATCH AUTOSEL 4.19 010/106] efi/libstub/x86: Work around LLVM ELF quirk build regression

2020-06-08 Thread Sasha Levin
From: Ard Biesheuvel [ Upstream commit f77767ed5f4d398b29119563155e4ece2dfeee13 ] When building the x86 EFI stub with Clang, the libstub Makefile rules that manipulate the ELF object files may throw an error like: STUBCPY drivers/firmware/efi/libstub/efi-stub-helper.stub.o strip: drivers/

[PATCH AUTOSEL 4.19 024/106] ARM: 8978/1: mm: make act_mm() respect THREAD_SIZE

2020-06-08 Thread Sasha Levin
From: Linus Walleij [ Upstream commit e1de94380af588bdf6ad6f0cc1f75004c35bc096 ] Recent work with KASan exposed the folling hard-coded bitmask in arch/arm/mm/proc-macros.S: bic rd, sp, #8128 bic rd, rd, #63 This forms the bitmask 0x1FFF that is coinciding with (PAGE_SIZE << THREAD_

[PATCH AUTOSEL 5.4 170/175] bpf: Refactor sockmap redirect code so its easy to reuse

2020-06-08 Thread Sasha Levin
From: John Fastabend [ Upstream commit ca2f5f21dbbd5e3a00cd3e97f728aa2ca0b2e011 ] We will need this block of code called from tls context shortly lets refactor the redirect logic so its easy to use. This also cleans up the switch stmt so we have fewer fallthrough cases. No logic changes are int

[PATCH AUTOSEL 5.4 167/175] vxlan: Avoid infinite loop when suppressing NS messages with invalid options

2020-06-08 Thread Sasha Levin
From: Ido Schimmel [ Upstream commit 8066e6b449e050675df48e7c4b16c29f00507ff0 ] When proxy mode is enabled the vxlan device might reply to Neighbor Solicitation (NS) messages on behalf of remote hosts. In case the NS message includes the "Source link-layer address" option [1], the vxlan device

[PATCH AUTOSEL 5.4 166/175] platform/x86: asus_wmi: Reserve more space for struct bias_args

2020-06-08 Thread Sasha Levin
From: Chris Chiu [ Upstream commit 7b91f1565fbfbe5a162d91f8a1f6c5580c2fc1d0 ] On the ASUS laptop UX325JA/UX425JA, most of the media keys are not working due to the ASUS WMI driver fails to be loaded. The ACPI error as follows leads to the failure of asus_wmi_evaluate_method. ACPI BIOS Error (b

[PATCH AUTOSEL 5.4 163/175] platform/x86: hp-wmi: Convert simple_strtoul() to kstrtou32()

2020-06-08 Thread Sasha Levin
From: Andy Shevchenko [ Upstream commit 5cdc45ed3948042f0d73c6fec5ee9b59e637d0d2 ] First of all, unsigned long can overflow u32 value on 64-bit machine. Second, simple_strtoul() doesn't check for overflow in the input. Convert simple_strtoul() to kstrtou32() to eliminate above issues. Signed-o

[PATCH AUTOSEL 5.4 164/175] platform/x86: intel-hid: Add a quirk to support HP Spectre X2 (2015)

2020-06-08 Thread Sasha Levin
From: Nickolai Kozachenko [ Upstream commit 8fe63eb757ac6e661a384cc760792080bdc738dc ] HEBC method reports capabilities of 5 button array but HP Spectre X2 (2015) does not have this control method (the same was for Wacom MobileStudio Pro). Expand previous DMI quirk by Alex Hung to also enable 5

[PATCH AUTOSEL 5.4 133/175] mips: MAAR: Use more precise address mask

2020-06-08 Thread Sasha Levin
From: Serge Semin [ Upstream commit bbb5946eb545fab8ad8f46bce8a803e1c0c39d47 ] Indeed according to the MIPS32 Privileged Resource Architecgture the MAAR pair register address field either takes [12:31] bits for non-XPA systems and [12:55] otherwise. In any case the current address mask is just w

[PATCH AUTOSEL 5.4 161/175] spi: dw: Return any value retrieved from the dma_transfer callback

2020-06-08 Thread Sasha Levin
From: Serge Semin [ Upstream commit f0410bbf7d0fb80149e3b17d11d31f5b5197873e ] DW APB SSI DMA-part of the driver may need to perform the requested SPI-transfer synchronously. In that case the dma_transfer() callback will return 0 as a marker of the SPI transfer being finished so the SPI core doe

[PATCH AUTOSEL 5.4 150/175] bcache: fix refcount underflow in bcache_device_free()

2020-06-08 Thread Sasha Levin
From: Coly Li [ Upstream commit 86da9f736740eba602389908574dfbb0f517baa5 ] The problematic code piece in bcache_device_free() is, 785 static void bcache_device_free(struct bcache_device *d) 786 { 787 struct gendisk *disk = d->disk; [snipped] 799 if (disk) { 800 if (dis

[PATCH AUTOSEL 5.4 137/175] crypto: stm32/crc32 - fix multi-instance

2020-06-08 Thread Sasha Levin
From: Nicolas Toromanoff [ Upstream commit 10b89c43a64eb0d236903b79a3bc9d8f6cbfd9c7 ] Ensure CRC algorithm is registered only once in crypto framework when there are several instances of CRC devices. Update the CRC device list management to avoid that only the first CRC instance is used. Fixes

[PATCH AUTOSEL 5.4 127/175] net/mlx5e: IPoIB, Drop multicast packets that this interface sent

2020-06-08 Thread Sasha Levin
From: Erez Shitrit [ Upstream commit 8b46d424a743ddfef8056d5167f13ee7ebd1dcad ] After enabled loopback packets for IPoIB, we need to drop these packets that this HCA has replicated and came back to the same interface that sent them. Fixes: 4c6c615e3f30 ("net/mlx5e: IPoIB, Add PKEY child interfa

[PATCH AUTOSEL 5.4 151/175] xfs: gut error handling in xfs_trans_unreserve_and_mod_sb()

2020-06-08 Thread Sasha Levin
From: Dave Chinner [ Upstream commit dc3ffbb14060c943469d5e12900db3a60bc3fa64 ] xfs: gut error handling in xfs_trans_unreserve_and_mod_sb() From: Dave Chinner The error handling in xfs_trans_unreserve_and_mod_sb() is largely incorrect - rolling back the changes in the transaction if only one

[PATCH AUTOSEL 5.4 128/175] rtlwifi: Fix a double free in _rtl_usb_tx_urb_setup()

2020-06-08 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit beb12813bc75d4a23de43b85ad1c7cb28d27631e ] Seven years ago we tried to fix a leak but actually introduced a double free instead. It was an understandable mistake because the code was a bit confusing and the free was done in the wrong place. The "skb" point

[PATCH AUTOSEL 5.4 155/175] staging: greybus: sdio: Respect the cmd->busy_timeout from the mmc core

2020-06-08 Thread Sasha Levin
From: Ulf Hansson [ Upstream commit a389087ee9f195fcf2f31cd771e9ec5f02c16650 ] Using a fixed 1s timeout for all commands is a bit problematic. For some commands it means waiting longer than needed for the timeout to expire, which may not a big issue, but still. For other commands, like for an e

[PATCH AUTOSEL 5.4 144/175] btrfs: improve global reserve stealing logic

2020-06-08 Thread Sasha Levin
From: Josef Bacik [ Upstream commit 7f9fe614407692f670601a634621138233ac00d7 ] For unlink transactions and block group removal btrfs_start_transaction_fallback_global_rsv will first try to start an ordinary transaction and if it fails it will fall back to reserving the required amount by stealin

[PATCH AUTOSEL 5.4 126/175] veth: Adjust hard_start offset on redirect XDP frames

2020-06-08 Thread Sasha Levin
From: Jesper Dangaard Brouer [ Upstream commit 5c8572251fabc5bb49fd623c064e95a9daf6a3e3 ] When native XDP redirect into a veth device, the frame arrives in the xdp_frame structure. It is then processed in veth_xdp_rcv_one(), which can run a new XDP bpf_prog on the packet. Doing so requires conve

[PATCH AUTOSEL 5.4 142/175] MIPS: tools: Fix resource leak in elf-entry.c

2020-06-08 Thread Sasha Levin
From: Kaige Li [ Upstream commit f33a0b941017b9cb5a4e975af198b855b2f2b455 ] There is a file descriptor resource leak in elf-entry.c, fix this by adding fclose() before return and die. Signed-off-by: Kaige Li Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/tools/e

[PATCH AUTOSEL 5.4 157/175] ice: fix potential double free in probe unrolling

2020-06-08 Thread Sasha Levin
From: Jacob Keller [ Upstream commit bc3a024101ca497bea4c69be4054c32a5c349f1d ] If ice_init_interrupt_scheme fails, ice_probe will jump to clearing up the interrupts. This can lead to some static analysis tools such as the compiler sanitizers complaining about double free problems. Since ice_in

[PATCH AUTOSEL 5.4 095/175] media: cec: silence shift wrapping warning in __cec_s_log_addrs()

2020-06-08 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit 3b5af3171e2d5a73ae6f04965ed653d039904eb6 ] The log_addrs->log_addr_type[i] value is a u8 which is controlled by the user and comes from the ioctl. If it's over 31 then that results in undefined behavior (shift wrapping) and that leads to a Smatch static che

[PATCH AUTOSEL 5.4 092/175] net: lpc-enet: fix error return code in lpc_mii_init()

2020-06-08 Thread Sasha Levin
From: Wei Yongjun [ Upstream commit 88ec7cb22ddde725ed4ce15991f0bd9dd817fd85 ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: b7370112f519 ("lpc32xx: Added ethernet driver") Signed-off-by: Wei Yongjun Acked-by: Vladimir

[PATCH AUTOSEL 5.4 088/175] exit: Move preemption fixup up, move blocking operations down

2020-06-08 Thread Sasha Levin
From: Jann Horn [ Upstream commit 586b58cac8b4683eb58a1446fbc399de18974e40 ] With CONFIG_DEBUG_ATOMIC_SLEEP=y and CONFIG_CGROUPS=y, kernel oopses in non-preemptible context look untidy; after the main oops, the kernel prints a "sleeping function called from invalid context" report because exit_s

[PATCH AUTOSEL 5.4 099/175] libertas_tf: avoid a null dereference in pointer priv

2020-06-08 Thread Sasha Levin
From: Colin Ian King [ Upstream commit 049ceac308b0d57c4f06b9fb957cdf95d315cf0b ] Currently there is a check if priv is null when calling lbtf_remove_card but not in a previous call to if_usb_reset_dev that can also dereference priv. Fix this by also only calling lbtf_remove_card if priv is nul

[PATCH AUTOSEL 5.4 093/175] selinux: fix error return code in policydb_read()

2020-06-08 Thread Sasha Levin
From: Wei Yongjun [ Upstream commit 4c09f8b6913a779ca0c70ea8058bf21537eebb3b ] Fix to return negative error code -ENOMEM from the kvcalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: acdf52d97f82 ("selinux: convert to kvmalloc") Signed-off-by: Wei Yongjun Sig

[PATCH AUTOSEL 5.4 096/175] net: allwinner: Fix use correct return type for ndo_start_xmit()

2020-06-08 Thread Sasha Levin
From: Yunjian Wang [ Upstream commit 09f6c44aaae0f1bdb8b983d7762676d5018c53bc ] The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix the ndo function to use the correct type. And emac_start_xmit() can leak one skb if 'channel' == 3. Signed-off-by: Yunjian Wang Signed-off-by: Da

[PATCH AUTOSEL 5.4 097/175] powerpc/spufs: fix copy_to_user while atomic

2020-06-08 Thread Sasha Levin
From: Jeremy Kerr [ Upstream commit 88413a6bfbbe2f648df399b62f85c934460b7a4d ] Currently, we may perform a copy_to_user (through simple_read_from_buffer()) while holding a context's register_lock, while accessing the context save area. This change uses a temporary buffer for the context save ar

[PATCH AUTOSEL 5.4 116/175] ath10k: Remove msdu from idr when management pkt send fails

2020-06-08 Thread Sasha Levin
From: Rakesh Pillai [ Upstream commit c730c477176ad4af86d9aae4d360a7ad840b073a ] Currently when the sending of any management pkt via wmi command fails, the packet is being unmapped freed in the error handling. But the idr entry added, which is used to track these packet is not getting removed.

[PATCH AUTOSEL 5.4 112/175] iwlwifi: avoid debug max amsdu config overwriting itself

2020-06-08 Thread Sasha Levin
From: Mordechay Goodstein [ Upstream commit a65a5824298b06049dbaceb8a9bd19709dc9507c ] If we set amsdu_len one after another the second one overwrites the orig_amsdu_len so allow only moving from debug to non debug state. Also the TLC update check was wrong: it was checking that also the orig i

[PATCH AUTOSEL 5.4 080/175] Drivers: hv: vmbus: Always handle the VMBus messages on CPU0

2020-06-08 Thread Sasha Levin
From: "Andrea Parri (Microsoft)" [ Upstream commit 8a857c55420f29da4fc131adc22b12d474c48f4c ] A Linux guest have to pick a "connect CPU" to communicate with the Hyper-V host. This CPU can not be taken offline because Hyper-V does not provide a way to change that CPU assignment. Current code se

[PATCH AUTOSEL 5.4 104/175] mips: cm: Fix an invalid error code of INTVN_*_ERR

2020-06-08 Thread Sasha Levin
From: Serge Semin [ Upstream commit 8a0efb8b101665a843205eab3d67ab09cb2d9a8d ] Commit 3885c2b463f6 ("MIPS: CM: Add support for reporting CM cache errors") adds cm2_causes[] array with map of error type ID and pointers to the short description string. There is a mistake in the table, since accord

[PATCH AUTOSEL 5.4 069/175] tools api fs: Make xxx__mountpoint() more scalable

2020-06-08 Thread Sasha Levin
From: Stephane Eranian [ Upstream commit c6fddb28bad26e5472cb7acf7b04cd5126f1a4ab ] The xxx_mountpoint() interface provided by fs.c finds mount points for common pseudo filesystems. The first time xxx_mountpoint() is invoked, it scans the mount table (/proc/mounts) looking for a match. If found,

[PATCH AUTOSEL 5.4 083/175] selftests/bpf: Fix memory leak in extract_build_id()

2020-06-08 Thread Sasha Levin
From: Andrii Nakryiko [ Upstream commit 9f56bb531a809ecaa7f0ddca61d2cf3adc1cb81a ] getline() allocates string, which has to be freed. Fixes: 81f77fd0deeb ("bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Cc: Song Liu

[PATCH AUTOSEL 5.4 090/175] drivers/perf: hisi: Fix typo in events attribute array

2020-06-08 Thread Sasha Levin
From: Shaokun Zhang [ Upstream commit 88562f06ebf56587788783e5420f25fde3ca36c8 ] Fix up one typo: wr_dr_64b -> wr_ddr_64b. Fixes: 2bab3cf9104c ("perf: hisi: Add support for HiSilicon SoC HHA PMU driver") Signed-off-by: Shaokun Zhang Cc: Will Deacon Cc: Mark Rutland Link: https://lore.kernel

[PATCH AUTOSEL 5.4 070/175] e1000: Distribute switch variables for initialization

2020-06-08 Thread Sasha Levin
From: Kees Cook [ Upstream commit a34c7f5156654ebaf7eaace102938be7ff7036cb ] Variables declared in a switch statement before any case statements cannot be automatically initialized with compiler instrumentation (as they are not part of any execution flow). With GCC's proposed automatic stack var

[PATCH AUTOSEL 5.4 058/175] net: vmxnet3: fix possible buffer overflow caused by bad DMA value in vmxnet3_get_rss()

2020-06-08 Thread Sasha Levin
From: Jia-Ju Bai [ Upstream commit 3e1c6846b9e108740ef8a37be80314053f5dd52a ] The value adapter->rss_conf is stored in DMA memory, and it is assigned to rssConf, so rssConf->indTableSize can be modified at anytime by malicious hardware. Because rssConf->indTableSize is assigned to n, buffer over

[PATCH AUTOSEL 5.4 064/175] ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb

2020-06-08 Thread Sasha Levin
From: Qiujun Huang [ Upstream commit 2bbcaaee1fcbd83272e29f31e2bb7e70d8c49e05 ] In ath9k_hif_usb_rx_cb interface number is assumed to be 0. usb_ifnum_to_if(urb->dev, 0) But it isn't always true. The case reported by syzbot: https://lore.kernel.org/linux-usb/666c9c05a1c05...@google.c

[PATCH AUTOSEL 5.4 057/175] x86/kvm/hyper-v: Explicitly align hcall param for kvm_hyperv_exit

2020-06-08 Thread Sasha Levin
From: Jon Doron [ Upstream commit f7d31e65368aeef973fab788aa22c4f1d5a6af66 ] The problem the patch is trying to address is the fact that 'struct kvm_hyperv_exit' has different layout on when compiling in 32 and 64 bit modes. In 64-bit mode the default alignment boundary is 64 bits thus forcing

[PATCH AUTOSEL 5.4 035/175] ixgbe: Fix XDP redirect on archs with PAGE_SIZE above 4K

2020-06-08 Thread Sasha Levin
From: Jesper Dangaard Brouer [ Upstream commit 88eb0ee17b2ece64fcf6689a4557a5c2e7a89c4b ] The ixgbe driver have another memory model when compiled on archs with PAGE_SIZE above 4096 bytes. In this mode it doesn't split the page in two halves, but instead increment rx_buffer->page_offset by trues

[PATCH AUTOSEL 5.4 036/175] platform/x86: dell-laptop: don't register micmute LED if there is no token

2020-06-08 Thread Sasha Levin
From: Koba Ko [ Upstream commit 257e03a334ccb96e657bf5f6ab3b5693a22c2aa4 ] On Dell G3-3590, error message is issued during boot up, "platform::micmute: Setting an LED's brightness failed (-19)", but there's no micmute led on the machine. Get the related tokens of SMBIOS, GLOBAL_MIC_MUTE_DISABLE

[PATCH AUTOSEL 5.4 051/175] batman-adv: Revert "disable ethtool link speed detection when auto negotiation off"

2020-06-08 Thread Sasha Levin
From: Sven Eckelmann [ Upstream commit 9ad346c90509ebd983f60da7d082f261ad329507 ] The commit 8c46fcd78308 ("batman-adv: disable ethtool link speed detection when auto negotiation off") disabled the usage of ethtool's link_ksetting when auto negotation was enabled due to invalid values when used

[PATCH AUTOSEL 5.4 049/175] btrfs: do not ignore error from btrfs_next_leaf() when inserting checksums

2020-06-08 Thread Sasha Levin
From: Filipe Manana [ Upstream commit 7e4a3f7ed5d54926ec671bbb13e171cfe179cc50 ] We are currently treating any non-zero return value from btrfs_next_leaf() the same way, by going to the code that inserts a new checksum item in the tree. However if btrfs_next_leaf() returns an error (a value < 0)

[PATCH AUTOSEL 5.4 007/175] media: staging: imgu: do not hold spinlock during freeing mmu page table

2020-06-08 Thread Sasha Levin
From: Bingbu Cao [ Upstream commit e1ebe9f9c88e5a78fcc4670a9063c9b3cd87dda4 ] ImgU need set the mmu page table in memory as uncached, and set back to write-back when free the page table by set_memory_wb(), set_memory_wb() can not do flushing without interrupt, so the spinlock should not be hold

<    6   7   8   9   10   11   12   13   14   15   >