[PATCH 5.0 091/101] nvme-multipath: relax ANA state check

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit cc2278c413c3a06a93c23ee8722e4dd3d621de12 ] When undergoing state transitions I/O might be requeued, hence we should always call nvme_mpath_set_live() to schedule requeue_work whenever the nvme device is live, independent on whether the old state was live or not. Signed-off-by: M

[PATCH 5.0 093/101] nvmet: fix error flow during ns enable

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit a536b49785759bf99465fdf6e248d34322123fcd ] In case we fail to enable p2pmem on the current namespace, disable the backing store device before exiting. Cc: Stephen Bates Signed-off-by: Max Gurtovoy Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin (Microsoft) --- d

[PATCH 5.0 070/101] leds: trigger: netdev: fix refcnt leak on interface rename

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 4cb6560514fa19d556954b88128f3846fee66a03 ] Renaming a netdev-trigger-tracked interface was resulting in an unbalanced dev_hold(). Example: > iw phy phy0 interface add foo type __ap > echo netdev > trigger > echo foo > device_name > ip link set foo name bar > iw dev bar del [ 23

[PATCH 5.0 098/101] kasan: fix variable tag set but not used warning

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit c412a769d2452161e97f163c4c4f31efc6626f06 ] set_tag() compiles away when CONFIG_KASAN_SW_TAGS=n, so make arch_kasan_set_tag() a static inline function to fix warnings below. mm/kasan/common.c: In function '__kasan_kmalloc': mm/kasan/common.c:475:5: warning: variable 'tag' set

[PATCH 5.0 099/101] ptrace: take into account saved_sigmask in PTRACE{GET,SET}SIGMASK

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit fcfc2aa0185f4a731d05a21e9f359968fdfd02e7 ] There are a few system calls (pselect, ppoll, etc) which replace a task sigmask while they are running in a kernel-space When a task calls one of these syscalls, the kernel saves a current sigmask in task->saved_sigmask and sets a sysca

[PATCH 5.0 076/101] x86/mm: Dont exceed the valid physical address space

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 92c77f7c4d5dfaaf45b2ce19360e69977c264766 ] valid_phys_addr_range() is used to sanity check the physical address range of an operation, e.g., access to /dev/mem. It uses __pa(high_memory) internally. If memory is populated at the end of the physical address space, then __pa(high_

[PATCH 5.0 101/101] leds: trigger: netdev: use memcpy in device_name_store

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 909346433064b8d840dc82af26161926b8d37558 ] If userspace doesn't end the input with a newline (which can easily happen if the write happens from a C program that does write(fd, iface, strlen(iface))), we may end up including garbage from a previous, longer value in the device_name

[PATCH 5.0 067/101] scsi: aacraid: Insure we dont access PCIe space during AER/EEH

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit b6554cfe09e1f610aed7d57164ab7760be57acd9 ] There are a few windows during AER/EEH when we can access PCIe I/O mapped registers. This will harden the access to insure we do not allow PCIe access during errors Signed-off-by: Dave Carroll Reviewed-by: Sagar Biradar Signed-off-by:

[PATCH 5.0 072/101] x86/realmode: Dont leak the trampoline kernel address

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit b929a500d68479163c48739d809cbf4c1335db6f ] Since commit ad67b74d2469 ("printk: hash addresses printed with %p") at boot "ptrval" is printed instead of the trampoline addresses: Base memory trampoline at [(ptrval)] 99000 size 24576 Remove the print as we do

[PATCH 5.0 100/101] leds: pca9532: fix a potential NULL pointer dereference

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 0aab8e4df4702b31314a27ec4b0631dfad0fae0a ] In case of_match_device cannot find a match, return -EINVAL to avoid NULL pointer dereference. Fixes: fa4191a609f2 ("leds: pca9532: Add device tree support") Signed-off-by: Kangjie Lu Signed-off-by: Jacek Anaszewski Signed-off-by: Sas

[PATCH 5.0 074/101] ceph: fix use-after-free on symlink traversal

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit daf5cc27eed99afdea8d96e71b89ba41f5406ef6 ] free the symlink body after the same RCU delay we have for freeing the struct inode itself, so that traversal during RCU pathwalk wouldn't step into freed memory. Signed-off-by: Al Viro Reviewed-by: Jeff Layton Signed-off-by: Ilya Dry

[PATCH 5.0 073/101] usb: u132-hcd: fix resource leak

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit f276e002793cdb820862e8ea8f76769d56bba575 ] if platform_driver_register fails, cleanup the allocated resource gracefully. Signed-off-by: Mukesh Ojha Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin (Microsoft) --- drivers/usb/host/u132-hcd.c | 3 +++ 1 file change

[PATCH 5.0 094/101] perf cs-etm: Add missing case value

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit c8fa7a807f3c5f946bd92076fbaf7826edb650dc ] The following error was thrown when compiling `tools/perf` using OpenCSD v0.11.1. This patch fixes said error. CC util/intel-pt-decoder/intel-pt-log.o CC util/cs-etm-decoder/cs-etm-decoder.o util/cs-etm-decoder/cs-

[PATCH 5.0 096/101] kconfig/[mn]conf: handle backspace (^H) key

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 9c38f1f044080392603c497ecca4d7d09876ff99 ] Backspace is not working on some terminal emulators which do not send the key code defined by terminfo. Terminals either send '^H' (8) or '^?' (127). But currently only '^?' is handled. Let's also handle '^H' for those terminals. Signed

[PATCH 5.0 095/101] perf machine: Update kernel map address and re-order properly

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 977c7a6d1e263ff1d755f28595b99e4bc0c48a9f ] Since commit 1fb87b8e9599 ("perf machine: Don't search for active kernel start in __machine__create_kernel_maps"), the __machine__create_kernel_maps() just create a map what start and end are both zero. Though the address will be updated

[PATCH 5.0 097/101] iommu/amd: Reserve exclusion range in iova-domain

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 8aafaaf2212192012f5bae305bb31cdf7681d777 ] If a device has an exclusion range specified in the IVRS table, this region needs to be reserved in the iova-domain of that device. This hasn't happened until now and can cause data corruption on data transfered with these devices. Trea

[PATCH 5.0 071/101] SUNRPC: fix uninitialized variable warning

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 01f2f5b82a2b523ae76af53f2ff43c48dde10a00 ] Avoid following compiler warning on uninitialized variable net/sunrpc/xprtsock.c: In function ‘xs_read_stream_request.constprop’: net/sunrpc/xprtsock.c:525:10: warning: ‘read’ may be used uninitialized in this function [-Wmaybe-uniniti

[PATCH 5.0 087/101] KVM: selftests: explicitly disable PIE for tests

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 0a3f29b5a77d6c27796d7a7adabafd199dc066d5 ] KVM selftests embed the guest "image" as a function in the test itself and extract the guest code at runtime by manually parsing the elf headers. The parsing is very simple and doesn't supporting fancy things like position independent e

[PATCH 5.0 090/101] gpio: of: Fix of_gpiochip_add() error path

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit f7299d441a4da8a5088e651ea55023525a793a13 ] If the call to of_gpiochip_scan_gpios() in of_gpiochip_add() fails, no error handling is performed. This lead to the need of callers to call of_gpiochip_remove() on failure, which causes "BAD of_node_put() on ..." if the failure happene

[PATCH 5.0 083/101] KVM: SVM: Workaround errata#1096 (insn_len maybe zero on SMAP violation)

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 05d5a48635259e621ea26d01e8316c6feeb34190 ] Errata#1096: On a nested data page fault when CR.SMAP=1 and the guest data read generates a SMAP violation, GuestInstrBytes field of the VMCB on a VMEXIT will incorrectly return 0h instead the correct guest instruction bytes . Recommen

[PATCH 5.0 085/101] x86/kvm/hyper-v: avoid spurious pending stimer on vCPU init

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 013cc6ebbf41496ce4badedd71ea6d4a6d198c14 ] When userspace initializes guest vCPUs it may want to zero all supported MSRs including Hyper-V related ones including HV_X64_MSR_STIMERn_CONFIG/ HV_X64_MSR_STIMERn_COUNT. With commit f3b138c5d89a ("kvm/x86: Update SynIC timers on guest

[PATCH 5.0 082/101] KVM: nVMX: Do not inherit quadrant and invalid for the root shadow EPT

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 552c69b1dc714854a5f4e27d37a43c6d797adf7d ] Explicitly zero out quadrant and invalid instead of inheriting them from the root_mmu. Functionally, this patch is a nop as we (should) never set quadrant for a direct mapped (EPT) root_mmu and nested EPT is only allowed if EPT is used

[PATCH 5.0 028/101] ARM: imx51: fix a leaked reference by adding missing of_node_put

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 0c17e83fe423467e3ccf0a02f99bd050a73bbeb4 ] The call to of_get_next_child returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./arch/arm/mach-imx/mach-imx51.c:64:2-8: ERR

[PATCH 5.0 066/101] scsi: mpt3sas: Fix kernel panic during expander reset

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit c2fe742ff6e77c5b4fe4ad273191ddf28fdea25e ] During expander reset handling, the driver invokes kernel function scsi_host_find_tag() to obtain outstanding requests associated with the scsi host managed by the driver. Driver loops from tag value zero to hba queue depth to obtain the

[PATCH 5.0 075/101] scsi: zfcp: reduce flood of fcrscn1 trace records on multi-element RSCN

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit c8206579175c34a2546de8a74262456278a7795a ] If an incoming ELS of type RSCN contains more than one element, zfcp suboptimally causes repeated erp trigger NOP trace records for each previously failed port. These could be ports that went away. It loops over each RSCN element, and f

Re: [PATCH] serial: 8250: Add support for using platform_device resources

2019-05-02 Thread Andy Shevchenko
On Thu, May 02, 2019 at 02:41:45PM +0200, Esben Haabendal wrote: > Hi Lee > > Could you help clarify whether or not this patch is trying to do > something odd/wrong? > > I might be misunderstanding Andy (probably is), but the discussion > revolves around the changes I propose where I change the s

[PATCH 5.0 037/101] usb: gadget: net2280: Fix net2280_dequeue()

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit f1d3fba17cd4eeea20397f1324b7b9c69a6a935c ] When a request must be dequeued with net2280_dequeue() e.g. due to a device clear action and the same request is finished by the function scan_dma_completions() then the function net2280_dequeue() does not find the request in the followi

[PATCH 5.0 034/101] KVM: arm/arm64: vgic-its: Take the srcu lock when parsing the memslots

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 7494cec6cb3ba7385a6a223b81906384f15aae34 ] Calling kvm_is_visible_gfn() implies that we're parsing the memslots, and doing this without the srcu lock is frown upon: [12704.164532] = [12704.164544] WARNING: suspicious RCU usage [12704.164560] 5.1.0-rc1

[PATCH 5.0 078/101] kbuild: skip parsing pre sub-make code for recursion

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 221cc2d27ddc49b3e06d4637db02bf78e70c573c ] When Make recurses to the top Makefile with sub-make-done unset, the code block surrounded by 'ifneq ($(sub-make-done),1) ... endif' is parsed multiple times. This happens for in-tree building of include/config/auto.conf, *-pkg, etc. wit

[PATCH 5.0 033/101] KVM: arm/arm64: vgic-its: Take the srcu lock when writing to guest memory

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit a6ecfb11bf37743c1ac49b266595582b107b61d4 ] When halting a guest, QEMU flushes the virtual ITS caches, which amounts to writing to the various tables that the guest has allocated. When doing this, we fail to take the srcu lock, and the kernel shouts loudly if running a lockdep ke

[PATCH 5.0 062/101] drm/meson: Uninstall IRQ handler

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 2d8f92897ad816f5dda54b2ed2fd9f2d7cb1abde ] meson_drv_unbind() doesn't unregister the IRQ handler, which can lead to use-after-free if the IRQ fires after unbind: [ 64.656876] Unable to handle kernel paging request at virtual address 11706dbc ... [ 64.662001] pc : me

[PATCH 5.0 064/101] sbitmap: order READ/WRITE freed instance and setting clear bit

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit e6d1fa584e0dd9bfebaf345e9feea588cf75ead2 ] Inside sbitmap_queue_clear(), once the clear bit is set, it will be visiable to allocation path immediately. Meantime READ/WRITE on old associated instance(such as request in case of blk-mq) may be out-of-order with the setting clear bit

[PATCH 5.0 031/101] KVM: arm64: Reset the PMU in preemptible context

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit ebff0b0e3d3c862c16c487959db5e0d879632559 ] We've become very cautious to now always reset the vcpu when nothing is loaded on the physical CPU. To do so, we now disable preemption and do a kvm_arch_vcpu_put() to make sure we have all the state in memory (and that it won't be loade

[PATCH] kasan: Zero initialize tag in __kasan_kmalloc

2019-05-02 Thread Nathan Chancellor
When building with -Wuninitialized and CONFIG_KASAN_SW_TAGS unset, Clang warns: mm/kasan/common.c:484:40: warning: variable 'tag' is uninitialized when used here [-Wuninitialized] kasan_unpoison_shadow(set_tag(object, tag), size); ^~~ set_tag

[PATCH 5.0 050/101] net: phy: Add DP83825I to the DP83822 driver

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 06acc17a96215a11134114aee26532b12dc8fde1 ] Add the DP83825I ethernet PHY to the DP83822 driver. These devices share the same WoL register bits and addresses. The phy_driver init was made into a macro as there may be future devices appended to this driver that will share the regi

[PATCH 5.0 052/101] net/sched: dont dereference a->goto_chain to read the chain index

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit fe384e2fa36ca084a456fd3055875b4b3fbd ] callers of tcf_gact_goto_chain_index() can potentially read an old value of the chain index, or even dereference a NULL 'goto_chain' pointer, because 'goto_chain' and 'tcfa_action' are read in the traffic path without caring of concurren

[PATCH 5.0 048/101] staging: rtl8712: uninitialized memory in read_bbreg_hdl()

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 22c971db7dd4b0ad8dd88e99c407f7a1f4231a2e ] Colin King reported a bug in read_bbreg_hdl(): memcpy(pcmd->rsp, (u8 *)&val, pcmd->rspsz); The problem is that "val" is uninitialized. This code is obviously not useful, but so far as I can tell "pcmd->cmdcode" is never GEN_CM

[PATCH 5.0 047/101] staging: rtlwifi: rtl8822b: fix to avoid potential NULL pointer dereference

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit d70d70aec9632679dd00dcc1b1e8b2517e2c7da0 ] skb allocated via dev_alloc_skb can fail and return a NULL pointer. This patch avoids such a scenario and returns, consistent with other invocations. Signed-off-by: Aditya Pakki Reviewed-by: Mukesh Ojha Signed-off-by: Greg Kroah-Hartm

[PATCH 5.0 049/101] staging: rtlwifi: Fix potential NULL pointer dereference of kzalloc

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 6a8ca24590a2136921439b376c926c11a6effc0e ] phydm.internal is allocated using kzalloc which is used multiple times without a check for NULL pointer. This patch avoids such a scenario by returning 0, consistent with the failure case. Signed-off-by: Aditya Pakki Reviewed-by: Mukes

[PATCH 5.0 051/101] net: macb: Add null check for PCLK and HCLK

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit cd5afa91f078c0787be0a62b5ef90301c00b0271 ] Both PCLK and HCLK are "required" clocks according to macb devicetree documentation. There is a chance that devm_clk_get doesn't return a negative error but just a NULL clock structure instead. In such a case the driver proceeds as usual

[PATCH 5.0 046/101] staging: rtl8188eu: Fix potential NULL pointer dereference of kcalloc

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 7671ce0d92933762f469266daf43bd34d422d58c ] hwxmits is allocated via kcalloc and not checked for failure before its dereference. The patch fixes this problem by returning error upstream in rtl8723bs, rtl8188eu. Signed-off-by: Aditya Pakki Acked-by: Mukesh Ojha Reviewed-by: Hans

[PATCH 5.0 045/101] net: ks8851: Set initial carrier state to down

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 9624bafa5f6418b9ca5b3f66d1f6a6a2e8bf6d4c ] The ks8851 chip's initial carrier state is down. A Link Change Interrupt is signaled once interrupts are enabled if the carrier is up. The ks8851 driver has it backwards by assuming that the initial carrier state is up. The state is the

[PATCH 5.0 043/101] net: ks8851: Reassert reset pin if chip ID check fails

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 761cfa979a0c177d6c2d93ef5585cd79ae49a7d5 ] Commit 73fdeb82e963 ("net: ks8851: Add optional vdd_io regulator and reset gpio") amended the ks8851 driver to briefly assert the chip's reset pin on probe. It also amended the probe routine's error path to reassert the reset pin if a su

[PATCH 10/15] nios2: switch to generic version of pte allocation

2019-05-02 Thread Mike Rapoport
nios2 allocates kernel PTE pages with __get_free_pages(GFP_KERNEL | __GFP_ZERO, PTE_ORDER); and user page tables with pte = alloc_pages(GFP_KERNEL, PTE_ORDER); if (pte) clear_highpage(); The PTE_ORDER is hardwired to zero, which makes nios2 implementation

[PATCH 5.0 042/101] net: ks8851: Dequeue RX packets explicitly

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 536d3680fd2dab5c39857d62a3e084198fc74ff9 ] The ks8851 driver lets the chip auto-dequeue received packets once they have been read in full. It achieves that by setting the ADRFE flag in the RXQCR register ("Auto-Dequeue RXQ Frame Enable"). However if allocation of a packet's sock

[PATCH 5.0 040/101] i2c: i801: Add support for Intel Comet Lake

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 5cd1c56c42beb6d228cc8d4373fdc5f5ec78a5ad ] Add PCI ID for Intel Comet Lake PCH. Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin (Microsoft) --- Documentation/i2c/busses/i2c-i801 | 1 + drivers/i2c/busses/Kconfig

[PATCH 5.0 038/101] usb: gadget: net2272: Fix net2272_dequeue()

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 091dacc3cc10979ab0422f0a9f7fcc27eee97e69 ] Restore the status of ep->stopped in function net2272_dequeue(). When the given request is not found in the endpoint queue the function returns -EINVAL without restoring the state of ep->stopped. Thus the endpoint keeps blocked and does

[PATCH 00/15] introduce generic pte_{alloc,free}_one[_kernel]

2019-05-02 Thread Mike Rapoport
Hi, I've tried to trim down the recipients list, but it's still quite long, so sorry for the spam. Many architectures have similar, if not identical implementation of pte_alloc_one_kernel(), pte_alloc_one(), pte_free_kernel() and pte_free(). A while ago Anshuman suggested to introduce a common d

[PATCH 5.0 039/101] ARM: dts: pfla02: increase phy reset duration

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 032f85c9360fb1a08385c584c2c4ed114b33c260 ] Increase the reset duration to ensure correct phy functionality. The reset duration is taken from barebox commit 52fdd510de ("ARM: dts: pfla02: use long enough reset for ethernet phy"): Use a longer reset time for ethernet phy Micrel

[PATCH] perf/x86/amd: update generic hardware cache events for Family 17h

2019-05-02 Thread Phillips, Kim
From: Kim Phillips Add a new amd_hw_cache_event_ids_f17h assignment structure set for AMD families 17h and above, since a lot has changed. Specifically: L1 Data Cache The data cache access counter remains the same on Family 17h. For DC misses, PMCx041's definition changes with Family 17h, so

[PATCH 5.0 009/101] ARM: dts: bcm283x: Fix hdmi hpd gpio pull

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 544e784188f1dd7c797c70b213385e67d92005b6 ] Raspberry pi board model B revison 2 have the hot plug detector gpio active high (and not low as it was in the dts). Signed-off-by: Helen Koike Fixes: 49ac67e0c39c ("ARM: bcm2835: Add VC4 to the device tree.") Reviewed-by: Eric Anholt

[PATCH 5.0 000/101] 5.0.12-stable review

2019-05-02 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.0.12 release. There are 101 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 04 May 2019 02:32:10 PM UTC. Anything rec

[PATCH 5.0 006/101] mm: prevent get_user_pages() from overflowing page refcount

2019-05-02 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 8fde12ca79aff9b5ba951fce1a2641901b8d8e64 upstream. If the page refcount wraps around past zero, it will be freed while there are still four billion references to it. One of the possible avenues for an attacker to try to make this happen is by doing direct IO on a pag

[PATCH 5.0 007/101] fs: prevent page refcount overflow in pipe_buf_get

2019-05-02 Thread Greg Kroah-Hartman
From: Matthew Wilcox commit 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb upstream. Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All c

[PATCH 5.0 005/101] mm: add try_get_page() helper function

2019-05-02 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 88b1a17dfc3ed7728316478fae0f5ad508f50397 upstream. This is the same as the traditional 'get_page()' function, but instead of unconditionally incrementing the reference count of the page, it only does so if the count was "safe". It returns whether the reference count

[PATCH 5.0 004/101] mm: make page ref count overflow check tighter and more explicit

2019-05-02 Thread Greg Kroah-Hartman
From: Linus Torvalds commit f958d7b528b1b40c44cfda5eabe2d82760d868c3 upstream. We have a VM_BUG_ON() to check that the page reference count doesn't underflow (or get close to overflow) by checking the sign of the count. That's all fine, but we actually want to allow people to use a "get page re

[PATCH 06/15] hexagon: switch to generic version of pte allocation

2019-05-02 Thread Mike Rapoport
The hexagon implementation pte_alloc_one(), pte_alloc_one_kernel(), pte_free_kernel() and pte_free() is identical to the generic except of lack of __GFP_ACCOUNT for the user PTEs allocation. Switch hexagon to use generic version of these functions. Signed-off-by: Mike Rapoport --- arch/hexagon/

[PATCH 5.0 027/101] s390/qeth: fix race when initializing the IP address table

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 7221b727f0079a32aca91f657141e1de564d4b97 ] The ucast IP table is utilized by some of the L3-specific sysfs attributes that qeth_l3_create_device_attributes() provides. So initialize the table _before_ registering the attributes. Fixes: ebccc7397e4a ("s390/qeth: add missing hash

[PATCH 5.0 025/101] netfilter: fix NETFILTER_XT_TARGET_TEE dependencies

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit d1fa381033eb718df5c602f64b6e88676138dfc6 ] With NETFILTER_XT_TARGET_TEE=y and IP6_NF_IPTABLES=m, we get a link error when referencing the NF_DUP_IPV6 module: net/netfilter/xt_TEE.o: In function `tee_tg6': xt_TEE.c:(.text+0x14): undefined reference to `nf_dup_ipv6' The problem h

[PATCH 05/15] csky: switch to generic version of pte allocation

2019-05-02 Thread Mike Rapoport
The csky implementation pte_alloc_one(), pte_free_kernel() and pte_free() is identical to the generic except of lack of __GFP_ACCOUNT for the user PTEs allocation. Switch csky to use generic version of these functions. The csky implementation of pte_alloc_one_kernel() is not replaced because it d

[PATCH 5.0 024/101] netfilter: bridge: set skb transport_header before entering NF_INET_PRE_ROUTING

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit e166e4fdaced850bee3d5ee12a5740258fb30587 ] Since Commit 21d1196a35f5 ("ipv4: set transport header earlier"), skb->transport_header has been always set before entering INET netfilter. This patch is to set skb->transport_header for bridge before entering INET netfilter by bridge-nf

[PATCH 5.0 023/101] netfilter: nft_set_rbtree: check for inactive element after flag mismatch

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 05b7639da55fb9866a1f4b7e8995232a6323 ] Otherwise, we hit bogus ENOENT when removing elements. Fixes: e701001e7cbe ("netfilter: nft_rbtree: allow adjacent intervals with dynamic updates") Reported-by: Václav Zindulka Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Le

[PATCH 5.0 021/101] staging: axis-fifo: add CONFIG_OF dependency

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 1beea6204e2304dd11600791d8dad8e7350af6ad ] When building without CONFIG_OF, the compiler loses track of the flow control in axis_fifo_probe(), and thinks that many variables are used without an initialization even though we actually leave the function before the first use: drive

[PATCH 5.0 002/101] Revert "ACPICA: Clear status of GPEs before enabling them"

2019-05-02 Thread Greg Kroah-Hartman
From: Rafael J. Wysocki commit 2c2a2fb1e2a9256714338875bede6b7cbd4b9542 upstream. Revert commit c8b1917c8987 ("ACPICA: Clear status of GPEs before enabling them") that causes problems with Thunderbolt controllers to occur if a dock device is connected at init time (the xhci_hcd and thunderbolt m

[PATCH 5.0 017/101] net: stmmac: dont set own bit too early for jumbo frames

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 80acbed9f8fca1db3fbe915540b756f048aa0fd7 ] Commit 0e80bdc9a72d ("stmmac: first frame prep at the end of xmit routine") overlooked jumbo frames when re-ordering the code, and as a result the own bit was not getting set anymore for the first jumbo frame descriptor. Commit 487e2e22a

[PATCH 5.0 019/101] qlcnic: Avoid potential NULL pointer dereference

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 5bf7295fe34a5251b1d241b9736af4697b590670 ] netdev_alloc_skb can fail and return a NULL pointer which is dereferenced without a check. The patch avoids such a scenario. Signed-off-by: Aditya Pakki Signed-off-by: David S. Miller Signed-off-by: Sasha Levin (Microsoft) --- drive

[PATCH 5.0 016/101] Btrfs: fix file corruption after snapshotting due to mix of buffered/DIO writes

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 609e804d771f59dc5d45a93e5ee0053c74bbe2bf ] When we are mixing buffered writes with direct IO writes against the same file and snapshotting is happening concurrently, we can end up with a corrupt file content in the snapshot. Example: 1) Inode/file is empty. 2) Snapshotting star

[PATCH 4.19 58/72] leds: trigger: netdev: fix refcnt leak on interface rename

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 4cb6560514fa19d556954b88128f3846fee66a03 ] Renaming a netdev-trigger-tracked interface was resulting in an unbalanced dev_hold(). Example: > iw phy phy0 interface add foo type __ap > echo netdev > trigger > echo foo > device_name > ip link set foo name bar > iw dev bar del [ 23

Re: [PATCH net-next 1/3] genetlink: do not validate dump requests if there is no policy

2019-05-02 Thread Johannes Berg
On Thu, 2019-05-02 at 07:36 -0600, David Ahern wrote: > On 5/2/19 7:32 AM, Michal Kubecek wrote: > > Wouldn't it mean effecitvely ending up with only one command (in > > genetlink sense) and having to distinguish actual commands with > > atributes? Even if I wanted to have just "get" and "set" comm

[PATCH 5.0 011/101] mt76x02: fix hdr pointer in write txwi for USB

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 7b25d3b8e485c7721cba9c71b44d1c286e61c8e7 ] Since we add txwi at the begining of skb->data, it no longer point to ieee80211_hdr. This breaks settings TS bit for probe response and beacons. Acked-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau

[PATCH 4.19 49/72] drm: Fix drm_release() and device unplug

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 3f04e0a6cfebf48152ac64502346cdc258811f79 ] If userspace has open fd(s) when drm_dev_unplug() is run, it will result in drm_dev_unregister() being called twice. First in drm_dev_unplug() and then later in drm_release() through the call to drm_put_dev(). Since userspace already ho

[PATCH 5.0 013/101] mt76: mt76x2: fix 2.4 GHz channel gain settings

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit b8cfd87ac24273e36fbd3ecda631f3ba6566d493 ] AGC register 35, 37 override for the low gain setting should only be done on 5 GHz. Also, 2.4 GHz needs a different value for register 35 Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin (Microsoft) --- .../net/wireless/mediat

[PATCH 4.19 57/72] usb: usb251xb: fix to avoid potential NULL pointer dereference

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 41f00e6e9e55546390031996b773e7f3c1d95928 ] of_match_device in usb251xb_probe can fail and returns a NULL pointer. The patch avoids a potential NULL pointer dereference in this scenario. Signed-off-by: Aditya Pakki Reviewed-by: Richard Leitner Signed-off-by: Greg Kroah-Hartman

Re: [PATCH] x86/fpu: Remove the _GPL from the kernel_fpu_begin/end() export

2019-05-02 Thread Sebastian Andrzej Siewior
On 2019-05-02 07:42:14 [-0700], Andy Lutomirski wrote: > The FPU is not a super-Linuxy internal detail, so remove the _GPL > from its export. Without something like this patch, it's impossible > for even highly license-respecting non-GPL modules to use the FPU, > which seems silly to me. After al

[PATCH 4.19 53/72] ARM: davinci: fix build failure with allnoconfig

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 2dbed152e2d4c3fe2442284918d14797898b1e8a ] allnoconfig build with just ARCH_DAVINCI enabled fails because drivers/clk/davinci/* depends on REGMAP being enabled. Fix it by selecting REGMAP_MMIO when building in DaVinci support. Signed-off-by: Sekhar Nori Reviewed-by: David Lech

[PATCH 4.19 69/72] iommu/amd: Reserve exclusion range in iova-domain

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 8aafaaf2212192012f5bae305bb31cdf7681d777 ] If a device has an exclusion range specified in the IVRS table, this region needs to be reserved in the iova-domain of that device. This hasn't happened until now and can cause data corruption on data transfered with these devices. Trea

Re: [PATCH] ARC: [plat-hsdk]: Add missing multicast filter bins number to GMAC node

2019-05-02 Thread Vineet Gupta
+CC Alexey, Eugeniy who maintain hsdk support ! On 5/2/19 8:12 AM, Jose Abreu wrote: > GMAC controller on HSDK boards supports 256 Hash Table size so we need to > add the multicast filter bins property. This allows for the Hash filter > to work properly using stmmac driver. > > Signed-off-by: Jos

Re: perf tools build broken after v5.1-rc1

2019-05-02 Thread Arnaldo Carvalho de Melo
Em Thu, May 02, 2019 at 10:36:18AM -0400, Arnaldo Carvalho de Melo escreveu: > Em Wed, May 01, 2019 at 09:17:52PM +, Vineet Gupta escreveu: > > On 5/1/19 1:41 PM, Arnaldo Carvalho de Melo wrote: > > >> The 1a787fc5ba18ac7 commit copied over the changes for arm64, but > > >> missed all the other

Re: [PATCH 21/24] sg: switch to SPDX tags

2019-05-02 Thread Douglas Gilbert
On 2019-05-01 6:14 p.m., Christoph Hellwig wrote: Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. IOWs replace 3.5 lines with 1. Signed-off-by: Christoph Hellwig Acked-by: Douglas Gilbert --- drivers/scsi/sg.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions

[PATCH 4.19 71/72] leds: pca9532: fix a potential NULL pointer dereference

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 0aab8e4df4702b31314a27ec4b0631dfad0fae0a ] In case of_match_device cannot find a match, return -EINVAL to avoid NULL pointer dereference. Fixes: fa4191a609f2 ("leds: pca9532: Add device tree support") Signed-off-by: Kangjie Lu Signed-off-by: Jacek Anaszewski Signed-off-by: Sas

[PATCH 4.19 66/72] nvme-multipath: relax ANA state check

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit cc2278c413c3a06a93c23ee8722e4dd3d621de12 ] When undergoing state transitions I/O might be requeued, hence we should always call nvme_mpath_set_live() to schedule requeue_work whenever the nvme device is live, independent on whether the old state was live or not. Signed-off-by: M

[PATCH 4.19 65/72] gpio: of: Fix of_gpiochip_add() error path

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit f7299d441a4da8a5088e651ea55023525a793a13 ] If the call to of_gpiochip_scan_gpios() in of_gpiochip_add() fails, no error handling is performed. This lead to the need of callers to call of_gpiochip_remove() on failure, which causes "BAD of_node_put() on ..." if the failure happene

[PATCH 4.19 68/72] kconfig/[mn]conf: handle backspace (^H) key

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 9c38f1f044080392603c497ecca4d7d09876ff99 ] Backspace is not working on some terminal emulators which do not send the key code defined by terminfo. Terminals either send '^H' (8) or '^?' (127). But currently only '^?' is handled. Let's also handle '^H' for those terminals. Signed

[PATCH 4.19 18/72] netfilter: fix NETFILTER_XT_TARGET_TEE dependencies

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit d1fa381033eb718df5c602f64b6e88676138dfc6 ] With NETFILTER_XT_TARGET_TEE=y and IP6_NF_IPTABLES=m, we get a link error when referencing the NF_DUP_IPV6 module: net/netfilter/xt_TEE.o: In function `tee_tg6': xt_TEE.c:(.text+0x14): undefined reference to `nf_dup_ipv6' The problem h

[PATCH 4.19 10/72] ieee802154: hwsim: propagate genlmsg_reply return code

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 19b39a25388e71390e059906c979f87be4ef0c71 ] genlmsg_reply can fail, so propagate its return code Signed-off-by: Li RongQing Signed-off-by: Stefan Schmidt Signed-off-by: Sasha Levin (Microsoft) --- drivers/net/ieee802154/mac802154_hwsim.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH 4.19 19/72] netfilter: ip6t_srh: fix NULL pointer dereferences

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 6d65561f3d5ec933151939c543d006b79044e7a6 ] skb_header_pointer may return NULL. The current code dereference its return values without a NULL check. The fix inserts the checks to avoid NULL pointer dereferences. Fixes: 202a8ff545cc ("netfilter: add IPv6 segment routing header 's

[PATCH 4.19 59/72] x86/realmode: Dont leak the trampoline kernel address

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit b929a500d68479163c48739d809cbf4c1335db6f ] Since commit ad67b74d2469 ("printk: hash addresses printed with %p") at boot "ptrval" is printed instead of the trampoline addresses: Base memory trampoline at [(ptrval)] 99000 size 24576 Remove the print as we do

[PATCH 4.19 62/72] scsi: zfcp: reduce flood of fcrscn1 trace records on multi-element RSCN

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit c8206579175c34a2546de8a74262456278a7795a ] If an incoming ELS of type RSCN contains more than one element, zfcp suboptimally causes repeated erp trigger NOP trace records for each previously failed port. These could be ports that went away. It loops over each RSCN element, and f

Re: [RFC PATCH 2/2] mmc: sdhci: Quirk for AMD SDHC Device 0x7906

2019-05-02 Thread Raul Rangel
Ou Thu, May 02, 2019 at 09:32:16AM +0300, Adrian Hunter wrote: Gene or Chris, Can you sign off on the patch. Thanks, Raul > Cc: some AMD people > > On 1/05/19 8:54 PM, Raul E Rangel wrote: > > AMD SDHC 0x7906 requires a hard reset to clear all internal state. > > Otherwise it can get into a bad

[PATCH 4.19 14/72] staging: axis-fifo: add CONFIG_OF dependency

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 1beea6204e2304dd11600791d8dad8e7350af6ad ] When building without CONFIG_OF, the compiler loses track of the flow control in axis_fifo_probe(), and thinks that many variables are used without an initialization even though we actually leave the function before the first use: drive

[PATCH 4.19 48/72] net: ethernet: ti: fix possible object reference leak

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 75eac7b5f68b0a0671e795ac636457ee27cc11d8 ] The call to of_get_child_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/net/ethernet/ti/netcp_ethss.c:3

[PATCH 4.19 43/72] ARM: dts: imx6qdl: Fix typo in imx6qdl-icore-rqs.dtsi

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 41b37f4c0fa67185691bcbd30201cad566f2f0d1 ] This patch fixes a spelling typo. Signed-off-by: Masanari Iida Fixes: cc42603de320 ("ARM: dts: imx6q-icore-rqs: Add Engicam IMX6 Q7 initial support") Signed-off-by: Shawn Guo Signed-off-by: Sasha Levin (Microsoft) --- arch/arm/boot

[PATCH 4.19 45/72] NFS: Fix a typo in nfs_init_timeout_values()

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 5a698243930c441afccec04e4d5dc8febfd2b775 ] Specifying a retrans=0 mount parameter to a NFS/TCP mount, is inadvertently causing the NFS client to rewrite any specified timeout parameter to the default of 60 seconds. Fixes: a956beda19a6 ("NFS: Allow the mount option retrans=0") Si

[PATCH 4.19 32/72] i2c: i801: Add support for Intel Comet Lake

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 5cd1c56c42beb6d228cc8d4373fdc5f5ec78a5ad ] Add PCI ID for Intel Comet Lake PCH. Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin (Microsoft) --- Documentation/i2c/busses/i2c-i801 | 1 + drivers/i2c/busses/Kconfig

[PATCH 4.19 29/72] usb: gadget: net2280: Fix net2280_dequeue()

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit f1d3fba17cd4eeea20397f1324b7b9c69a6a935c ] When a request must be dequeued with net2280_dequeue() e.g. due to a device clear action and the same request is finished by the function scan_dma_completions() then the function net2280_dequeue() does not find the request in the followi

[PATCH 4.19 28/72] usb: gadget: net2280: Fix overrun of OUT messages

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 9d6a54c1430647355a5e23434881b2ca3d192b48 ] The OUT endpoint normally blocks (NAK) subsequent packets when a short packet was received and returns an incomplete queue entry to the gadget driver. Thereby the gadget driver can detect a short packet when reading queue entries with a

[PATCH 4.19 13/72] xsk: fix umem memory leak on cleanup

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 044175a06706d516aa42874bb44dbbfc3c4d20eb ] When the umem is cleaned up, the task that created it might already be gone. If the task was gone, the xdp_umem_release function did not free the pages member of struct xdp_umem. It turned out that the task lookup was not needed at all;

[PATCH 4.19 37/72] staging: rtl8188eu: Fix potential NULL pointer dereference of kcalloc

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 7671ce0d92933762f469266daf43bd34d422d58c ] hwxmits is allocated via kcalloc and not checked for failure before its dereference. The patch fixes this problem by returning error upstream in rtl8723bs, rtl8188eu. Signed-off-by: Aditya Pakki Acked-by: Mukesh Ojha Reviewed-by: Hans

[PATCH 4.19 34/72] net: ks8851: Reassert reset pin if chip ID check fails

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 761cfa979a0c177d6c2d93ef5585cd79ae49a7d5 ] Commit 73fdeb82e963 ("net: ks8851: Add optional vdd_io regulator and reset gpio") amended the ks8851 driver to briefly assert the chip's reset pin on probe. It also amended the probe routine's error path to reassert the reset pin if a su

[PATCH 4.19 39/72] staging: rtl8712: uninitialized memory in read_bbreg_hdl()

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 22c971db7dd4b0ad8dd88e99c407f7a1f4231a2e ] Colin King reported a bug in read_bbreg_hdl(): memcpy(pcmd->rsp, (u8 *)&val, pcmd->rspsz); The problem is that "val" is uninitialized. This code is obviously not useful, but so far as I can tell "pcmd->cmdcode" is never GEN_CM

<    1   2   3   4   5   6   7   8   9   >