[PATCH 4.14 17/45] mISDN: make sure device name is NUL terminated

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit ccfb62f27beb295103e9392462b20a6ed807d0ea ] The user can change the device_name with the IMSETDEVNAME ioctl, but we need to ensure that the user's name is NUL terminated. Otherwise it could result in a buffer overflow when we copy the name back to the user with IMGETDEVINFO ioctl

[PATCH 4.14 02/45] ax25: fix inconsistent lock state in ax25_destroy_timer

2019-06-20 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit d4d5d8e83c9616aeef28a2869cea49cc3fb35526 ] Before thread in process context uses bh_lock_sock() we must disable bh. sysbot reported : WARNING: inconsistent lock state 5.2.0-rc3+ #32 Not tainted inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. blkid/265

[PATCH 4.14 20/45] perf/ring_buffer: Add ordering to rb->nest increment

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3f9fbe9bd86c534eba2faf5d840fd44c6049f50e ] Similar to how decrementing rb->next too early can cause data_head to (temporarily) be observed to go backward, so too can this happen when we increment too late. This barrier() ensures the rb->head load happens after the increment, bot

[PATCH 4.14 23/45] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids); ^ ./incl

[PATCH 4.14 00/45] 4.14.129-stable review

2019-06-20 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.129 release. There are 45 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 22 Jun 2019 05:42:15 PM UTC. Anything re

[PATCH 4.14 08/45] sctp: Free cookie before we memdup a new one

2019-06-20 Thread Greg Kroah-Hartman
From: Neil Horman [ Upstream commit ce950f1050cece5e406a5cde723c69bba60e1b26 ] Based on comments from Xin, even after fixes for our recent syzbot report of cookie memory leaks, its possible to get a resend of an INIT chunk which would lead to us leaking cookie memory. To ensure that we don't le

[PATCH 4.14 32/45] KVM: PPC: Book3S HV: Dont take kvm->lock around kvm_for_each_vcpu

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 5a3f49364c3ffa1107bd88f8292406e98c5d206c ] Currently the HV KVM code takes the kvm->lock around calls to kvm_for_each_vcpu() and kvm_get_vcpu_by_id() (which can call kvm_for_each_vcpu() internally). However, that leads to a lock order inversion problem, because these are called

[PATCH 4.14 34/45] net: phy: dp83867: Set up RGMII TX delay

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 2b892649254fec01678c64f16427622b41fa27f4 ] PHY_INTERFACE_MODE_RGMII_RXID is less then TXID so code to set tx delay is never called. Fixes: 2a10154abcb75 ("net: phy: dp83867: Add TI dp83867 phy") Signed-off-by: Max Uvarov Cc: Florian Fainelli Reviewed-by: Florian Fainelli Sign

[PATCH 4.14 33/45] net: sh_eth: fix mdio access in sh_eth_close() for R-Car Gen2 and RZ/A1 SoCs

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 315ca92dd863fecbffc0bb52ae0ac11e0398726a ] The sh_eth_close() resets the MAC and then calls phy_stop() so that mdio read access result is incorrect without any error according to kernel trace like below: ifconfig-216 [003] .n.. 109.133124: mdio_access: ee70.ethernet-

[PATCH 4.14 37/45] scsi: scsi_dh_alua: Fix possible null-ptr-deref

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 12e750bc62044de096ab9a95201213fd912b9994 ] If alloc_workqueue fails in alua_init, it should return -ENOMEM, otherwise it will trigger null-ptr-deref while unloading module which calls destroy_workqueue dereference wq->lock like this: BUG: KASAN: null-ptr-deref in __lock_acquire+

[PATCH 4.14 36/45] scsi: smartpqi: properly set both the DMA mask and the coherent DMA mask

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 1d94f06e7f5df4064ef336b7b710f50143b64a53 ] When SME is enabled, the smartpqi driver won't work on the HP DL385 G10 machine, which causes the failure of kernel boot because it fails to allocate pqi error buffer. Please refer to the kernel log: [9.431749] usbcore: register

[PATCH 4.14 05/45] lapb: fixed leak of control-blocks.

2019-06-20 Thread Greg Kroah-Hartman
From: Jeremy Sowden [ Upstream commit 6be8e297f9bcea666ea85ac7a6cd9d52d6deaf92 ] lapb_register calls lapb_create_cb, which initializes the control- block's ref-count to one, and __lapb_insert_cb, which increments it when adding the new block to the list of blocks. lapb_unregister calls __lapb_r

[PATCH 4.14 06/45] neigh: fix use-after-free read in pneigh_get_next

2019-06-20 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit f3e92cb8e2eb8c27d109e6fd73d3a69a8c09e288 ] Nine years ago, I added RCU handling to neighbours, not pneighbours. (pneigh are not commonly used) Unfortunately I missed that /proc dump operations would use a common entry and exit point : neigh_seq_start() and n

[PATCH 4.14 24/45] net: aquantia: fix LRO with FCS error

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit eaeb3b7494ba9159323814a8ce8af06a9277d99b ] Driver stops producing skbs on ring if a packet with FCS error was coalesced into LRO session. Ring gets hang forever. Thats a logical error in driver processing descriptors: When rx_stat indicates MAC Error, next pointer and eop flags

[PATCH 4.14 39/45] mlxsw: spectrum: Prevent force of 56G

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 275e928f19117d22f6d26dee94548baf4041b773 ] Force of 56G is not supported by hardware in Ethernet devices. This configuration fails with a bad parameter error from firmware. Add check of this case. Instead of trying to set 56G with autoneg off, return a meaningful error. Fixes:

[PATCH 4.14 03/45] be2net: Fix number of Rx queues used for flow hashing

2019-06-20 Thread Greg Kroah-Hartman
From: Ivan Vecera [ Upstream commit 718f4a2537089ea41903bf357071306163bc7c04 ] Number of Rx queues used for flow hashing returned by the driver is incorrect and this bug prevents user to use the last Rx queue in indirection table. Let's say we have a NIC with 6 combined queues: [root@sm-03 ~]#

[PATCH 4.14 41/45] HID: wacom: Dont report anything prior to the tool entering range

2019-06-20 Thread Greg Kroah-Hartman
From: Jason Gerecke commit e92a7be7fe5b2510fa60965eaf25f9e3dc08b8cc upstream. If the tool spends some time in prox before entering range, a series of events (e.g. ABS_DISTANCE, MSC_SERIAL) can be sent before we or userspace have any clue about the pen whose data is being reported. We need to hol

[PATCH v2 0/3] net: fddi: skfp: Use PCI generic definitions instead of private duplicates

2019-06-20 Thread Puranjay Mohan
This patch series removes the private duplicates of PCI definitions in favour of generic definitions defined in pci_regs.h. This driver only uses one of the generic PCI definitons, i.e. PCI_REVISION_ID, which is included from pci_regs.h and its private version is removed from skfbi.h with all othe

[PATCH 4.14 43/45] coredump: fix race condition between collapse_huge_page() and core dumping

2019-06-20 Thread Greg Kroah-Hartman
From: Andrea Arcangeli commit 59ea6d06cfa9247b586a695c21f94afa7183af74 upstream. When fixing the race conditions between the coredump and the mmap_sem holders outside the context of the process, we focused on mmget_not_zero()/get_task_mm() callers in 04f5866e41fb70 ("coredump: fix race condition

[PATCH 4.14 45/45] Abort file_remove_privs() for non-reg. files

2019-06-20 Thread Greg Kroah-Hartman
From: Alexander Lochmann commit f69e749a49353d96af1a293f56b5b56de59c668a upstream. file_remove_privs() might be called for non-regular files, e.g. blkdev inode. There is no reason to do its job on things like blkdev inodes, pipes, or cdevs. Hence, abort if file does not refer to a regular inode.

[PATCH 4.14 29/45] perf record: Fix s390 missing module symbol and warning for non-root users

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 6738028dd57df064b969d8392c943ef3b3ae705d ] Command 'perf record' and 'perf report' on a system without kernel debuginfo packages uses /proc/kallsyms and /proc/modules to find addresses for kernel and module symbols. On x86 this works for root and non-root users. On s390, when in

[PATCH 4.14 25/45] i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit a0692f0eef91354b62c2b4c94954536536be5425 ] If I2C_M_RECV_LEN check failed, msgs[i].buf allocated by memdup_user will not be freed. Pump index up so it will be freed. Fixes: 838bfa6049fb ("i2c-dev: Add support for I2C_M_RECV_LEN") Signed-off-by: Yingjoe Chen Signed-off-by: Wolfr

[PATCH 4.14 28/45] perf data: Fix strncat may truncate build failure with recent gcc

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 97acec7df172cd1e450f81f5e293c0aa145a2797 ] This strncat() is safe because the buffer was allocated with zalloc(), however gcc doesn't know that. Since the string always has 4 non-null bytes, just use memcpy() here. CC /home/shawn/linux/tools/perf/util/data-convert-bt.o

[PATCH 4.14 27/45] configfs: Fix use-after-free when accessing sd->s_dentry

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit f6122ed2a4f9c9c1c073ddf6308d1b2ac10e0781 ] In the vfs_statx() context, during path lookup, the dentry gets added to sd->s_dentry via configfs_attach_attr(). In the end, vfs_statx() kills the dentry by calling path_put(), which invokes configfs_d_iput(). Ideally, this dentry must

[PATCH 4.14 31/45] KVM: PPC: Book3S: Use new mutex to synchronize access to rtas token list

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 1659e27d2bc1ef47b6d031abe01b467f18cb72d9 ] Currently the Book 3S KVM code uses kvm->lock to synchronize access to the kvm->arch.rtas_tokens list. Because this list is scanned inside kvmppc_rtas_hcall(), which is called with the vcpu mutex held, taking kvm->lock cause a lock inve

[PATCH 4.14 22/45] gpio: fix gpio-adp5588 build errors

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit e9646f0f5bb62b7d43f0968f39d536cfe7123b53 ] The gpio-adp5588 driver uses interfaces that are provided by GPIOLIB_IRQCHIP, so select that symbol in its Kconfig entry. Fixes these build errors: ../drivers/gpio/gpio-adp5588.c: In function ‘adp5588_irq_handler’: ../drivers/gpio/gpio

[PATCH 4.19 02/61] be2net: Fix number of Rx queues used for flow hashing

2019-06-20 Thread Greg Kroah-Hartman
From: Ivan Vecera [ Upstream commit 718f4a2537089ea41903bf357071306163bc7c04 ] Number of Rx queues used for flow hashing returned by the driver is incorrect and this bug prevents user to use the last Rx queue in indirection table. Let's say we have a NIC with 6 combined queues: [root@sm-03 ~]#

[PATCH 4.19 04/61] ipv6: flowlabel: fl6_sock_lookup() must use atomic_inc_not_zero

2019-06-20 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 65a3c497c0e965a552008db8bc2653f62bc925a1 ] Before taking a refcount, make sure the object is not already scheduled for deletion. Same fix is needed in ipv6_flowlabel_opt() Fixes: 18367681a10b ("ipv6 flowlabel: Convert np->ipv6_fl_list to RCU.") Signed-off-b

[PATCH 4.19 01/61] ax25: fix inconsistent lock state in ax25_destroy_timer

2019-06-20 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit d4d5d8e83c9616aeef28a2869cea49cc3fb35526 ] Before thread in process context uses bh_lock_sock() we must disable bh. sysbot reported : WARNING: inconsistent lock state 5.2.0-rc3+ #32 Not tainted inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. blkid/265

[PATCH 4.19 10/61] sctp: Free cookie before we memdup a new one

2019-06-20 Thread Greg Kroah-Hartman
From: Neil Horman [ Upstream commit ce950f1050cece5e406a5cde723c69bba60e1b26 ] Based on comments from Xin, even after fixes for our recent syzbot report of cookie memory leaks, its possible to get a resend of an INIT chunk which would lead to us leaking cookie memory. To ensure that we don't le

[PATCH 4.19 05/61] lapb: fixed leak of control-blocks.

2019-06-20 Thread Greg Kroah-Hartman
From: Jeremy Sowden [ Upstream commit 6be8e297f9bcea666ea85ac7a6cd9d52d6deaf92 ] lapb_register calls lapb_create_cb, which initializes the control- block's ref-count to one, and __lapb_insert_cb, which increments it when adding the new block to the list of blocks. lapb_unregister calls __lapb_r

[PATCH 4.19 06/61] neigh: fix use-after-free read in pneigh_get_next

2019-06-20 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit f3e92cb8e2eb8c27d109e6fd73d3a69a8c09e288 ] Nine years ago, I added RCU handling to neighbours, not pneighbours. (pneigh are not commonly used) Unfortunately I missed that /proc dump operations would use a common entry and exit point : neigh_seq_start() and n

[PATCH 4.19 20/61] ipvs: Fix use-after-free in ip_vs_in

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 719c7d563c17b150877cee03a4b812a424989dfa ] BUG: KASAN: use-after-free in ip_vs_in.part.29+0xe8/0xd20 [ip_vs] Read of size 4 at addr 8881e9b26e2c by task sshd/5603 CPU: 0 PID: 5603 Comm: sshd Not tainted 4.19.39+ #30 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 Call Trac

[PATCH 4.19 08/61] net: openvswitch: do not free vport if register_netdevice() is failed.

2019-06-20 Thread Greg Kroah-Hartman
From: Taehee Yoo [ Upstream commit 309b66970ee2abf721ecd0876a48940fa0b99a35 ] In order to create an internal vport, internal_dev_create() is used and that calls register_netdevice() internally. If register_netdevice() fails, it calls dev->priv_destructor() to free private data of netdev. actuall

[PATCH 4.19 00/61] 4.19.54-stable review

2019-06-20 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.54 release. There are 61 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 22 Jun 2019 05:42:15 PM UTC. Anything rec

[PATCH 4.19 07/61] net: dsa: rtl8366: Fix up VLAN filtering

2019-06-20 Thread Greg Kroah-Hartman
From: Linus Walleij [ Upstream commit 760c80b70bed2cd01630e8595d1bbde910339f31 ] We get this regression when using RTL8366RB as part of a bridge with OpenWrt: WARNING: CPU: 0 PID: 1347 at net/switchdev/switchdev.c:291 switchdev_port_attr_set_now+0x80/0xa4 lan0: Commit of attribute (id=

[PATCH 4.19 24/61] usb: xhci: Fix a potential null pointer dereference in xhci_debugfs_create_endpoint()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 5bce256f0b528624a34fe907db385133bb7be33e ] In xhci_debugfs_create_slot(), kzalloc() can fail and dev->debugfs_private will be NULL. In xhci_debugfs_create_endpoint(), dev->debugfs_private is used without any null-pointer check, and can cause a null pointer dereference. To fix th

[PATCH 4.19 23/61] powerpc/powernv: Return for invalid IMC domain

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit b59bd3527fe3c1939340df558d7f9d568fc9f882 ] Currently init_imc_pmu() can fail either because we try to register an IMC unit with an invalid domain (i.e an IMC node not supported by the kernel) or something went wrong while registering a valid IMC unit. In both the cases kernel pro

[PATCH 4.19 21/61] selftests: netfilter: missing error check when setting up veth interface

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 82ce6eb1dd13fd12e449b2ee2c2ec051e6f52c43 ] A test for the basic NAT functionality uses ip command which needs veth device. There is a condition where the kernel support for veth is not compiled into the kernel and the test script breaks. This patch contains code for reasonable er

[PATCH 4.19 22/61] clk: ti: clkctrl: Fix clkdm_clk handling

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 1cc54078d104f5b4d7e9f8d55362efa5a8daffdb ] We need to always call clkdm_clk_enable() and clkdm_clk_disable() even the clkctrl clock(s) enabled for the domain do not have any gate register bits. Otherwise clockdomains may never get enabled except when devices get probed with the l

[PATCH 4.19 25/61] mISDN: make sure device name is NUL terminated

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit ccfb62f27beb295103e9392462b20a6ed807d0ea ] The user can change the device_name with the IMSETDEVNAME ioctl, but we need to ensure that the user's name is NUL terminated. Otherwise it could result in a buffer overflow when we copy the name back to the user with IMGETDEVINFO ioctl

[PATCH 4.19 29/61] perf/ring-buffer: Always use {READ,WRITE}_ONCE() for rb->user_page data

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 4d839dd9e4356bbacf3eb0ab13a549b83b008c21 ] We must use {READ,WRITE}_ONCE() on rb->user_page data such that concurrent usage will see whole values. A few key sites were missing this. Suggested-by: Yabin Cui Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnal

[PATCH 4.19 34/61] drm/etnaviv: lock MMU while dumping core

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 1396500d673bd027683a0609ff84dca7eb6ea2e7 ] The devcoredump needs to operate on a stable state of the MMU while it is writing the MMU state to the coredump. The missing lock allowed both the userspace submit, as well as the GPU job finish paths to mutate the MMU state while a core

[PATCH 4.19 32/61] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids); ^ ./incl

[PATCH 4.19 26/61] x86/CPU/AMD: Dont force the CPB cap when running under a hypervisor

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 2ac44ab608705948564791ce1d15d43ba81a1e38 ] For F17h AMD CPUs, the CPB capability ('Core Performance Boost') is forcibly set, because some versions of that chip incorrectly report that they do not have it. However, a hypervisor may filter out the CPB capability, for good reasons

[PATCH 4.19 31/61] net: stmmac: update rx tail pointer register to fix rx dma hang issue.

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 4523a5611526709ec9b4e2574f1bb7818212651e ] Currently we will not update the receive descriptor tail pointer in stmmac_rx_refill. Rx dma will think no available descriptors and stop once received packets exceed DMA_RX_SIZE, so that the rx only test will fail. Update the receive t

[PATCH 4.19 11/61] sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg

2019-06-20 Thread Greg Kroah-Hartman
From: John Paul Adrian Glaubitz [ Upstream commit 07a6d63eb1b54b5fb38092780fe618dfe1d96e23 ] In d5a2aa24, the name in struct console sunhv_console was changed from "ttyS" to "ttyHV" while the name in struct uart_ops sunhv_pops remained unchanged. This results in the hypervisor console device to

[PATCH 4.19 37/61] i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit a0692f0eef91354b62c2b4c94954536536be5425 ] If I2C_M_RECV_LEN check failed, msgs[i].buf allocated by memdup_user will not be freed. Pump index up so it will be freed. Fixes: 838bfa6049fb ("i2c-dev: Add support for I2C_M_RECV_LEN") Signed-off-by: Yingjoe Chen Signed-off-by: Wolfr

[PATCH 4.19 28/61] perf/ring_buffer: Add ordering to rb->nest increment

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3f9fbe9bd86c534eba2faf5d840fd44c6049f50e ] Similar to how decrementing rb->next too early can cause data_head to (temporarily) be observed to go backward, so too can this happen when we increment too late. This barrier() ensures the rb->head load happens after the increment, bot

[PATCH 4.19 27/61] perf/ring_buffer: Fix exposing a temporarily decreased data_head

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 1b038c6e05ff70a1e66e3e571c2e6106bdb75f53 ] In perf_output_put_handle(), an IRQ/NMI can happen in below location and write records to the same ring buffer: ... local_dec_and_test(&rb->nest) ... <-- an IRQ/NMI can happen here

[PATCH 4.19 35/61] net: aquantia: tx clean budget logic error

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 31bafc49a7736989e4c2d9f7280002c66536e590 ] In case no other traffic happening on the ring, full tx cleanup may not be completed. That may cause socket buffer to overflow and tx traffic to stuck until next activity on the ring happens. This is due to logic error in budget variabl

[PATCH 4.19 18/61] perf/x86/intel/ds: Fix EVENT vs. UEVENT PEBS constraints

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 23e3983a466cd540ffdd2bbc6e0c51e31934f941 ] This patch fixes an bug revealed by the following commit: 6b89d4c1ae85 ("perf/x86/intel: Fix INTEL_FLAGS_EVENT_CONSTRAINT* masking") That patch modified INTEL_FLAGS_EVENT_CONSTRAINT() to only look at the event code when matching a c

[PATCH 4.19 39/61] configfs: Fix use-after-free when accessing sd->s_dentry

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit f6122ed2a4f9c9c1c073ddf6308d1b2ac10e0781 ] In the vfs_statx() context, during path lookup, the dentry gets added to sd->s_dentry via configfs_attach_attr(). In the end, vfs_statx() kills the dentry by calling path_put(), which invokes configfs_d_iput(). Ideally, this dentry must

[PATCH 4.19 48/61] arm64: fix syscall_fn_t type

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 8ef8f368ce72b5e17f7c1f1ef15c38dcfd0fef64 ] Syscall wrappers in use const struct pt_regs * as the argument type. Use const in syscall_fn_t as well to fix indirect call type mismatches with Control-Flow Integrity checking. Signed-off-by: Sami Tolvanen Reviewed-by: Mark Rutland

[PATCH 4.19 49/61] arm64: use the correct function type in SYSCALL_DEFINE0

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 0e358bd7b7ebd27e491dabed938eae254c17fe3b ] Although a syscall defined using SYSCALL_DEFINE0 doesn't accept parameters, use the correct function type to avoid indirect call type mismatches with Control-Flow Integrity checking. Signed-off-by: Sami Tolvanen Signed-off-by: Will Dea

[PATCH 4.19 13/61] vsock/virtio: set SOCK_DONE on peer shutdown

2019-06-20 Thread Greg Kroah-Hartman
From: Stephen Barber [ Upstream commit 42f5cda5eaf4396a939ae9bb43bb8d1d09c1b15c ] Set the SOCK_DONE flag to match the TCP_CLOSING state when a peer has shut down and there is nothing left to read. This fixes the following bug: 1) Peer sends SHUTDOWN(RDWR). 2) Socket enters TCP_CLOSING but SOCK_

[PATCH 4.19 17/61] Staging: vc04_services: Fix a couple error codes

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit ca4e4efbefbbdde0a7bb3023ea08d491f4daf9b9 ] These are accidentally returning positive EINVAL instead of negative -EINVAL. Some of the callers treat positive values as success. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Dan

[PATCH 4.19 51/61] net: sh_eth: fix mdio access in sh_eth_close() for R-Car Gen2 and RZ/A1 SoCs

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 315ca92dd863fecbffc0bb52ae0ac11e0398726a ] The sh_eth_close() resets the MAC and then calls phy_stop() so that mdio read access result is incorrect without any error according to kernel trace like below: ifconfig-216 [003] .n.. 109.133124: mdio_access: ee70.ethernet-

[PATCH 4.19 52/61] net: phylink: ensure consistent phy interface mode

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit c678726305b9425454be7c8a7624290b602602fc ] Ensure that we supply the same phy interface mode to mac_link_down() as we did for the corresponding mac_link_up() call. This ensures that MAC drivers that use the phy interface mode in these methods can depend on mac_link_down() always

[PATCH 4.19 56/61] scsi: scsi_dh_alua: Fix possible null-ptr-deref

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 12e750bc62044de096ab9a95201213fd912b9994 ] If alloc_workqueue fails in alua_init, it should return -ENOMEM, otherwise it will trigger null-ptr-deref while unloading module which calls destroy_workqueue dereference wq->lock like this: BUG: KASAN: null-ptr-deref in __lock_acquire+

[PATCH 4.19 54/61] scsi: libcxgbi: add a check for NULL pointer in cxgbi_check_route()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit cc555759117e8349088e0c5d19f2f2a500bafdbd ] ip_dev_find() can return NULL so add a check for NULL pointer. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/cxgbi/libcxgbi.c | 4 1 file changed, 4 insertions(+) di

[PATCH 4.19 40/61] perf data: Fix strncat may truncate build failure with recent gcc

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 97acec7df172cd1e450f81f5e293c0aa145a2797 ] This strncat() is safe because the buffer was allocated with zalloc(), however gcc doesn't know that. Since the string always has 4 non-null bytes, just use memcpy() here. CC /home/shawn/linux/tools/perf/util/data-convert-bt.o

[PATCH 4.19 61/61] Abort file_remove_privs() for non-reg. files

2019-06-20 Thread Greg Kroah-Hartman
From: Alexander Lochmann commit f69e749a49353d96af1a293f56b5b56de59c668a upstream. file_remove_privs() might be called for non-regular files, e.g. blkdev inode. There is no reason to do its job on things like blkdev inodes, pipes, or cdevs. Hence, abort if file does not refer to a regular inode.

[PATCH 4.19 41/61] perf namespace: Protect reading threads namespace

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 6584140ba9e6762dd7ec73795243289b914f31f9 ] It seems that the current code lacks holding the namespace lock in thread__namespaces(). Otherwise it can see inconsistent results. Signed-off-by: Namhyung Kim Cc: Hari Bathini Cc: Jiri Olsa Cc: Krister Johansen Link: http://lkml.k

[PATCH 4.19 44/61] xen/pvcalls: Remove set but not used variable

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 41349672e3cbc2e8349831f21253509c3415aa2b ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/xen/pvcalls-front.c: In function pvcalls_front_sendmsg: drivers/xen/pvcalls-front.c:543:25: warning: variable bedata set but not used [-Wunused-but-set-variable] drivers/xen/pvcall

[PATCH 5.1 12/98] sctp: Free cookie before we memdup a new one

2019-06-20 Thread Greg Kroah-Hartman
From: Neil Horman [ Upstream commit ce950f1050cece5e406a5cde723c69bba60e1b26 ] Based on comments from Xin, even after fixes for our recent syzbot report of cookie memory leaks, its possible to get a resend of an INIT chunk which would lead to us leaking cookie memory. To ensure that we don't le

[PATCH 5.1 02/98] ax25: fix inconsistent lock state in ax25_destroy_timer

2019-06-20 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit d4d5d8e83c9616aeef28a2869cea49cc3fb35526 ] Before thread in process context uses bh_lock_sock() we must disable bh. sysbot reported : WARNING: inconsistent lock state 5.2.0-rc3+ #32 Not tainted inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. blkid/265

[PATCH 5.1 10/98] net: tls, correctly account for copied bytes with multiple sk_msgs

2019-06-20 Thread Greg Kroah-Hartman
From: John Fastabend [ Upstream commit 648ee6cea7dde4a5cdf817e5d964fd60b22006a4 ] tls_sw_do_sendpage needs to return the total number of bytes sent regardless of how many sk_msgs are allocated. Unfortunately, copied (the value we return up the stack) is zero'd before each new sk_msg is allocated

[PATCH 4.19 43/61] ia64: fix build errors by exporting paddr_to_nid()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 9a626c4a6326da4433a0d4d4a8a7d1571caf1ed3 ] Fix build errors on ia64 when DISCONTIGMEM=y and NUMA=y by exporting paddr_to_nid(). Fixes these build errors: ERROR: "paddr_to_nid" [sound/core/snd-pcm.ko] undefined! ERROR: "paddr_to_nid" [net/sunrpc/sunrpc.ko] undefined! ERROR: "pad

[PATCH 4.19 38/61] ALSA: hda - Force polling mode on CNL for fixing codec communication

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit fa763f1b2858752e615046886a1b7faffc82 ] We observed the same issue as reported by commit a8d7bde23e7130686b7662 ("ALSA: hda - Force polling mode on CFL for fixing codec communication") We don't have a better solution. So apply the same workaround to CNL. Signed-off-by: Bard L

[PATCH 4.19 46/61] KVM: PPC: Book3S: Use new mutex to synchronize access to rtas token list

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 1659e27d2bc1ef47b6d031abe01b467f18cb72d9 ] Currently the Book 3S KVM code uses kvm->lock to synchronize access to the kvm->arch.rtas_tokens list. Because this list is scanned inside kvmppc_rtas_hcall(), which is called with the vcpu mutex held, taking kvm->lock cause a lock inve

[PATCH 4.19 42/61] perf record: Fix s390 missing module symbol and warning for non-root users

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 6738028dd57df064b969d8392c943ef3b3ae705d ] Command 'perf record' and 'perf report' on a system without kernel debuginfo packages uses /proc/kallsyms and /proc/modules to find addresses for kernel and module symbols. On x86 this works for root and non-root users. On s390, when in

Linux 3.16.69

2019-06-20 Thread Ben Hutchings
I'm announcing the release of the 3.16.69 kernel. All users of the 3.16 kernel series should upgrade. The updated 3.16.y git tree can be found at: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.16.y and can be browsed at the normal kernel.org git web brow

[PATCH 5.1 05/98] ipv6: flowlabel: fl6_sock_lookup() must use atomic_inc_not_zero

2019-06-20 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 65a3c497c0e965a552008db8bc2653f62bc925a1 ] Before taking a refcount, make sure the object is not already scheduled for deletion. Same fix is needed in ipv6_flowlabel_opt() Fixes: 18367681a10b ("ipv6 flowlabel: Convert np->ipv6_fl_list to RCU.") Signed-off-b

[PATCH 5.1 07/98] neigh: fix use-after-free read in pneigh_get_next

2019-06-20 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit f3e92cb8e2eb8c27d109e6fd73d3a69a8c09e288 ] Nine years ago, I added RCU handling to neighbours, not pneighbours. (pneigh are not commonly used) Unfortunately I missed that /proc dump operations would use a common entry and exit point : neigh_seq_start() and n

[PATCH 5.1 04/98] hv_netvsc: Set probe mode to sync

2019-06-20 Thread Greg Kroah-Hartman
From: Haiyang Zhang [ Upstream commit 9a33629ba6b26caebd73e3c581ba1e6068c696a7 ] For better consistency of synthetic NIC names, we set the probe mode to PROBE_FORCE_SYNCHRONOUS. So the names can be aligned with the vmbus channel offer sequence. Fixes: af0a5646cb8d ("use the new async probing fe

[PATCH 5.1 09/98] net: openvswitch: do not free vport if register_netdevice() is failed.

2019-06-20 Thread Greg Kroah-Hartman
From: Taehee Yoo [ Upstream commit 309b66970ee2abf721ecd0876a48940fa0b99a35 ] In order to create an internal vport, internal_dev_create() is used and that calls register_netdevice() internally. If register_netdevice() fails, it calls dev->priv_destructor() to free private data of netdev. actuall

Re: [PATCH][next] lkdtm: remove redundant initialization of ret

2019-06-20 Thread Kees Cook
On Fri, Jun 14, 2019 at 10:43:11AM +0100, Colin King wrote: > From: Colin Ian King > > The variable ret is being initialized with the value -EINVAL however > this value is never read and ret is being re-assigned later on. Hence > the initialization is redundant and can be removed. > > Addresses-

[PATCH 5.1 27/98] net/mlx5e: Fix source port matching in fdb peer flow rule

2019-06-20 Thread Greg Kroah-Hartman
From: Raed Salem The cited commit changed the initialization placement of the eswitch attributes so it is done prior to parse tc actions function call, including among others the in_rep and in_mdev fields which are mistakenly reassigned inside the parse actions function. This breaks the source p

[PATCH 5.1 26/98] mlxsw: spectrum_flower: Fix TOS matching

2019-06-20 Thread Greg Kroah-Hartman
From: Jiri Pirko The TOS value was not extracted correctly. Fix it. Fixes: 87996f91f739 ("mlxsw: spectrum_flower: Add support for ip tos") Reported-by: Alexander Petrovskiy Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman

[PATCH 5.1 25/98] net/mlx5e: Add ndo_set_feature for uplink representor

2019-06-20 Thread Greg Kroah-Hartman
From: Chris Mi After we have a dedicated uplink representor, the new netdev ops doesn't support ndo_set_feature. Because of that, we can't change some features, eg. rxvlan. Now add it back. In this patch, I also do a cleanup for the features flag handling, eg. remove duplicate NETIF_F_HW_TC flag

[PATCH 5.1 28/98] mlxsw: spectrum_buffers: Reduce pool size on Spectrum-2

2019-06-20 Thread Greg Kroah-Hartman
From: Petr Machata Due to an issue on Spectrum-2, in front-panel ports split four ways, 2 out of 32 port buffers cannot be used. To work around this, the next FW release will mark them as unused, and will report correspondingly lower total shared buffer size. mlxsw will pick up the new value thro

[PATCH 5.1 29/98] net/mlx5e: Support tagged tunnel over bond

2019-06-20 Thread Greg Kroah-Hartman
From: Eli Britstein Stacked devices like bond interface may have a VLAN device on top of them. Detect lag state correctly under this condition, and return the correct routed net device, according to it the encap header is built. Fixes: e32ee6c78efa ("net/mlx5e: Support tunnel encap over tagged E

[PATCH 5.1 30/98] net: correct udp zerocopy refcnt also when zerocopy only on append

2019-06-20 Thread Greg Kroah-Hartman
From: Willem de Bruijn [ Upstream commit 522924b583082f51b8a2406624a2f27c22119b20 ] The below patch fixes an incorrect zerocopy refcnt increment when appending with MSG_MORE to an existing zerocopy udp skb. send(.., MSG_ZEROCOPY | MSG_MORE);// refcnt 1 send(.., MSG_ZEROCOPY | MSG_MORE);

[PATCH 5.1 15/98] vsock/virtio: set SOCK_DONE on peer shutdown

2019-06-20 Thread Greg Kroah-Hartman
From: Stephen Barber [ Upstream commit 42f5cda5eaf4396a939ae9bb43bb8d1d09c1b15c ] Set the SOCK_DONE flag to match the TCP_CLOSING state when a peer has shut down and there is nothing left to read. This fixes the following bug: 1) Peer sends SHUTDOWN(RDWR). 2) Socket enters TCP_CLOSING but SOCK_

[PATCH 5.1 33/98] staging: erofs: set sb->s_root to NULL when failing from __getname()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit f2dcb8841e6b155da098edae09125859ef7e853d ] Set sb->s_root to NULL when failing from __getname(), so that we can avoid double dput and unnecessary operations in generic_shutdown_super(). Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Gr

[PATCH 5.1 37/98] netfilter: nf_tables: fix oops during rule dump

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 2c82c7e724ff51cab78e1afd5c2aaa31994fe41e ] We can oops in nf_tables_fill_rule_info(). Its not possible to fetch previous element in rcu-protected lists when deletions are not prevented somehow: list_del_rcu poisons the ->prev pointer value. Before rcu-conversion this was safe a

[PATCH 5.1 22/98] net: ethtool: Allow matching on vlan DEI bit

2019-06-20 Thread Greg Kroah-Hartman
From: Maxime Chevallier [ Upstream commit f0d2ca1531377e7da888913e277eefac05a59b6f ] Using ethtool, users can specify a classification action matching on the full vlan tag, which includes the DEI bit (also previously called CFI). However, when converting the ethool_flow_spec to a flow_rule, we

[PATCH 5.1 38/98] perf/x86/intel/ds: Fix EVENT vs. UEVENT PEBS constraints

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 23e3983a466cd540ffdd2bbc6e0c51e31934f941 ] This patch fixes an bug revealed by the following commit: 6b89d4c1ae85 ("perf/x86/intel: Fix INTEL_FLAGS_EVENT_CONSTRAINT* masking") That patch modified INTEL_FLAGS_EVENT_CONSTRAINT() to only look at the event code when matching a c

[PATCH 5.1 42/98] selftests: netfilter: missing error check when setting up veth interface

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 82ce6eb1dd13fd12e449b2ee2c2ec051e6f52c43 ] A test for the basic NAT functionality uses ip command which needs veth device. There is a condition where the kernel support for veth is not compiled into the kernel and the test script breaks. This patch contains code for reasonable er

[PATCH 5.1 13/98] sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg

2019-06-20 Thread Greg Kroah-Hartman
From: John Paul Adrian Glaubitz [ Upstream commit 07a6d63eb1b54b5fb38092780fe618dfe1d96e23 ] In d5a2aa24, the name in struct console sunhv_console was changed from "ttyS" to "ttyHV" while the name in struct uart_ops sunhv_pops remained unchanged. This results in the hypervisor console device to

[PATCH 5.1 41/98] ipvs: Fix use-after-free in ip_vs_in

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 719c7d563c17b150877cee03a4b812a424989dfa ] BUG: KASAN: use-after-free in ip_vs_in.part.29+0xe8/0xd20 [ip_vs] Read of size 4 at addr 8881e9b26e2c by task sshd/5603 CPU: 0 PID: 5603 Comm: sshd Not tainted 4.19.39+ #30 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 Call Trac

[PATCH 5.1 34/98] Staging: vc04_services: Fix a couple error codes

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit ca4e4efbefbbdde0a7bb3023ea08d491f4daf9b9 ] These are accidentally returning positive EINVAL instead of negative -EINVAL. Some of the callers treat positive values as success. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Dan

[PATCH 5.1 35/98] staging: wilc1000: Fix some double unlock bugs in wilc_wlan_cleanup()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit fea69916360468e364a4988db25a5afa835f3406 ] If ->hif_read_reg() or ->hif_write_reg() fail then the code unlocks and keeps executing. It should just return. Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Dan Carpenter Signed-off-by: Greg Kro

[PATCH 5.1 20/98] net: mvpp2: prs: Use the correct helpers when removing all VID filters

2019-06-20 Thread Greg Kroah-Hartman
From: Maxime Chevallier [ Upstream commit 6b7a3430c163455cf8a514d636bda52b04654972 ] When removing all VID filters, the mvpp2_prs_vid_entry_remove would be called with the TCAM id incorrectly used as a VID, causing the wrong TCAM entries to be invalidated. Fix this by directly invalidating entr

[PATCH 5.1 55/98] io_uring: Fix __io_uring_register() false success

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit a278682dad37fd2f8d2f30d8e84e376a856ab472 ] If io_copy_iov() fails, it will break the loop and report success, albeit partially completed operation. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- fs/io_uring.c | 2 +- 1 file changed, 1

[PATCH 5.1 36/98] pinctrl: intel: Clear interrupt status in mask/unmask callback

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 670784fb4ebe54434e263837390e358405031d9e ] Commit a939bb57cd47 ("pinctrl: intel: implement gpio_irq_enable") was added because clearing interrupt status bit is required to avoid unexpected behavior. Turns out the unmask callback also needs the fix, which can solve weird IRQ trig

[PATCH 5.1 61/98] net: aquantia: tx clean budget logic error

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 31bafc49a7736989e4c2d9f7280002c66536e590 ] In case no other traffic happening on the ring, full tx cleanup may not be completed. That may cause socket buffer to overflow and tx traffic to stuck until next activity on the ring happens. This is due to logic error in budget variabl

[PATCH 5.1 59/98] ACPI/PCI: PM: Add missing wakeup.flags.valid checks

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 9a51c6b1f9e0239a9435db036b212498a2a3b75c ] Both acpi_pci_need_resume() and acpi_dev_needs_resume() check if the current ACPI wakeup configuration of the device matches what is expected as far as system wakeup from sleep states is concerned, as reflected by the device_may_wakeup()

[PATCH 5.1 63/98] i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit a0692f0eef91354b62c2b4c94954536536be5425 ] If I2C_M_RECV_LEN check failed, msgs[i].buf allocated by memdup_user will not be freed. Pump index up so it will be freed. Fixes: 838bfa6049fb ("i2c-dev: Add support for I2C_M_RECV_LEN") Signed-off-by: Yingjoe Chen Signed-off-by: Wolfr

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