[PATCH 5.7 07/20] net-sysfs: add a newline when printing tx_timeout by sysfs

2020-07-30 Thread Greg Kroah-Hartman
From: Xiongfeng Wang [ Upstream commit 9bb5fbea59f36a589ef886292549ca4052fe676c ] When I cat 'tx_timeout' by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cat /sys/devices/virtual/net/lo/queues/tx-0/tx_timeout 0root@syzkaller:~# Signed-off-by:

[PATCH 5.4 13/19] sctp: shrink stream outq only when new outcnt < old outcnt

2020-07-30 Thread Greg Kroah-Hartman
From: Xin Long [ Upstream commit 8f13399db22f909a35735bf8ae2f932e0c8f0e30 ] It's not necessary to go list_for_each for outq->out_chunk_list when new outcnt >= old outcnt, as no chunk with higher sid than new (outcnt - 1) exists in the outqueue. While at it, also move the list_for_each code in

[PATCH 5.4 10/19] rxrpc: Fix sendmsg() returning EPIPE due to recvmsg() returning ENODATA

2020-07-30 Thread Greg Kroah-Hartman
From: David Howells [ Upstream commit 639f181f0ee20d3249dbc55f740f0167267180f0 ] rxrpc_sendmsg() returns EPIPE if there's an outstanding error, such as if rxrpc_recvmsg() indicating ENODATA if there's nothing for it to read. Change rxrpc_recvmsg() to return EAGAIN instead if there's nothing to

[PATCH 5.4 12/19] AX.25: Prevent integer overflows in connect and sendmsg

2020-07-30 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit 17ad73e941b71f3bec7523ea4e9cbc3752461c2d ] We recently added some bounds checking in ax25_connect() and ax25_sendmsg() and we so we removed the AX25_MAX_DIGIS checks because they were no longer required. Unfortunately, I believe they are required to

[PATCH 5.4 04/19] drivers/net/wan/x25_asy: Fix to make it work

2020-07-30 Thread Greg Kroah-Hartman
From: Xie He [ Upstream commit 8fdcabeac39824fe67480fd9508d80161c541854 ] This driver is not working because of problems of its receiving code. This patch fixes it to make it work. When the driver receives an LAPB frame, it should first pass the frame to the LAPB module to process. After

[PATCH 5.4 05/19] ip6_gre: fix null-ptr-deref in ip6gre_init_net()

2020-07-30 Thread Greg Kroah-Hartman
From: Wei Yongjun [ Upstream commit 46ef5b89ec0ecf290d74c4aee844f063933c4da4 ] KASAN report null-ptr-deref error when register_netdev() failed: KASAN: null-ptr-deref in range [0x03c0-0x03c7] CPU: 2 PID: 422 Comm: ip Not tainted 5.8.0-rc4+ #12 Call Trace:

[PATCH 5.7 04/20] drivers/net/wan/x25_asy: Fix to make it work

2020-07-30 Thread Greg Kroah-Hartman
From: Xie He [ Upstream commit 8fdcabeac39824fe67480fd9508d80161c541854 ] This driver is not working because of problems of its receiving code. This patch fixes it to make it work. When the driver receives an LAPB frame, it should first pass the frame to the LAPB module to process. After

[PATCH 5.4 02/19] AX.25: Prevent out-of-bounds read in ax25_sendmsg()

2020-07-30 Thread Greg Kroah-Hartman
From: Peilin Ye [ Upstream commit 8885bb0621f01a6c82be60a91e5fc0f6e2f71186 ] Checks on `addr_len` and `usax->sax25_ndigis` are insufficient. ax25_sendmsg() can go out of bounds when `usax->sax25_ndigis` equals to 7 or 8. Fix it. It is safe to remove `usax->sax25_ndigis > AX25_MAX_DIGIS`, since

[PATCH] thermal: mediatek: Fix missing selection

2020-07-30 Thread Henry Yen
Mediatek thermal driver is compatible with multiple platforms. Some of the platforms (e.g., MT2701) requires to enable MEDIATEK_MT6577_AUXADC option. If lacks the config, the driver will not be able to read correct temperature. To fix it, select missing MEDIATEK_MT6577_AUXADC config.

Re: [PATCH] MAINTAINERS: Include drivers subdirs for ARM PMU PROFILING AND DEBUGGING entry

2020-07-30 Thread John Garry
On 17/06/2020 12:17, John Garry wrote: Ensure that the ARM PMU PROFILING AND DEBUGGING maintainers are included for the HiSilicon PMU driver. Just a reminder in case this minor patch was missed... Signed-off-by: John Garry diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH 5.4 17/19] regmap: debugfs: check count when read regmap file

2020-07-30 Thread Greg Kroah-Hartman
From: Peng Fan commit 74edd08a4fbf51d65fd8f4c7d8289cd0f392bd91 upstream. When executing the following command, we met kernel dump. dmesg -c > /dev/null; cd /sys; for i in `ls /sys/kernel/debug/regmap/* -d`; do echo "Checking regmap in $i"; cat $i/registers; done && grep -ri

[PATCH 5.4 03/19] dev: Defer free of skbs in flush_backlog

2020-07-30 Thread Greg Kroah-Hartman
From: Subash Abhinov Kasiviswanathan [ Upstream commit 7df5cb75cfb8acf96c7f2342530eb41e0c11f4c3 ] IRQs are disabled when freeing skbs in input queue. Use the IRQ safe variant to free skbs here. Fixes: 145dd5f9c88f ("net: flush the softnet backlog in process context") Signed-off-by: Subash

[PATCH 5.4 15/19] udp: Copy has_conns in reuseport_grow().

2020-07-30 Thread Greg Kroah-Hartman
From: Kuniyuki Iwashima [ Upstream commit f2b2c55e512879a05456eaf5de4d1ed2f7757509 ] If an unconnected socket in a UDP reuseport group connect()s, has_conns is set to 1. Then, when a packet is received, udp[46]_lib_lookup2() scans all sockets in udp_hslot looking for the connected socket with

[PATCH 4.19 01/17] AX.25: Fix out-of-bounds read in ax25_connect()

2020-07-30 Thread Greg Kroah-Hartman
From: Peilin Ye [ Upstream commit 2f2a7ffad5c6cbf3d438e813cfdc88230e185ba6 ] Checks on `addr_len` and `fsa->fsa_ax25.sax25_ndigis` are insufficient. ax25_connect() can go out of bounds when `fsa->fsa_ax25.sax25_ndigis` equals to 7 or 8. Fix it. This issue has been reported as a KMSAN

[PATCH 5.4 16/19] udp: Improve load balancing for SO_REUSEPORT.

2020-07-30 Thread Greg Kroah-Hartman
From: Kuniyuki Iwashima [ Upstream commit efc6b6f6c3113e8b203b9debfb72d81e0f3dcace ] Currently, SO_REUSEPORT does not work well if connected sockets are in a UDP reuseport group. Then reuseport_has_conns() returns true and the result of reuseport_select_sock() is discarded. Also, unconnected

[PATCH 5.4 07/19] net: udp: Fix wrong clean up for IS_UDPLITE macro

2020-07-30 Thread Greg Kroah-Hartman
From: Miaohe Lin [ Upstream commit b0a422772fec29811e293c7c0e6f991c0fd9241d ] We can't use IS_UDPLITE to replace udp_sk->pcflag when UDPLITE_RECV_CC is checked. Fixes: b2bf1e2659b1 ("[UDP]: Clean up for IS_UDPLITE macro") Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller

[PATCH 5.4 18/19] PM: wakeup: Show statistics for deleted wakeup sources again

2020-07-30 Thread Greg Kroah-Hartman
From: zhuguangqing commit e976eb4b91e906f20ec25b20c152d53c472fc3fd upstream. After commit 00ee22c28915 (PM / wakeup: Use seq_open() to show wakeup stats), print_wakeup_source_stats(m, _ws) is not called from wakeup_sources_stats_seq_show() any more. Because deleted_ws is one of the wakeup

[PATCH 5.4 19/19] Revert "dpaa_eth: fix usage as DSA master, try 3"

2020-07-30 Thread Greg Kroah-Hartman
From: Vladimir Oltean This reverts commit 40a904b1c2e57b22dd002dfce73688871cb0bac8. The patch is not wrong, but the Fixes: tag is. It should have been: Fixes: 060ad66f9795 ("dpaa_eth: change DMA device") which means that it's fixing a commit which was introduced in: git tag

[PATCH 4.19 03/17] dev: Defer free of skbs in flush_backlog

2020-07-30 Thread Greg Kroah-Hartman
From: Subash Abhinov Kasiviswanathan [ Upstream commit 7df5cb75cfb8acf96c7f2342530eb41e0c11f4c3 ] IRQs are disabled when freeing skbs in input queue. Use the IRQ safe variant to free skbs here. Fixes: 145dd5f9c88f ("net: flush the softnet backlog in process context") Signed-off-by: Subash

Re: [PATCH] scsi: sd: add runtime pm to open / release

2020-07-30 Thread Martin Kepplinger
On 29.06.20 18:15, Alan Stern wrote: > On Mon, Jun 29, 2020 at 11:42:59AM +0200, Martin Kepplinger wrote: >> >> >> On 26.06.20 17:44, Alan Stern wrote: >>> Martin's best approach would be to add some debugging code to find out why >>> blk_queue_enter() isn't calling bkl_pm_request_resume(), or

[PATCH 5.4 09/19] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-30 Thread Greg Kroah-Hartman
From: Weilong Chen [ Upstream commit cebb69754f37d68e1355a5e726fdac317bcda302 ] When vlan_newlink call register_vlan_dev fails, it might return error with dev->reg_state = NETREG_UNREGISTERED. The rtnl_newlink should free the memory. But currently rtnl_newlink only free the memory which state

[PATCH 4.19 02/17] AX.25: Prevent out-of-bounds read in ax25_sendmsg()

2020-07-30 Thread Greg Kroah-Hartman
From: Peilin Ye [ Upstream commit 8885bb0621f01a6c82be60a91e5fc0f6e2f71186 ] Checks on `addr_len` and `usax->sax25_ndigis` are insufficient. ax25_sendmsg() can go out of bounds when `usax->sax25_ndigis` equals to 7 or 8. Fix it. It is safe to remove `usax->sax25_ndigis > AX25_MAX_DIGIS`, since

[PATCH 5.4 06/19] net-sysfs: add a newline when printing tx_timeout by sysfs

2020-07-30 Thread Greg Kroah-Hartman
From: Xiongfeng Wang [ Upstream commit 9bb5fbea59f36a589ef886292549ca4052fe676c ] When I cat 'tx_timeout' by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cat /sys/devices/virtual/net/lo/queues/tx-0/tx_timeout 0root@syzkaller:~# Signed-off-by:

[PATCH 5.4 00/19] 5.4.55-rc1 review

2020-07-30 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.4.55 release. There are 19 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 Sat, 01 Aug 2020 07:44:05 +. Anything

[PATCH 4.19 08/17] qrtr: orphan socket in qrtr_release()

2020-07-30 Thread Greg Kroah-Hartman
From: Cong Wang [ Upstream commit af9f691f0f5bdd1ade65a7b84927639882d7c3e5 ] We have to detach sock from socket in qrtr_release(), otherwise skb->sk may still reference to this socket when the skb is released in tun->queue, particularly sk->sk_wq still points to >wq, which leads to a UAF.

[PATCH 4.19 09/17] rxrpc: Fix sendmsg() returning EPIPE due to recvmsg() returning ENODATA

2020-07-30 Thread Greg Kroah-Hartman
From: David Howells [ Upstream commit 639f181f0ee20d3249dbc55f740f0167267180f0 ] rxrpc_sendmsg() returns EPIPE if there's an outstanding error, such as if rxrpc_recvmsg() indicating ENODATA if there's nothing for it to read. Change rxrpc_recvmsg() to return EAGAIN instead if there's nothing to

[PATCH 4.19 16/17] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-30 Thread Greg Kroah-Hartman
From: Weilong Chen [ Upstream commit cebb69754f37d68e1355a5e726fdac317bcda302 ] When vlan_newlink call register_vlan_dev fails, it might return error with dev->reg_state = NETREG_UNREGISTERED. The rtnl_newlink should free the memory. But currently rtnl_newlink only free the memory which state

[PATCH 4.19 10/17] tcp: allow at most one TLP probe per flight

2020-07-30 Thread Greg Kroah-Hartman
From: Yuchung Cheng [ Upstream commit 76be93fc0702322179bb0ea87295d820ee46ad14 ] Previously TLP may send multiple probes of new data in one flight. This happens when the sender is cwnd limited. After the initial TLP containing new data is sent, the sender receives another ACK that acks partial

[PATCH 4.19 15/17] udp: Improve load balancing for SO_REUSEPORT.

2020-07-30 Thread Greg Kroah-Hartman
From: Kuniyuki Iwashima [ Upstream commit efc6b6f6c3113e8b203b9debfb72d81e0f3dcace ] Currently, SO_REUSEPORT does not work well if connected sockets are in a UDP reuseport group. Then reuseport_has_conns() returns true and the result of reuseport_select_sock() is discarded. Also, unconnected

[PATCH 4.19 11/17] AX.25: Prevent integer overflows in connect and sendmsg

2020-07-30 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit 17ad73e941b71f3bec7523ea4e9cbc3752461c2d ] We recently added some bounds checking in ax25_connect() and ax25_sendmsg() and we so we removed the AX25_MAX_DIGIS checks because they were no longer required. Unfortunately, I believe they are required to

[PATCH 4.14 01/14] AX.25: Fix out-of-bounds read in ax25_connect()

2020-07-30 Thread Greg Kroah-Hartman
From: Peilin Ye [ Upstream commit 2f2a7ffad5c6cbf3d438e813cfdc88230e185ba6 ] Checks on `addr_len` and `fsa->fsa_ax25.sax25_ndigis` are insufficient. ax25_connect() can go out of bounds when `fsa->fsa_ax25.sax25_ndigis` equals to 7 or 8. Fix it. This issue has been reported as a KMSAN

[PATCH 4.19 12/17] sctp: shrink stream outq only when new outcnt < old outcnt

2020-07-30 Thread Greg Kroah-Hartman
From: Xin Long [ Upstream commit 8f13399db22f909a35735bf8ae2f932e0c8f0e30 ] It's not necessary to go list_for_each for outq->out_chunk_list when new outcnt >= old outcnt, as no chunk with higher sid than new (outcnt - 1) exists in the outqueue. While at it, also move the list_for_each code in

[PATCH 4.19 17/17] regmap: debugfs: check count when read regmap file

2020-07-30 Thread Greg Kroah-Hartman
From: Peng Fan commit 74edd08a4fbf51d65fd8f4c7d8289cd0f392bd91 upstream. When executing the following command, we met kernel dump. dmesg -c > /dev/null; cd /sys; for i in `ls /sys/kernel/debug/regmap/* -d`; do echo "Checking regmap in $i"; cat $i/registers; done && grep -ri

[PATCH 4.9 09/61] SUNRPC reverting d03727b248d0 ("NFSv4 fix CLOSE not waiting for direct IO compeletion")

2020-07-30 Thread Greg Kroah-Hartman
From: Olga Kornievskaia commit 65caafd0d2145d1dd02072c4ced540624daeab40 upstream. Reverting commit d03727b248d0 "NFSv4 fix CLOSE not waiting for direct IO compeletion". This patch made it so that fput() by calling inode_dio_done() in nfs_file_release() would wait uninterruptably for any

[PATCH 4.9 08/61] drm/nouveau/i2c/g94-: increase NV_PMGR_DP_AUXCTL_TRANSACTREQ timeout

2020-07-30 Thread Greg Kroah-Hartman
From: Ben Skeggs [ Upstream commit 0156e76d388310a490aeb0f2fbb5b284ded3aecc ] Tegra TRM says worst-case reply time is 1216us, and this should fix some spurious timeouts that have been popping up. Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin ---

[PATCH 4.9 02/61] mac80211: allow rx of mesh eapol frames with default rx key

2020-07-30 Thread Greg Kroah-Hartman
From: Markus Theil [ Upstream commit 0b467b63870d9c05c81456aa9bfee894ab2db3b6 ] Without this patch, eapol frames cannot be received in mesh mode, when 802.1X should be used. Initially only a MGTK is defined, which is found and set as rx->key, when there are no other keys set.

[PATCH 4.9 06/61] drivers/net/wan/lapbether: Fixed the value of hard_header_len

2020-07-30 Thread Greg Kroah-Hartman
From: Xie He [ Upstream commit 9dc829a135fb5927f1519de11286e2bbb79f5b66 ] When this driver transmits data, first this driver will remove a pseudo header of 1 byte, then the lapb module will prepend the LAPB header of 2 or 3 bytes, then this driver will prepend a length field of 2 bytes,

[PATCH 4.9 01/61] pinctrl: amd: fix npins for uart0 in kerncz_groups

2020-07-30 Thread Greg Kroah-Hartman
From: Jacky Hu [ Upstream commit 69339d083dfb7786b0e0b3fc19eaddcf11fabdfb ] uart0_pins is defined as: static const unsigned uart0_pins[] = {135, 136, 137, 138, 139}; which npins is wronly specified as 9 later { .name = "uart0", .pins = uart0_pins,

[PATCH 4.9 24/61] regmap: dev_get_regmap_match(): fix string comparison

2020-07-30 Thread Greg Kroah-Hartman
From: Marc Kleine-Budde [ Upstream commit e84861fec32dee8a2e62bbaa52cded6b05a2a456 ] This function is used by dev_get_regmap() to retrieve a regmap for the specified device. If the device has more than one regmap, the name parameter can be used to specify one. The code here uses a pointer

[PATCH 4.14 09/14] ip6_gre: fix null-ptr-deref in ip6gre_init_net()

2020-07-30 Thread Greg Kroah-Hartman
From: Wei Yongjun [ Upstream commit 46ef5b89ec0ecf290d74c4aee844f063933c4da4 ] KASAN report null-ptr-deref error when register_netdev() failed: KASAN: null-ptr-deref in range [0x03c0-0x03c7] CPU: 2 PID: 422 Comm: ip Not tainted 5.8.0-rc4+ #12 Call Trace:

[PATCH 4.14 11/14] tcp: allow at most one TLP probe per flight

2020-07-30 Thread Greg Kroah-Hartman
From: Yuchung Cheng [ Upstream commit 76be93fc0702322179bb0ea87295d820ee46ad14 ] Previously TLP may send multiple probes of new data in one flight. This happens when the sender is cwnd limited. After the initial TLP containing new data is sent, the sender receives another ACK that acks partial

[PATCH 4.14 00/14] 4.14.191-rc1 review

2020-07-30 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.191 release. There are 14 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 Sat, 01 Aug 2020 07:44:05 +. Anything

[PATCH 4.14 08/14] AX.25: Prevent integer overflows in connect and sendmsg

2020-07-30 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit 17ad73e941b71f3bec7523ea4e9cbc3752461c2d ] We recently added some bounds checking in ax25_connect() and ax25_sendmsg() and we so we removed the AX25_MAX_DIGIS checks because they were no longer required. Unfortunately, I believe they are required to

[PATCH 4.14 10/14] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-30 Thread Greg Kroah-Hartman
From: Weilong Chen [ Upstream commit cebb69754f37d68e1355a5e726fdac317bcda302 ] When vlan_newlink call register_vlan_dev fails, it might return error with dev->reg_state = NETREG_UNREGISTERED. The rtnl_newlink should free the memory. But currently rtnl_newlink only free the memory which state

[PATCH 4.14 06/14] net: udp: Fix wrong clean up for IS_UDPLITE macro

2020-07-30 Thread Greg Kroah-Hartman
From: Miaohe Lin [ Upstream commit b0a422772fec29811e293c7c0e6f991c0fd9241d ] We can't use IS_UDPLITE to replace udp_sk->pcflag when UDPLITE_RECV_CC is checked. Fixes: b2bf1e2659b1 ("[UDP]: Clean up for IS_UDPLITE macro") Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller

[PATCH 4.9 07/61] net: sky2: initialize return of gm_phy_read

2020-07-30 Thread Greg Kroah-Hartman
From: Tom Rix [ Upstream commit 28b18e4eb515af7c6661c3995c6e3c34412c2874 ] clang static analysis flags this garbage return drivers/net/ethernet/marvell/sky2.c:208:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn] return v; ^~~~

[PATCH 4.9 03/61] scsi: scsi_transport_spi: Fix function pointer check

2020-07-30 Thread Greg Kroah-Hartman
From: Tom Rix [ Upstream commit 5aee52c44d9170591df65fafa1cd408acc1225ce ] clang static analysis flags several null function pointer problems. drivers/scsi/scsi_transport_spi.c:374:1: warning: Called function pointer is null (null dereference) [core.CallAndMessage]

[PATCH 4.14 13/14] regmap: debugfs: check count when read regmap file

2020-07-30 Thread Greg Kroah-Hartman
From: Peng Fan commit 74edd08a4fbf51d65fd8f4c7d8289cd0f392bd91 upstream. When executing the following command, we met kernel dump. dmesg -c > /dev/null; cd /sys; for i in `ls /sys/kernel/debug/regmap/* -d`; do echo "Checking regmap in $i"; cat $i/registers; done && grep -ri

[PATCH 4.9 29/61] usb: xhci-mtk: fix the failure of bandwidth allocation

2020-07-30 Thread Greg Kroah-Hartman
From: Chunfeng Yun commit 5ce1a24dd98c00a57a8fa13660648abf7e08e3ef upstream. The wMaxPacketSize field of endpoint descriptor may be zero as default value in alternate interface, and they are not actually selected when start stream, so skip them when try to allocate bandwidth. Cc: stable

[PATCH 4.9 45/61] ath9k: Fix regression with Atheros 9271

2020-07-30 Thread Greg Kroah-Hartman
From: Mark O'Donovan commit 92f53e2fda8bb9a559ad61d57bfb397ce67ed0ab upstream. This fix allows ath9k_htc modules to connect to WLAN once again. Fixes: 2bbcaaee1fcb ("ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb") Link: https://bugzilla.kernel.org/show_bug.cgi?id=208251

[PATCH 4.9 33/61] staging: comedi: addi_apci_1032: check INSN_CONFIG_DIGITAL_TRIG shift

2020-07-30 Thread Greg Kroah-Hartman
From: Ian Abbott commit 0bd0db42a030b75c20028c7ba6e327b9cb554116 upstream. The `INSN_CONFIG` comedi instruction with sub-instruction code `INSN_CONFIG_DIGITAL_TRIG` includes a base channel in `data[3]`. This is used as a right shift amount for other bitmask values without being checked. Shift

[PATCH 4.9 16/61] hippi: Fix a size used in a pci_free_consistent() in an error handling path

2020-07-30 Thread Greg Kroah-Hartman
From: Christophe JAILLET [ Upstream commit 3195c4706b00106aa82c73acd28340fa8fc2bfc1 ] The size used when calling 'pci_alloc_consistent()' and 'pci_free_consistent()' should match. Fix it and have it consistent with the corresponding call in 'rr_close()'. Fixes: 1da177e4c3f4

[PATCH 4.9 30/61] usb: xhci: Fix ASM2142/ASM3142 DMA addressing

2020-07-30 Thread Greg Kroah-Hartman
From: Forest Crossman commit dbb0897e805f2ab1b8bc358f6c3d878a376b8897 upstream. The ASM2142/ASM3142 (same PCI IDs) does not support full 64-bit DMA addresses, which can cause silent memory corruption or IOMMU errors on platforms that use the upper bits. Add the XHCI_NO_64BIT_SUPPORT quirk to

[PATCH 4.9 36/61] staging: comedi: addi_apci_1564: check INSN_CONFIG_DIGITAL_TRIG shift

2020-07-30 Thread Greg Kroah-Hartman
From: Ian Abbott commit 926234f1b8434c4409aa4c53637aa3362ca07cea upstream. The `INSN_CONFIG` comedi instruction with sub-instruction code `INSN_CONFIG_DIGITAL_TRIG` includes a base channel in `data[3]`. This is used as a right shift amount for other bitmask values without being checked. Shift

[PATCH 4.9 41/61] mm/memcg: fix refcount error while moving and swapping

2020-07-30 Thread Greg Kroah-Hartman
From: Hugh Dickins commit 8d22a9351035ef2ff12ef163a1091b8b8cf1e49c upstream. It was hard to keep a test running, moving tasks between memcgs with move_charge_at_immigrate, while swapping: mem_cgroup_id_get_many()'s refcount is discovered to be 0 (supposedly impossible), so it is then forced to

[PATCH 4.9 40/61] Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation

2020-07-30 Thread Greg Kroah-Hartman
From: Fangrui Song commit ca9b31f6bb9c6aa9b4e5f0792f39a97bbffb8c51 upstream. When CROSS_COMPILE is set (e.g. aarch64-linux-gnu-), if $(CROSS_COMPILE)elfedit is found at /usr/bin/aarch64-linux-gnu-elfedit, GCC_TOOLCHAIN_DIR will be set to /usr/bin/. --prefix= will be set to /usr/bin/ and Clang

[PATCH 4.9 32/61] staging: wlan-ng: properly check endpoint types

2020-07-30 Thread Greg Kroah-Hartman
From: Rustam Kovhaev commit faaff9765664009c1c7c65551d32e9ed3b1dda8f upstream. As syzkaller detected, wlan-ng driver does not do sanity check of endpoints in prism2sta_probe_usb(), add check for xfer direction and type Reported-and-tested-by:

[PATCH 4.9 39/61] vt: Reject zero-sized screen buffer size.

2020-07-30 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit ce684552a266cb1c7cc2f7e623f38567adec6653 upstream. syzbot is reporting general protection fault in do_con_write() [1] caused by vc->vc_screenbuf == ZERO_SIZE_PTR caused by vc->vc_screenbuf_size == 0 caused by vc->vc_cols == vc->vc_rows == vc->vc_size_row == 0 caused by

[PATCH 4.9 18/61] net: dp83640: fix SIOCSHWTSTAMP to update the struct with actual configuration

2020-07-30 Thread Greg Kroah-Hartman
From: Sergey Organov [ Upstream commit 473309fb8372365ad211f425bca760af800e10a7 ] >From Documentation/networking/timestamping.txt: A driver which supports hardware time stamping shall update the struct with the actual, possibly more permissive configuration. Do update the struct passed

[PATCH 4.9 17/61] ax88172a: fix ax88172a_unbind() failures

2020-07-30 Thread Greg Kroah-Hartman
From: George Kennedy [ Upstream commit c28d9a285668c799eeae2f7f93e929a6028a4d6d ] If ax88172a_unbind() fails, make sure that the return code is less than zero so that cleanup is done properly and avoid UAF. Fixes: a9a51bd727d1 ("ax88172a: fix information leak on short answers") Signed-off-by:

[PATCH 4.9 46/61] AX.25: Fix out-of-bounds read in ax25_connect()

2020-07-30 Thread Greg Kroah-Hartman
From: Peilin Ye [ Upstream commit 2f2a7ffad5c6cbf3d438e813cfdc88230e185ba6 ] Checks on `addr_len` and `fsa->fsa_ax25.sax25_ndigis` are insufficient. ax25_connect() can go out of bounds when `fsa->fsa_ax25.sax25_ndigis` equals to 7 or 8. Fix it. This issue has been reported as a KMSAN

[PATCH 4.9 20/61] scripts/decode_stacktrace: strip basepath from all paths

2020-07-30 Thread Greg Kroah-Hartman
From: Pi-Hsun Shih [ Upstream commit d178770d8d21489abf5bafefcbb6d5243b482e9a ] Currently the basepath is removed only from the beginning of the string. When the symbol is inlined and there's multiple line outputs of addr2line, only the first line would have basepath removed. Change to remove

[PATCH 4.9 22/61] HID: apple: Disable Fn-key key-re-mapping on clone keyboards

2020-07-30 Thread Greg Kroah-Hartman
From: Hans de Goede [ Upstream commit a5d81646fa294eed57786a9310b06ca48902adf8 ] The Maxxter KB-BT-001 Bluetooth keyboard, which looks somewhat like the Apple Wireless Keyboard, is using the vendor and product IDs (05AC:0239) of the Apple Wireless Keyboard (2009 ANSI version) . But its F1 -

[PATCH 4.9 23/61] dmaengine: tegra210-adma: Fix runtime PM imbalance on error

2020-07-30 Thread Greg Kroah-Hartman
From: Dinghao Liu [ Upstream commit 5b78fac4b1ba731cf4177fdbc1e3a4661521bcd0 ] pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao

[PATCH 4.9 52/61] AX.25: Prevent integer overflows in connect and sendmsg

2020-07-30 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit 17ad73e941b71f3bec7523ea4e9cbc3752461c2d ] We recently added some bounds checking in ax25_connect() and ax25_sendmsg() and we so we removed the AX25_MAX_DIGIS checks because they were no longer required. Unfortunately, I believe they are required to

[PATCH 4.9 55/61] drivers/net/wan/x25_asy: Fix to make it work

2020-07-30 Thread Greg Kroah-Hartman
From: Xie He [ Upstream commit 8fdcabeac39824fe67480fd9508d80161c541854 ] This driver is not working because of problems of its receiving code. This patch fixes it to make it work. When the driver receives an LAPB frame, it should first pass the frame to the LAPB module to process. After

[PATCH 4.9 59/61] perf annotate: Use asprintf when formatting objdump command line

2020-07-30 Thread Greg Kroah-Hartman
From: Arnaldo Carvalho de Melo commit 6810158d526e483868e519befff407b91e76b3db upstream. We were using a local buffer with an arbitrary size, that would have to get increased to avoid truncation as warned by gcc 8: util/annotate.c: In function 'symbol__disassemble': util/annotate.c:1488:4:

[PATCH 4.9 56/61] regmap: debugfs: check count when read regmap file

2020-07-30 Thread Greg Kroah-Hartman
From: Peng Fan commit 74edd08a4fbf51d65fd8f4c7d8289cd0f392bd91 upstream. When executing the following command, we met kernel dump. dmesg -c > /dev/null; cd /sys; for i in `ls /sys/kernel/debug/regmap/* -d`; do echo "Checking regmap in $i"; cat $i/registers; done && grep -ri

[PATCH 4.9 50/61] net: udp: Fix wrong clean up for IS_UDPLITE macro

2020-07-30 Thread Greg Kroah-Hartman
From: Miaohe Lin [ Upstream commit b0a422772fec29811e293c7c0e6f991c0fd9241d ] We can't use IS_UDPLITE to replace udp_sk->pcflag when UDPLITE_RECV_CC is checked. Fixes: b2bf1e2659b1 ("[UDP]: Clean up for IS_UDPLITE macro") Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller

[PATCH 4.9 21/61] HID: i2c-hid: add Mediacom FlexBook edge13 to descriptor override

2020-07-30 Thread Greg Kroah-Hartman
From: Federico Ricchiuto [ Upstream commit 43e666acb79f3d355dd89bf20f4d25d3b15da13e ] The Mediacom FlexBook edge13 uses the SIPODEV SP1064 touchpad, which does not supply descriptors, so it has to be added to the override list. Signed-off-by: Federico Ricchiuto Signed-off-by: Jiri Kosina

[PATCH 4.9 54/61] ip6_gre: fix null-ptr-deref in ip6gre_init_net()

2020-07-30 Thread Greg Kroah-Hartman
From: Wei Yongjun [ Upstream commit 46ef5b89ec0ecf290d74c4aee844f063933c4da4 ] KASAN report null-ptr-deref error when register_netdev() failed: KASAN: null-ptr-deref in range [0x03c0-0x03c7] CPU: 2 PID: 422 Comm: ip Not tainted 5.8.0-rc4+ #12 Call Trace:

[PATCH 4.9 61/61] perf: Make perf able to build with latest libbfd

2020-07-30 Thread Greg Kroah-Hartman
From: Changbin Du commit 0ada120c883d4f1f6aafd01cf0fbb10d8bbba015 upstream. libbfd has changed the bfd_section_* macros to inline functions bfd_section_ since 2019-09-18. See below two commits: o http://www.sourceware.org/ml/gdb-cvs/2019-09/msg00064.html o

[PATCH 4.4 01/54] pinctrl: amd: fix npins for uart0 in kerncz_groups

2020-07-30 Thread Greg Kroah-Hartman
From: Jacky Hu [ Upstream commit 69339d083dfb7786b0e0b3fc19eaddcf11fabdfb ] uart0_pins is defined as: static const unsigned uart0_pins[] = {135, 136, 137, 138, 139}; which npins is wronly specified as 9 later { .name = "uart0", .pins = uart0_pins,

[PATCH 4.4 19/54] net: dp83640: fix SIOCSHWTSTAMP to update the struct with actual configuration

2020-07-30 Thread Greg Kroah-Hartman
From: Sergey Organov [ Upstream commit 473309fb8372365ad211f425bca760af800e10a7 ] >From Documentation/networking/timestamping.txt: A driver which supports hardware time stamping shall update the struct with the actual, possibly more permissive configuration. Do update the struct passed

[PATCH 4.9 47/61] AX.25: Prevent out-of-bounds read in ax25_sendmsg()

2020-07-30 Thread Greg Kroah-Hartman
From: Peilin Ye [ Upstream commit 8885bb0621f01a6c82be60a91e5fc0f6e2f71186 ] Checks on `addr_len` and `usax->sax25_ndigis` are insufficient. ax25_sendmsg() can go out of bounds when `usax->sax25_ndigis` equals to 7 or 8. Fix it. It is safe to remove `usax->sax25_ndigis > AX25_MAX_DIGIS`, since

[PATCH 4.4 10/54] perf/core: Fix locking for children siblings group read

2020-07-30 Thread Greg Kroah-Hartman
From: Jiri Olsa commit 2aeb1883547626d82c597cce2c99f0b9c62e2425 upstream. We're missing ctx lock when iterating children siblings within the perf_read path for group reading. Following race and crash can happen: User space doing read syscall on event group leader: T1: perf_read lock

[PATCH 4.4 23/54] usb: gadget: udc: gr_udc: fix memleak on error handling path in gr_ep_init()

2020-07-30 Thread Greg Kroah-Hartman
From: Evgeny Novikov [ Upstream commit c8f8529e2c4141afa2ebb487ad48e8a6ec3e8c99 ] gr_ep_init() does not assign the allocated request anywhere if allocation of memory for the buffer fails. This is a memory leak fixed by the given patch. Found by Linux Driver Verification project

[PATCH 4.4 20/54] net: smc91x: Fix possible memory leak in smc_drv_probe()

2020-07-30 Thread Greg Kroah-Hartman
From: Wang Hai [ Upstream commit bca9749b1aa23d964d3ab930938af66dbf887f15 ] If try_toggle_control_gpio() failed in smc_drv_probe(), free_netdev(ndev) should be called to free the ndev created earlier. Otherwise, a memleak will occur. Fixes: 7d2911c43815 ("net: smc91x: Fix gpios for device tree

[PATCH 4.4 13/54] ASoC: rt5670: Correct RT5670_LDO_SEL_MASK

2020-07-30 Thread Greg Kroah-Hartman
From: Hans de Goede commit 5cacc6f5764e94fa753b2c1f5f7f1f3f74286e82 upstream. The RT5670_PWR_ANLG1 register has 3 bits to select the LDO voltage, so the correct mask is 0x7 not 0x3. Because of this wrong mask we were programming the ldo bits to a setting of binary 001 (0x05 & 0x03) instead of

[PATCH 4.4 15/54] x86/fpu: Disable bottom halves while loading FPU registers

2020-07-30 Thread Greg Kroah-Hartman
From: Sebastian Andrzej Siewior [ Upstream commit 68239654acafe6aad5a3c1dc7237e60accfebc03 ] The sequence fpu->initialized = 1; /* step A */ preempt_disable();/* step B */ fpu__restore(fpu); preempt_enable(); in __fpu__restore_sig() is racy in regard to a context

[PATCH 4.4 02/54] mac80211: allow rx of mesh eapol frames with default rx key

2020-07-30 Thread Greg Kroah-Hartman
From: Markus Theil [ Upstream commit 0b467b63870d9c05c81456aa9bfee894ab2db3b6 ] Without this patch, eapol frames cannot be received in mesh mode, when 802.1X should be used. Initially only a MGTK is defined, which is found and set as rx->key, when there are no other keys set.

[PATCH 4.4 17/54] hippi: Fix a size used in a pci_free_consistent() in an error handling path

2020-07-30 Thread Greg Kroah-Hartman
From: Christophe JAILLET [ Upstream commit 3195c4706b00106aa82c73acd28340fa8fc2bfc1 ] The size used when calling 'pci_alloc_consistent()' and 'pci_free_consistent()' should match. Fix it and have it consistent with the corresponding call in 'rr_close()'. Fixes: 1da177e4c3f4

[PATCH 4.4 18/54] ax88172a: fix ax88172a_unbind() failures

2020-07-30 Thread Greg Kroah-Hartman
From: George Kennedy [ Upstream commit c28d9a285668c799eeae2f7f93e929a6028a4d6d ] If ax88172a_unbind() fails, make sure that the return code is less than zero so that cleanup is done properly and avoid UAF. Fixes: a9a51bd727d1 ("ax88172a: fix information leak on short answers") Signed-off-by:

[PATCH 4.4 14/54] btrfs: fix double free on ulist after backref resolution failure

2020-07-30 Thread Greg Kroah-Hartman
From: Filipe Manana commit 580c079b5766ac706f56eec5c79aee4bf929fef6 upstream. At btrfs_find_all_roots_safe() we allocate a ulist and set the **roots argument to point to it. However if later we fail due to an error returned by find_parent_nodes(), we free that ulist but leave a dangling pointer

[PATCH 4.4 24/54] arm64: Use test_tsk_thread_flag() for checking TIF_SINGLESTEP

2020-07-30 Thread Greg Kroah-Hartman
From: Will Deacon [ Upstream commit 5afc78551bf5d53279036e0bf63314e35631d79f ] Rather than open-code test_tsk_thread_flag() at each callsite, simply replace the couple of offenders with calls to test_tsk_thread_flag() directly. Signed-off-by: Will Deacon Signed-off-by: Sasha Levin ---

[PATCH 4.4 44/54] rxrpc: Fix sendmsg() returning EPIPE due to recvmsg() returning ENODATA

2020-07-30 Thread Greg Kroah-Hartman
From: David Howells [ Upstream commit 639f181f0ee20d3249dbc55f740f0167267180f0 ] rxrpc_sendmsg() returns EPIPE if there's an outstanding error, such as if rxrpc_recvmsg() indicating ENODATA if there's nothing for it to read. Change rxrpc_recvmsg() to return EAGAIN instead if there's nothing to

[PATCH 4.4 46/54] drivers/net/wan/x25_asy: Fix to make it work

2020-07-30 Thread Greg Kroah-Hartman
From: Xie He [ Upstream commit 8fdcabeac39824fe67480fd9508d80161c541854 ] This driver is not working because of problems of its receiving code. This patch fixes it to make it work. When the driver receives an LAPB frame, it should first pass the frame to the LAPB module to process. After

[PATCH 4.4 29/54] staging: comedi: ni_6527: fix INSN_CONFIG_DIGITAL_TRIG support

2020-07-30 Thread Greg Kroah-Hartman
From: Ian Abbott commit f07804ec77d77f8a9dcf570a24154e17747bc82f upstream. `ni6527_intr_insn_config()` processes `INSN_CONFIG` comedi instructions for the "interrupt" subdevice. When `data[0]` is `INSN_CONFIG_DIGITAL_TRIG` it is configuring the digital trigger. When `data[2]` is

[PATCH 4.4 52/54] perf tools: Fix snprint warnings for gcc 8

2020-07-30 Thread Greg Kroah-Hartman
From: Jiri Olsa commit 77f18153c080855e1c3fb520ca31a4e61530121d upstream. [Add an additional sprintf replacement in tools/perf/builtin-script.c] With gcc 8 we get new set of snprintf() warnings that breaks the compilation, one example: tests/mem.c: In function ‘check’: tests/mem.c:19:48:

[PATCH 4.4 04/54] xtensa: fix __sync_fetch_and_{and,or}_4 declarations

2020-07-30 Thread Greg Kroah-Hartman
From: Max Filippov [ Upstream commit 73f9941306d5ce030f3ffc7db425c7b2a798cf8e ] Building xtensa kernel with gcc-10 produces the following warnings: arch/xtensa/kernel/xtensa_ksyms.c:90:15: warning: conflicting types for built-in function ‘__sync_fetch_and_and_4’; expected ‘unsigned

[PATCH 4.4 47/54] Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation

2020-07-30 Thread Greg Kroah-Hartman
From: Fangrui Song commit ca9b31f6bb9c6aa9b4e5f0792f39a97bbffb8c51 upstream. When CROSS_COMPILE is set (e.g. aarch64-linux-gnu-), if $(CROSS_COMPILE)elfedit is found at /usr/bin/aarch64-linux-gnu-elfedit, GCC_TOOLCHAIN_DIR will be set to /usr/bin/. --prefix= will be set to /usr/bin/ and Clang

[PATCH 4.4 05/54] xtensa: update *pos in cpuinfo_op.next

2020-07-30 Thread Greg Kroah-Hartman
From: Max Filippov [ Upstream commit 0d5ab144429e8bd80889b856a44d56ab4a5cd59b ] Increment *pos in the cpuinfo_op.next to fix the following warning triggered by cat /proc/cpuinfo: seq_file: buggy .next function c_next did not update position index Signed-off-by: Max Filippov Signed-off-by:

[PATCH 4.4 48/54] regmap: debugfs: check count when read regmap file

2020-07-30 Thread Greg Kroah-Hartman
From: Peng Fan commit 74edd08a4fbf51d65fd8f4c7d8289cd0f392bd91 upstream. When executing the following command, we met kernel dump. dmesg -c > /dev/null; cd /sys; for i in `ls /sys/kernel/debug/regmap/* -d`; do echo "Checking regmap in $i"; cat $i/registers; done && grep -ri

[PATCH 4.4 45/54] ip6_gre: fix null-ptr-deref in ip6gre_init_net()

2020-07-30 Thread Greg Kroah-Hartman
From: Wei Yongjun [ Upstream commit 46ef5b89ec0ecf290d74c4aee844f063933c4da4 ] KASAN report null-ptr-deref error when register_netdev() failed: KASAN: null-ptr-deref in range [0x03c0-0x03c7] CPU: 2 PID: 422 Comm: ip Not tainted 5.8.0-rc4+ #12 Call Trace:

[PATCH 4.4 38/54] AX.25: Fix out-of-bounds read in ax25_connect()

2020-07-30 Thread Greg Kroah-Hartman
From: Peilin Ye [ Upstream commit 2f2a7ffad5c6cbf3d438e813cfdc88230e185ba6 ] Checks on `addr_len` and `fsa->fsa_ax25.sax25_ndigis` are insufficient. ax25_connect() can go out of bounds when `fsa->fsa_ax25.sax25_ndigis` equals to 7 or 8. Fix it. This issue has been reported as a KMSAN

[PATCH 4.4 35/54] parisc: Add atomic64_set_release() define to avoid CPU soft lockups

2020-07-30 Thread Greg Kroah-Hartman
From: John David Anglin commit be6577af0cef934ccb036445314072e8cb9217b9 upstream. Stalls are quite frequent with recent kernels. I enabled CONFIG_SOFTLOCKUP_DETECTOR and I caught the following stall: watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [cc1:22803] CPU: 0 PID: 22803 Comm: cc1 Not

[PATCH 4.4 42/54] AX.25: Prevent integer overflows in connect and sendmsg

2020-07-30 Thread Greg Kroah-Hartman
From: Dan Carpenter [ Upstream commit 17ad73e941b71f3bec7523ea4e9cbc3752461c2d ] We recently added some bounds checking in ax25_connect() and ax25_sendmsg() and we so we removed the AX25_MAX_DIGIS checks because they were no longer required. Unfortunately, I believe they are required to

[PATCH 4.4 40/54] net-sysfs: add a newline when printing tx_timeout by sysfs

2020-07-30 Thread Greg Kroah-Hartman
From: Xiongfeng Wang [ Upstream commit 9bb5fbea59f36a589ef886292549ca4052fe676c ] When I cat 'tx_timeout' by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cat /sys/devices/virtual/net/lo/queues/tx-0/tx_timeout 0root@syzkaller:~# Signed-off-by:

[PATCH 4.4 41/54] net: udp: Fix wrong clean up for IS_UDPLITE macro

2020-07-30 Thread Greg Kroah-Hartman
From: Miaohe Lin [ Upstream commit b0a422772fec29811e293c7c0e6f991c0fd9241d ] We can't use IS_UDPLITE to replace udp_sk->pcflag when UDPLITE_RECV_CC is checked. Fixes: b2bf1e2659b1 ("[UDP]: Clean up for IS_UDPLITE macro") Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller

[PATCH 4.4 39/54] AX.25: Prevent out-of-bounds read in ax25_sendmsg()

2020-07-30 Thread Greg Kroah-Hartman
From: Peilin Ye [ Upstream commit 8885bb0621f01a6c82be60a91e5fc0f6e2f71186 ] Checks on `addr_len` and `usax->sax25_ndigis` are insufficient. ax25_sendmsg() can go out of bounds when `usax->sax25_ndigis` equals to 7 or 8. Fix it. It is safe to remove `usax->sax25_ndigis > AX25_MAX_DIGIS`, since

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