[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

[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 *), 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

[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

[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

[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 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

[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 :

[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

[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

[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]

[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.

[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

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

[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

[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

[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:

[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 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 .

[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

[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

[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

[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.

[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

[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.

[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

[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

[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

[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:

[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

[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

[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

[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

[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'

[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

[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 [

[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) ---

[PATCH 5.0 092/101] nvmet: fix building bvec from sg list

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 02db99548d3608a625cf481cff2bb7b626829b3f ] There are two mistakes for building bvec from sg list for file backed ns: - use request data length to compute number of io vector, this way doesn't consider sg->offset, and the result may be smaller than required io vectors -

[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:

[PATCH 5.0 088/101] KVM: selftests: disable stack protector for all KVM tests

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit ffac839d040619847217647434b2b02469926871 ] Since 4.8.3, gcc has enabled -fstack-protector by default. This is problematic for the KVM selftests as they do not configure fs or gs segments (the stack canary is pulled from fs:0x28). With the default behavior, gcc will insert a

[PATCH 5.0 089/101] KVM: selftests: complete IO before migrating guest state

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 0f73bbc851ed32d22bbd86be09e0365c460bcd2e ] Documentation/virtual/kvm/api.txt states: NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_PAPR and KVM_EXIT_EPR the corresponding operations are complete (and guest state is consistent) only after

[PATCH 5.0 069/101] 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

[PATCH 5.0 086/101] KVM: selftests: assert on exit reason in CR4/cpuid sync test

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 8df98ae0ab2ead9a02228756eec26f8d7b17f499 ] ...so that the test doesn't end up in an infinite loop if it fails for whatever reason, e.g. SHUTDOWN due to gcc inserting stack canary code into ucall() and attempting to derefence a null segment. Fixes: ca359066889f7 ("kvm:

[PATCH 5.0 081/101] gpio: of: Check for "spi-cs-high" in child instead of parent node

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 7ce40277bf848391705011ba37eac2e377cbd9e6 ] "spi-cs-high" is going to be specified in child node of an SPI controller's representing attached SPI device, so change the code to look for it there, instead of checking parent node. Signed-off-by: Andrey Smirnov Cc: Linus Walleij

[PATCH 5.0 084/101] kvm/x86: Move MSR_IA32_ARCH_CAPABILITIES to array emulated_msrs

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 2bdb76c015df7125783d8394d6339d181cb5bc30 ] Since MSR_IA32_ARCH_CAPABILITIES is emualted unconditionally even if host doesn't suppot it. We should move it to array emulated_msrs from arry msrs_to_save, to report to userspace that guest support this msr. Signed-off-by: Xiaoyao Li

[PATCH 5.0 080/101] gpio: of: Check propname before applying "cs-gpios" quirks

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit e5545c94e43b8f6599ffc01df8d1aedf18ee912a ] SPI GPIO device has more than just "cs-gpio" property in its node and would request those GPIOs as a part of its initialization. To avoid applying CS-specific quirk to all of them add a check to make sure that propname is "cs-gpios".

[PATCH 5.0 079/101] afs: Fix StoreData op marshalling

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 8c7ae38d1ce12a0eaeba655df8562552b3596c7f ] The marshalling of AFS.StoreData, AFS.StoreData64 and YFS.StoreData64 calls generated by ->setattr() ops for the purpose of expanding a file is incorrect due to older documentation incorrectly describing the way the RPC 'FileLength'

[PATCH 5.0 077/101] libata: fix using DMA buffers on stack

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit dd08a8d9a66de4b54575c294a92630299f7e0fe7 ] When CONFIG_VMAP_STACK=y, __pa() returns incorrect physical address for a stack virtual address. Stack DMA buffers must be avoided. Signed-off-by: raymond pang Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin (Microsoft) ---

[PATCH 5.0 036/101] 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 5.0 068/101] scsi: qla4xxx: fix a potential NULL pointer dereference

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit fba1bdd2a9a93f3e2181ec1936a3c2f6b37e7ed6 ] In case iscsi_lookup_endpoint fails, the fix returns -EINVAL to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Acked-by: Manish Rangankar Reviewed-by: Mukesh Ojha Signed-off-by: Martin K. Petersen Signed-off-by: Sasha

[PATCH 5.0 035/101] usb: dwc3: pci: add support for Comet Lake PCH ID

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 7ae622c978db6b2e28b4fced6ecd2a174492059d ] This patch simply adds a new PCI Device ID Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin (Microsoft) --- drivers/usb/dwc3/dwc3-pci.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c

[PATCH 5.0 032/101] arm64: KVM: Always set ICH_HCR_EL2.EN if GICv4 is enabled

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit ca71228b42a96908eca7658861eafacd227856c9 ] The normal interrupt flow is not to enable the vgic when no virtual interrupt is to be injected (i.e. the LRs are empty). But when a guest is likely to use GICv4 for LPIs, we absolutely need to switch it on at all times. Otherwise,

[PATCH 5.0 063/101] 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

[PATCH 5.0 065/101] staging: vc04_services: Fix an error code in vchiq_probe()

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 9b9c87cf51783cbe7140c51472762094033cfeab ] We need to set "err" on this error path. Fixes: 187ac53e590c ("staging: vchiq_arm: rework probe and init functions") Signed-off-by: Dan Carpenter Acked-by: Stefan Wahren Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin

[PATCH 5.0 061/101] drm/meson: Fix invalid pointer in meson_drv_unbind()

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 776e78677f514ecddd12dba48b9040958999bd5a ] meson_drv_bind() registers a meson_drm struct as the device's privdata, but meson_drv_unbind() tries to retrieve a drm_device. This may cause a segfault on shutdown: [ 5194.593429] Unable to handle kernel NULL pointer dereference at

[PATCH 5.0 056/101] net: xilinx: fix possible object reference leak

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit fa3a419d2f674b431d38748cb58fb7da17ee8949 ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings:

[PATCH 5.0 059/101] 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

[PATCH 5.0 060/101] gpio: aspeed: fix a potential NULL pointer dereference

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 6cf4511e9729c00a7306cf94085f9cc3c52ee723 ] In case devm_kzalloc, the patch returns ENOMEM to avoid potential NULL pointer dereference. Signed-off-by: Kangjie Lu Reviewed-by: Andrew Jeffery Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin (Microsoft) ---

[PATCH 5.0 055/101] 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")

[PATCH 5.0 053/101] 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) ---

[PATCH 5.0 044/101] net: ks8851: Delay requesting IRQ until opened

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit d268f31552794abf5b6aa5af31021643411f25f5 ] The ks8851 driver currently requests the IRQ before registering the net_device. Because the net_device name is used as IRQ name and is still "eth%d" when the IRQ is requested, it's impossibe to tell IRQs apart if multiple ks8851 chips

[PATCH 5.0 054/101] drm/tegra: hub: Fix dereference before check

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 7cf77b273a8fc51e7de622fa6691abd4436a9a6b ] Reported-by: Dan Carpenter Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin (Microsoft) --- drivers/gpu/drm/tegra/hub.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/hub.c

[PATCH 5.0 030/101] serial: ar933x_uart: Fix build failure with disabled console

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 72ff51d8dd262d1fef25baedc2ac35116435be47 ] Andrey has reported on OpenWrt's bug tracking system[1], that he currently can't use ar93xx_uart as pure serial UART without console (CONFIG_SERIAL_8250_CONSOLE and CONFIG_SERIAL_AR933X_CONSOLE undefined), because compilation ends with

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

2019-05-02 Thread Mike Rapoport
Replace __get_free_page() and alloc_pages() calls with the generic __pte_alloc_one_kernel() and __pte_alloc_one(). There is no functional change for the kernel PTE allocation. The difference for the user PTEs, is that the clear_pte_table() is now called after pgtable_page_ctor() and the addition

[PATCH 11/15] parisc: switch to generic version of pte allocation

2019-05-02 Thread Mike Rapoport
parisc allocates PTE pages with __get_free_page() and uses GFP_KERNEL | __GFP_ZERO for the allocations. Switch it to the generic version that does exactly the same thing for the kernel page tables and adds __GFP_ACCOUNT for the user PTEs. The pte_free_kernel() and pte_free() versions on are

[PATCH 5.0 041/101] KVM: arm/arm64: Fix handling of stage2 huge mappings

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 3c3736cd32bf5197aed1410ae826d2d254a5b277 ] We rely on the mmu_notifier call backs to handle the split/merge of huge pages and thus we are guaranteed that, while creating a block mapping, either the entire block is unmapped at stage2 or it is missing permission. However, we miss

[PATCH 08/15] mips: switch to generic version of pte allocation

2019-05-02 Thread Mike Rapoport
MIPS allocates kernel PTE pages with __get_free_pages(GFP_KERNEL | __GFP_ZERO, PTE_ORDER) and user PTE pages with alloc_pages(GFP_KERNEL | __GFP_ZERO, PTE_ORDER) The PTE_ORDER is hardwired to zero, which makes MIPS implementation almost identical to the generic one. Switch

[PATCH 5.0 008/101] arm64: dts: renesas: r8a77990: Fix SCIF5 DMA channels

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit e20119f7eaaaf6aad5b44f35155ce500429e17f6 ] According to the R-Car Gen3 Hardware Manual Errata for Rev 1.50 of Feb 12, 2019, the DMA channels for SCIF5 are corrected from 16..47 to 0..15 on R-Car E3. Signed-off-by: Takeshi Kihara Fixes: a5ebe5e49a862e21 ("arm64: dts: renesas:

[PATCH 07/15] m68k: sun3: switch to generic version of pte allocation

2019-05-02 Thread Mike Rapoport
The sun3 MMU variant of m68k uses GFP_KERNEL to allocate a PTE page and then memset(0) or clear_highpage() to clear it. This is equivalent to allocating the page with GFP_KERNEL | __GFP_ZERO, which allows replacing sun3 implementation of pte_alloc_one() and pte_alloc_one_kernel() with the generic

[PATCH 5.0 029/101] sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit ac0cdb3d990108df795b676cd0d0e65ac34b2273 ] Add the missing uart_unregister_driver() and i2c_del_driver() before return from sc16is7xx_init() in the error handling case. Signed-off-by: Mao Wenan Reviewed-by: Vladimir Zapolskiy Signed-off-by: Greg Kroah-Hartman Signed-off-by:

[PATCH 5.0 020/101] 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

[PATCH 5.0 015/101] 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

[PATCH 5.0 018/101] net: stmmac: fix jumbo frame sending with non-linear skbs

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 58f2ce6f61615dfd8dd3cc01c9e5bb54ed35637e ] When sending non-linear skbs with jumbo frames, we set up the non-paged data and mark that as a last segment, although the paged fragments are also prepared. This will stall the TX queue and trigger a watchdog warning (a simple

[PATCH 5.0 014/101] net: ieee802154: fix a potential NULL pointer dereference

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 2795e8c251614ac0784c9d41008551109f665716 ] In case alloc_ordered_workqueue fails, the fix releases sources and returns -ENOMEM to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Acked-by: Michael Hennerich Signed-off-by: Stefan Schmidt Signed-off-by: Sasha Levin

[PATCH 4.19 56/72] scsi: qla4xxx: fix a potential NULL pointer dereference

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit fba1bdd2a9a93f3e2181ec1936a3c2f6b37e7ed6 ] In case iscsi_lookup_endpoint fails, the fix returns -EINVAL to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Acked-by: Manish Rangankar Reviewed-by: Mukesh Ojha Signed-off-by: Martin K. Petersen Signed-off-by: Sasha

[PATCH 02/15] alpha: switch to generic version of pte allocation

2019-05-02 Thread Mike Rapoport
alpha allocates PTE pages with __get_free_page() and uses GFP_KERNEL | __GFP_ZERO for the allocations. Switch it to the generic version that does exactly the same thing for the kernel page tables and adds __GFP_ACCOUNT for the user PTEs. The alpha pte_free() and pte_free_kernel() versions are

Re: [PATCH 1/2] ARM: dts: imx6ul: Add csi node

2019-05-02 Thread Fabio Estevam
[Adding Rui] On Tue, Apr 30, 2019 at 4:47 AM Sébastien Szymanski wrote: > > Add csi node for i.MX6UL SoC. > > Signed-off-by: Sébastien Szymanski > --- > arch/arm/boot/dts/imx6ul.dtsi | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/arch/arm/boot/dts/imx6ul.dtsi

[PATCH 5.0 010/101] s390: limit brk randomization to 32MB

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit cd479eccd2e057116d504852814402a1e68ead80 ] For a 64-bit process the randomization of the program break is quite large with 1GB. That is as big as the randomization of the anonymous mapping base, for a test case started with '/lib/ld64.so.1 ' it can happen that the heap is placed

[PATCH 4.19 52/72] 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 :

[PATCH 4.19 72/72] 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

[PATCH 5.0 001/101] selinux: use kernel linux/socket.h for genheaders and mdp

2019-05-02 Thread Greg Kroah-Hartman
From: Paulo Alcantara commit dfbd199a7cfe3e3cd8531e1353cdbd7175bfbc5e upstream. When compiling genheaders and mdp from a newer host kernel, the following error happens: In file included from scripts/selinux/genheaders/genheaders.c:18: ./security/selinux/include/classmap.h:238:2: error:

[PATCH 4.19 54/72] 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

[PATCH 4.19 55/72] 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

[PATCH 5.0 012/101] mt76: mt76x2: fix external LNA gain settings

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 45a042e3026824a7e910db7a4dd38fef0540b902 ] Devices with external LNA need different values for AGC registers 8 and 9 Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin (Microsoft) --- drivers/net/wireless/mediatek/mt76/mt76x2/phy.c | 11 --- 1 file changed, 8

[PATCH 4.14 11/49] 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

[PATCH 4.19 25/72] 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

[PATCH 4.9 10/32] serial: ar933x_uart: Fix build failure with disabled console

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 72ff51d8dd262d1fef25baedc2ac35116435be47 ] Andrey has reported on OpenWrt's bug tracking system[1], that he currently can't use ar93xx_uart as pure serial UART without console (CONFIG_SERIAL_8250_CONSOLE and CONFIG_SERIAL_AR933X_CONSOLE undefined), because compilation ends with

[PATCH 4.19 23/72] serial: ar933x_uart: Fix build failure with disabled console

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 72ff51d8dd262d1fef25baedc2ac35116435be47 ] Andrey has reported on OpenWrt's bug tracking system[1], that he currently can't use ar93xx_uart as pure serial UART without console (CONFIG_SERIAL_8250_CONSOLE and CONFIG_SERIAL_AR933X_CONSOLE undefined), because compilation ends with

[PATCH 5.0 026/101] 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

[PATCH 5.0 003/101] drm/i915: Do not enable FEC without DSC

2019-05-02 Thread Greg Kroah-Hartman
From: Ville Syrjälä commit 5aae7832d1b4ec614996ea0f4fafc4d9855ec0b0 upstream. Currently we enable FEC even when DSC is no used. While that is theoretically valid supposedly there isn't much of a benefit from this. But more importantly we do not account for the FEC link bandwidth overhead (2.4%)

[PATCH 4.19 64/72] libata: fix using DMA buffers on stack

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit dd08a8d9a66de4b54575c294a92630299f7e0fe7 ] When CONFIG_VMAP_STACK=y, __pa() returns incorrect physical address for a stack virtual address. Stack DMA buffers must be avoided. Signed-off-by: raymond pang Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin (Microsoft) ---

[PATCH 4.9 01/32] usbnet: ipheth: prevent TX queue timeouts when device not ready

2019-05-02 Thread Greg Kroah-Hartman
From: Alexander Kappner commit bb1b40c7cb863f0800a6410c7dcb86cf3f28d3b1 upstream. iOS devices require the host to be "trusted" before servicing network packets. Establishing trust requires the user to confirm a dialog on the iOS device.Until trust is established, the iOS device will silently

[PATCH 4.9 02/32] usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set

2019-05-02 Thread Greg Kroah-Hartman
From: Gustavo A. R. Silva commit 61c59355e0154a938b28710dfa6c1d8be2ddcefa upstream. _dev_ is being dereferenced before it is null checked, hence there is a potential null pointer dereference. Fix this by moving the pointer dereference after _dev_ has been null checked. Addresses-Coverity-ID:

[PATCH 4.19 22/72] sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit ac0cdb3d990108df795b676cd0d0e65ac34b2273 ] Add the missing uart_unregister_driver() and i2c_del_driver() before return from sc16is7xx_init() in the error handling case. Signed-off-by: Mao Wenan Reviewed-by: Vladimir Zapolskiy Signed-off-by: Greg Kroah-Hartman Signed-off-by:

[PATCH 4.9 19/32] 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 *), 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

[PATCH 04/15] arm64: switch to generic version of pte allocation

2019-05-02 Thread Mike Rapoport
The PTE allocations in arm64 are identical to the generic ones modulo the GFP flags. Using the generic pte_alloc_one() functions ensures that the user page tables are allocated with __GFP_ACCOUNT set. The arm64 definition of PGALLOC_GFP is removed and replaced with GFP_PGTABLE_USER for

[PATCH 4.19 33/72] 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

[PATCH 4.14 37/49] drm/meson: Fix invalid pointer in meson_drv_unbind()

2019-05-02 Thread Greg Kroah-Hartman
[ Upstream commit 776e78677f514ecddd12dba48b9040958999bd5a ] meson_drv_bind() registers a meson_drm struct as the device's privdata, but meson_drv_unbind() tries to retrieve a drm_device. This may cause a segfault on shutdown: [ 5194.593429] Unable to handle kernel NULL pointer dereference at

[PATCH 4.9 29/32] 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

[PATCH 4.19 63/72] 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

<    1   2   3   4   5   6   7   8   9   >