[RFC] mm: Generalize notify_page_fault()

2019-05-29 Thread Anshuman Khandual
Similar notify_page_fault() definitions are being used by architectures duplicating much of the same code. This attempts to unify them into a single implementation, generalize it and then move it to a common place. kprobes_built_in() can detect CONFIG_KPROBES, hence notify_page_fault() must not be

[PATCH V1] i2c: busses: tegra: Add suspend-resume support

2019-05-29 Thread Bitan Biswas
Post suspend I2C registers have power on reset values. Before any transfer initialize I2C registers to prevent I2C transfer timeout and implement suspend and resume callbacks needed. Fix below errors post suspend: 1) Tegra I2C transfer timeout during jetson tx2 resume: [ 27.520613] pca953x

Re: [PATCH] riscv: Fix udelay in RV32.

2019-05-29 Thread Christoph Hellwig
On Tue, May 28, 2019 at 05:26:49PM +0800, Nick Hu wrote: > In RV32, udelay would delay the wrong cycle. > When it shifts right "UDELAY_SHITFT" bits, it > either delays 0 cycle or 1 cycle. It only works > correctly in RV64. Because the 'ucycles' always > needs to be 64 bits variable. Please use up

[PATCH 3/3] arm64: defconfig: Select CONFIG_CLK_IMX8MN by default

2019-05-29 Thread Anson . Huang
From: Anson Huang Enable CONFIG_CLK_IMX8MN to support i.MX8MN clock driver. Signed-off-by: Anson Huang --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 8d4f25c..aef797c 100644 ---

[PATCH 1/3] dt-bindings: imx: Add clock binding doc for i.MX8MN

2019-05-29 Thread Anson . Huang
From: Anson Huang Add the clock binding doc for i.MX8MN. Signed-off-by: Anson Huang --- .../devicetree/bindings/clock/imx8mn-clock.txt | 29 +++ include/dt-bindings/clock/imx8mn-clock.h | 215 + 2 files changed, 244 insertions(+) create mode 100644

Re: [PATCH] PCI: endpoint: Add DMA to Linux PCI EP Framework

2019-05-29 Thread Kishon Vijay Abraham I
+Vinod Koul Hi, On 30/05/19 4:07 AM, Alan Mikhak wrote: > On Mon, May 27, 2019 at 2:09 AM Gustavo Pimentel > wrote: >> >> On Fri, May 24, 2019 at 20:42:43, Alan Mikhak >> wrote: >> >> Hi Alan, >> >>> On Fri, May 24, 2019 at 1:59 AM Gustavo Pimentel >>> wrote: Hi Alan, This

[PATCH 2/3] clk: imx: Add support for i.MX8MN clock driver

2019-05-29 Thread Anson . Huang
From: Anson Huang This patch adds i.MX8MN clock driver support. Signed-off-by: Anson Huang --- drivers/clk/imx/Kconfig | 6 + drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-imx8mn.c | 609 +++ 3 files changed, 616 insertions(+) create

Re: [PATCH] kernel/sys.c: fix possible spectre-v1 in do_prlimit()

2019-05-29 Thread Dianzhang Chen
Though syscall `getrlimit` , it seems not works after check_prlimit_permission. And the speculation windows are large, as said[1]: >> Can the speculation proceed past the task_lock()? Or is the policy to >> ignore such happy happenstances even if they are available? > > Locks are not in the way

RE: SGX vs LSM (Re: [PATCH v20 00/28] Intel SGX1 support)

2019-05-29 Thread Xing, Cedric
> From: Christopherson, Sean J > Sent: Tuesday, May 28, 2019 2:41 PM > > On Tue, May 28, 2019 at 01:48:02PM -0700, Andy Lutomirski wrote: > > On Tue, May 28, 2019 at 1:24 PM Sean Christopherson > > wrote: > > > > > > Actually, I think we do have everything we need from an LSM perspective. > > >

linux-next: build warning after merge of the userns tree

2019-05-29 Thread Stephen Rothwell
Hi Eric, After merging the userns tree, today's linux-next build (i386 defconfig) produced this warning: arch/x86/mm/fault.c: In function 'do_sigbus': arch/x86/mm/fault.c:1017:22: warning: unused variable 'tsk' [-Wunused-variable] struct task_struct *tsk = current; ^~~

Re: [PATCH v3 1/8] dt-bindings: soc: Add Aspeed XDMA engine binding documentation

2019-05-29 Thread Andrew Jeffery
On Thu, 30 May 2019, at 03:40, Eddie James wrote: > Document the bindings. > > Signed-off-by: Eddie James > --- > .../devicetree/bindings/soc/aspeed/xdma.txt| 23 > ++ > 1 file changed, 23 insertions(+) > create mode 100644

Re: [PATCH] mm/slab_common.c: fix possible spectre-v1 in kmalloc_slab()

2019-05-29 Thread Dianzhang Chen
thanks, i think your suggestion is ok. in my previous method is easy to understand for spectre logic, but your suggestion is more sense to use of array_index_nospec. On Thu, May 30, 2019 at 3:48 AM Matthew Wilcox wrote: > > On Wed, May 29, 2019 at 08:37:28PM +0800, Dianzhang Chen wrote: > >

Re: [PATCH] mm/slab_common.c: fix possible spectre-v1 in kmalloc_slab()

2019-05-29 Thread Dianzhang Chen
It is possible that a CPU mis-predicts the conditional branch, and speculatively loads size_index[size_index_elem(size)], even if size >192. Although this value will subsequently be discarded, but it can not drop all the effects of speculative execution, such as the presence or absence of data in

Re: [PATCH net-next] ethtool: copy reglen to userspace

2019-05-29 Thread David Miller
From: Vivien Didelot Date: Tue, 28 May 2019 16:58:48 -0400 > ethtool_get_regs() allocates a buffer of size reglen obtained from > ops->get_regs_len(), thus only this value must be used when copying > the buffer back to userspace. Also no need to check regbuf twice. > > Signed-off-by: Vivien

[PATCH] mm/kconfig: Fix neighboring typos

2019-05-29 Thread Kees Cook
This fixes a couple typos I noticed in the slab Kconfig: sacrifies -> sacrifices accellerate -> accelerate Seeing as no other instances of these typos are found elsewhere in the kernel and that I originally added one of the two, I can only assume working on slab must have caused

[PATCH 5.1 016/405] kvm: svm/avic: fix off-by-one in checking host APIC ID

2019-05-29 Thread Greg Kroah-Hartman
From: Suthikulpanit, Suravee commit c9bcd3e3335d0a29d89fabd2c385e1b989e6f1b0 upstream. Current logic does not allow VCPU to be loaded onto CPU with APIC ID 255. This should be allowed since the host physical APIC ID field in the AVIC Physical APIC table entry is an 8-bit value, and APIC ID 255

[PATCH 5.1 018/405] libnvdimm/pmem: Bypass CONFIG_HARDENED_USERCOPY overhead

2019-05-29 Thread Greg Kroah-Hartman
From: Dan Williams commit 52f476a323f9efc959be1c890d0cdcf12e1582e0 upstream. Jeff discovered that performance improves from ~375K iops to ~519K iops on a simple psync-write fio workload when moving the location of 'struct page' from the default PMEM location to DRAM. This result is surprising

[PATCH 5.1 002/405] ext4: do not delete unlinked inode from orphan list on failed truncate

2019-05-29 Thread Greg Kroah-Hartman
From: Jan Kara commit ee0ed02ca93ef1ecf8963ad96638795d55af2c14 upstream. It is possible that unlinked inode enters ext4_setattr() (e.g. if somebody calls ftruncate(2) on unlinked but still open file). In such case we should not delete the inode from the orphan list if truncate fails. Note that

[PATCH 5.1 014/405] dax: Arrange for dax_supported check to span multiple devices

2019-05-29 Thread Greg Kroah-Hartman
From: Dan Williams commit 7bf7eac8d648057519adb6fce1e31458c902212c upstream. Pankaj reports that starting with commit ad428cdb525a "dax: Check the end of the block-device capacity with dax_direct_access()" device-mapper no longer allows dax operation. This results from the stricter checks in

[PATCH 5.1 001/405] x86: Hide the int3_emulate_call/jmp functions from UML

2019-05-29 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit 693713cbdb3a4bda5a8a678c31f06560bbb14657 upstream. User Mode Linux does not have access to the ip or sp fields of the pt_regs, and accessing them causes UML to fail to build. Hide the int3_emulate_jmp() and int3_emulate_call() instructions from UML, as it

[PATCH 5.1 011/405] mmc: sdhci-iproc: cygnus: Set NO_HISPD bit to fix HS50 data hold time problem

2019-05-29 Thread Greg Kroah-Hartman
From: Trac Hoang commit b7dfa695afc40d5396ed84b9f25aa3754de23e39 upstream. The iproc host eMMC/SD controller hold time does not meet the specification in the HS50 mode. This problem can be mitigated by disabling the HISPD bit; thus forcing the controller output data to be driven on the falling

[PATCH 5.1 028/405] btrfs: sysfs: Fix error path kobject memory leak

2019-05-29 Thread Greg Kroah-Hartman
From: Tobin C. Harding commit 450ff8348808a89cc27436771aa05c2b90c0eef1 upstream. If a call to kobject_init_and_add() fails we must call kobject_put() otherwise we leak memory. Calling kobject_put() when kobject_init_and_add() fails drops the refcount back to 0 and calls the ktype release

RE: [EXT] Re: [PATCH] arm64: dts: ls1028a: fix watchdog device node

2019-05-29 Thread Chuanhua Han
> -Original Message- > From: Rob Herring > Sent: 2019年5月24日 20:29 > To: Chuanhua Han > Cc: Leo Li ; Shawn Guo ; > mark.rutl...@arm.com; linux-arm-ker...@lists.infradead.org; > devicet...@vger.kernel.org; linux-kernel@vger.kernel.org; Ying Zhang > > Subject: Re: [EXT] Re: [PATCH]

[PATCH 5.1 012/405] mmc: sdhci-iproc: Set NO_HISPD bit to fix HS50 data hold time problem

2019-05-29 Thread Greg Kroah-Hartman
From: Trac Hoang commit ec0970e0a1b2c807c908d459641a9f9a1be3e130 upstream. The iproc host eMMC/SD controller hold time does not meet the specification in the HS50 mode. This problem can be mitigated by disabling the HISPD bit; thus forcing the controller output data to be driven on the falling

[PATCH 5.1 021/405] arm64/iommu: handle non-remapped addresses in ->mmap and ->get_sgtable

2019-05-29 Thread Greg Kroah-Hartman
From: Christoph Hellwig commit a98d9ae937d256ed679a935fc82d9deaa710d98e upstream. DMA allocations that can't sleep may return non-remapped addresses, but we do not properly handle them in the mmap and get_sgtable methods. Resolve non-vmalloc addresses using virt_to_page to handle this corner

[PATCH 5.1 024/405] btrfs: Check the compression level before getting a workspace

2019-05-29 Thread Greg Kroah-Hartman
From: Johnny Chang commit 2b90883c561ddcc641741c2e4df1f702a4f2acb8 upstream. When a file's compression property is set as zlib or zstd but leave the compression mount option not be set, that means btrfs will try to compress the file with default compression level. But in btrfs_compress_pages(),

[PATCH 5.1 022/405] gfs2: Fix sign extension bug in gfs2_update_stats

2019-05-29 Thread Greg Kroah-Hartman
From: Andreas Gruenbacher commit 5a5ec83d6ac974b12085cd99b196795f14079037 upstream. Commit 4d207133e9c3 changed the types of the statistic values in struct gfs2_lkstats from s64 to u64. Because of that, what should be a signed value in gfs2_update_stats turned into an unsigned value. When

[PATCH 5.1 019/405] arm64/kernel: kaslr: reduce module randomization range to 2 GB

2019-05-29 Thread Greg Kroah-Hartman
From: Ard Biesheuvel commit b2eed9b58811283d00fa861944cb75797d4e52a7 upstream. The following commit 7290d5809571 ("module: use relative references for __ksymtab entries") updated the ksymtab handling of some KASLR capable architectures so that ksymtab entries are emitted as pairs of 32-bit

[PATCH 5.1 027/405] Btrfs: fix race between ranged fsync and writeback of adjacent ranges

2019-05-29 Thread Greg Kroah-Hartman
From: Filipe Manana commit 0c713cbab6200b0ab6473b50435e450a6e1de85d upstream. When we do a full fsync (the bit BTRFS_INODE_NEEDS_FULL_SYNC is set in the inode) that happens to be ranged, which happens during a msync() or writes for files opened with O_SYNC for example, we can end up with a

[PATCH 5.1 025/405] Btrfs: do not abort transaction at btrfs_update_root() after failure to COW path

2019-05-29 Thread Greg Kroah-Hartman
From: Filipe Manana commit 72bd2323ec87722c115a5906bc6a1b31d11e8f54 upstream. Currently when we fail to COW a path at btrfs_update_root() we end up always aborting the transaction. However all the current callers of btrfs_update_root() are able to deal with errors returned from it, many do end

[PATCH 5.1 015/405] kvm: Check irqchip mode before assign irqfd

2019-05-29 Thread Greg Kroah-Hartman
From: Peter Xu commit 654f1f13ea56b92bacade8ce2725aea0457f91c0 upstream. When assigning kvm irqfd we didn't check the irqchip mode but we allow KVM_IRQFD to succeed with all the irqchip modes. However it does not make much sense to create irqfd even without the kernel chips. Let's provide a

[PATCH 5.1 003/405] ext4: wait for outstanding dio during truncate in nojournal mode

2019-05-29 Thread Greg Kroah-Hartman
From: Jan Kara commit 82a25b027ca48d7ef197295846b352345853dfa8 upstream. We didn't wait for outstanding direct IO during truncate in nojournal mode (as we skip orphan handling in that case). This can lead to fs corruption or stale data exposure if truncate ends up freeing blocks and these get

[PATCH 5.1 029/405] btrfs: sysfs: dont leak memory when failing add fsid

2019-05-29 Thread Greg Kroah-Hartman
From: Tobin C. Harding commit e32773357d5cc271b1d23550b3ed026eb5c2a468 upstream. A failed call to kobject_init_and_add() must be followed by a call to kobject_put(). Currently in the error path when adding fs_devices we are missing this call. This could be fixed by calling

[PATCH 5.1 039/405] bpf: devmap: fix use-after-free Read in __dev_map_entry_free

2019-05-29 Thread Greg Kroah-Hartman
From: Eric Dumazet commit 2baae3545327632167c0180e9ca1d467416f1919 upstream. synchronize_rcu() is fine when the rcu callbacks only need to free memory (kfree_rcu() or direct kfree() call rcu call backs) __dev_map_entry_free() is a bit more complex, so we need to make sure that call queued

[PATCH 5.1 044/405] Revert "btrfs: Honour FITRIM range constraints during free space trim"

2019-05-29 Thread Greg Kroah-Hartman
From: David Sterba This reverts commit eb432217d775a90c061681c0dfa3c7abfba75123. There is currently no corresponding patch in master due to additional changes that would be significantly different from plain revert in the respective stable branch. The range argument was not handled correctly

[PATCH 5.1 023/405] btrfs: dont double unlock on error in btrfs_punch_hole

2019-05-29 Thread Greg Kroah-Hartman
From: Josef Bacik commit 8fca955057b9c58467d1b231e43f19c4cf26ae8c upstream. If we have an error writing out a delalloc range in btrfs_punch_hole_lock_range we'll unlock the inode and then goto out_only_mutex, where we will again unlock the inode. This is bad, don't do this. Fixes:

[PATCH 5.1 009/405] crypto: hash - fix incorrect HASH_MAX_DESCSIZE

2019-05-29 Thread Greg Kroah-Hartman
From: Eric Biggers commit e1354400b25da645c4764ed6844d12f1582c3b66 upstream. The "hmac(sha3-224-generic)" algorithm has a descsize of 368 bytes, which is greater than HASH_MAX_DESCSIZE (360) which is only enough for sha3-224-generic. The check in shash_prepare_alg() doesn't catch this because

[PATCH 5.1 032/405] ovl: relax WARN_ON() for overlapping layers use case

2019-05-29 Thread Greg Kroah-Hartman
From: Amir Goldstein commit acf3062a7e1ccf67c6f7e7c28671a6708fde63b0 upstream. This nasty little syzbot repro: https://syzkaller.appspot.com/x/repro.syz?x=12c7a94f40 Creates overlay mounts where the same directory is both in upper and lower layers. Simplified example: mkdir foo work

[PATCH 5.1 005/405] x86/kvm/pmu: Set AMDs virt PMU version to 1

2019-05-29 Thread Greg Kroah-Hartman
From: Borislav Petkov commit a80c4ec10ed9632c44c829452dc40a0443ff4e85 upstream. After commit: 672ff6cff80c ("KVM: x86: Raise #GP when guest vCPU do not support PMU") my AMD guests started #GPing like this: general protection fault: [#1] PREEMPT SMP CPU: 1 PID: 4355 Comm: bash Not

[PATCH 5.1 038/405] ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit

2019-05-29 Thread Greg Kroah-Hartman
From: YueHaibing commit b2c01aab9646ed8ffb7c549afe55d5349c482425 upstream. Syzkaller report this: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] SMP KASAN PTI CPU: 0 PID: 4492 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45 Hardware name:

[PATCH 5.1 030/405] fbdev: fix divide error in fb_var_to_videomode

2019-05-29 Thread Greg Kroah-Hartman
From: Shile Zhang commit cf84807f6dd0be5214378e66460cfc9187f532f9 upstream. To fix following divide-by-zero error found by Syzkaller: divide error: [#1] SMP PTI CPU: 7 PID: 8447 Comm: test Kdump: loaded Not tainted 4.19.24-8.al7.x86_64 #1 Hardware name: Alibaba Cloud Alibaba Cloud

[PATCH 5.1 031/405] arm64: errata: Add workaround for Cortex-A76 erratum #1463225

2019-05-29 Thread Greg Kroah-Hartman
From: Will Deacon commit 969f5ea627570e91c9d54403287ee3ed657f58fe upstream. Revisions of the Cortex-A76 CPU prior to r4p0 are affected by an erratum that can prevent interrupts from being taken when single-stepping. This patch implements a software workaround to prevent userspace from

[PATCH 5.1 054/405] tools/bpf: fix perf build error with uClibc (seen on ARC)

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit ca31ca8247e2d3807ff5fa1d1760616a2292001c ] When build perf for ARC recently, there was a build failure due to lack of __NR_bpf. | Auto-detecting system features: | | ... get_cpuid: [ OFF ] | ... bpf: [ on ] | | # error __NR_bpf

[PATCH 5.1 041/405] at76c50x-usb: Dont register led_trigger if usb_register_driver failed

2019-05-29 Thread Greg Kroah-Hartman
From: YueHaibing commit 09ac2694b0475f96be895848687ebcbba97eeecf upstream. Syzkaller report this: [ 1213.468581] BUG: unable to handle kernel paging request at fbfff83bf338 [ 1213.469530] #PF error: [normal kernel read fault] [ 1213.469530] PGD 237fe4067 P4D 237fe4067 PUD 237e60067 PMD

[PATCH 5.1 034/405] media: cpia2: Fix use-after-free in cpia2_exit

2019-05-29 Thread Greg Kroah-Hartman
From: YueHaibing commit dea37a97265588da604c6ba80160a287b72c7bfd upstream. Syzkaller report this: BUG: KASAN: use-after-free in sysfs_remove_file_ns+0x5f/0x70 fs/sysfs/file.c:468 Read of size 8 at addr 8881f59a6b70 by task syz-executor.0/8363 CPU: 0 PID: 8363 Comm: syz-executor.0 Not

[PATCH 5.1 062/405] blk-mq: grab .q_usage_counter when queuing request from plug code path

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit e87eb301bee183d82bb3d04bd71b6660889a2588 ] Just like aio/io_uring, we need to grab 2 refcount for queuing one request, one is for submission, another is for completion. If the request isn't queued from plug code path, the refcount grabbed in generic_make_request() serves for

[PATCH 5.1 035/405] media: serial_ir: Fix use-after-free in serial_ir_init_module

2019-05-29 Thread Greg Kroah-Hartman
From: YueHaibing commit 56cd26b618855c9af48c8301aa6754ced8dd0beb upstream. Syzkaller report this: BUG: KASAN: use-after-free in sysfs_remove_file_ns+0x5f/0x70 fs/sysfs/file.c:468 Read of size 8 at addr 8881dc7ae030 by task syz-executor.0/6249 CPU: 1 PID: 6249 Comm: syz-executor.0 Not

[PATCH 5.1 036/405] media: vb2: add waiting_in_dqbuf flag

2019-05-29 Thread Greg Kroah-Hartman
From: Hans Verkuil commit d65842f7126aa1a87fb44b7c9980c12630ed4f33 upstream. Calling VIDIOC_DQBUF can release the core serialization lock pointed to by vb2_queue->lock if it has to wait for a new buffer to arrive. However, if userspace dup()ped the video device filehandle, then it is possible

[PATCH 5.1 060/405] ice: Preserve VLAN Rx stripping settings

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit e80e76db6c5bbc7a8f8512f3dc630a2170745b0b ] When Tx insertion is set, we are not accounting for the state of Rx stripping. This causes Rx stripping to be enabled any time Tx insertion is changed, even when it's supposed to be disabled. Signed-off-by: Tony Nguyen Signed-off-by:

[PATCH 5.1 056/405] libbpf: fix invalid munmap call

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 0e6741f092979535d159d5a851f12c88bfb7cb9a ] When unmapping the AF_XDP memory regions used for the rings, an invalid address was passed to the munmap() calls. Instead of passing the beginning of the memory region, the descriptor region was passed to munmap. When the userspace

[PATCH 5.1 058/405] bpftool: exclude bash-completion/bpftool from .gitignore pattern

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit a7d006714724de4334c5e3548701b33f7b12ca96 ] tools/bpf/bpftool/.gitignore has the "bpftool" pattern, which is intended to ignore the following build artifact: tools/bpf/bpftool/bpftool However, the .gitignore entry is effective not only for the current directory, but also for

[PATCH 5.1 037/405] media: vivid: use vfree() instead of kfree() for dev->bitmap_cap

2019-05-29 Thread Greg Kroah-Hartman
From: Alexander Potapenko commit dad7e270ba712ba1c99cd2d91018af607a06 upstream. syzkaller reported crashes on kfree() called from vivid_vid_cap_s_selection(). This looks like a simple typo, as dev->bitmap_cap is allocated with vzalloc() throughout the file. Fixes: ef834f7836ec0 ("[media]

[PATCH 5.1 057/405] selftests/bpf: set RLIMIT_MEMLOCK properly for test_libbpf_open.c

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 6cea33701eb024bc6c920ab83940ee22afd29139 ] Test test_libbpf.sh failed on my development server with failure -bash-4.4$ sudo ./test_libbpf.sh [0] libbpf: Error in bpf_object__probe_name():Operation not permitted(1). Couldn't load basic 'r0 = 0' BPF program.

Re: [RFC PATCH v3] rtl8xxxu: Improve TX performance of RTL8723BU on rtl8xxxu driver

2019-05-29 Thread Chris Chiu
On Thu, May 30, 2019 at 2:22 AM Larry Finger wrote: > > On 5/29/19 12:03 AM, Chris Chiu wrote: > > We have 3 laptops which connect the wifi by the same RTL8723BU. > > The PCI VID/PID of the wifi chip is 10EC:B720 which is supported. > > They have the same problem with the in-kernel rtl8xxxu

[PATCH 5.1 064/405] net: ena: gcc 8: fix compilation warning

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit f913308879bc6ae437ce64d878c7b05643ddea44 ] GCC 8 contains a number of new warnings as well as enhancements to existing checkers. The warning - Wstringop-truncation - warns for calls to bounded string manipulation functions such as strncat, strncpy, and stpncpy that may either

[PATCH 5.1 066/405] hv_netvsc: fix race that may miss tx queue wakeup

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 93aa4792c3908eac87ddd368ee0fe0564148232b ] When the ring buffer is almost full due to RX completion messages, a TX packet may reach the "low watermark" and cause the queue stopped. If the TX completion arrives earlier than queue stopping, the wakeup may be missed. This patch

[PATCH 5.1 063/405] dmaengine: tegra210-dma: free dma controller in remove()

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit f030e419501cb95e961e9ed35c493b5d46a04eca ] Following kernel panic is seen during DMA driver unload->load sequence == Unable to handle kernel paging request at virtual address ff8001198880 Internal error:

[PATCH 5.1 065/405] net: ena: fix: set freed objects to NULL to avoid failing future allocations

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 8ee8ee7fe87bf64738ab4e31be036a7165608b27 ] In some cases when a queue related allocation fails, successful past allocations are freed but the pointer that pointed to them is not set to NULL. This is a problem for 2 reasons: 1. This is generally a bad practice since this pointer

[PATCH 5.1 067/405] Bluetooth: Ignore CC events not matching the last HCI command

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit f80c5dad7b6467b884c445ffea45985793b4b2d0 ] This commit makes the kernel not send the next queued HCI command until a command complete arrives for the last HCI command sent to the controller. This change avoids a problem with some buggy controllers (seen on two SKUs of QCA9377)

[PATCH 5.1 068/405] pinctrl: zte: fix leaked of_node references

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 02d15f0d80720545f1f4922a1550ea4aaad4e152 ] 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: ./drivers/pinctrl/zte/pinctrl-zx.c:415:2-8:

[PATCH 5.1 079/405] spi: pxa2xx: fix SCR (divisor) calculation

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 29f2133717c527f492933b0622a4aafe0b3cbe9e ] Calculate the divisor for the SCR (Serial Clock Rate), avoiding that the SSP transmission rate can be greater than the device rate. When the division between the SSP clock and the device rate generates a reminder, we have to increment

[PATCH 5.1 072/405] usb: gadget: f_fs: dont free buffer prematurely

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 73103c7f958b99561555c3bd1bc1a0809e0b7d61 ] The following kernel panic happens due to the io_data buffer gets deallocated before the async io is completed. Add a check for the case where io_data buffer should be deallocated by ffs_user_copy_worker. [ 41.663334] BUG: unable to

[PATCH 5.1 069/405] ASoC: Intel: kbl_da7219_max98357a: Map BTN_0 to KEY_PLAYPAUSE

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 16ec5dfe0327ddcf279957bffe4c8fe527088c63 ] On kbl_rt5663_max98927, commit 38a5882e4292 ("ASoC: Intel: kbl_rt5663_max98927: Map BTN_0 to KEY_PLAYPAUSE") This key pair mapping to play/pause when playing Youtube The Android 3.5mm Headset jack specification mentions that

[PATCH 5.1 073/405] ASoC: hdmi-codec: unlock the device on startup errors

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 30180e8436046344b12813dc954b2e01dfdcd22d ] If the hdmi codec startup fails, it should clear the current_substream pointer to free the device. This is properly done for the audio_startup() callback but for snd_pcm_hw_constraint_eld(). Make sure the pointer cleared if an error is

[PATCH 5.1 046/405] cxgb4: Fix error path in cxgb4_init_module

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit a3147770bea76c8dbad73eca3a24c2118da5e719 ] BUG: unable to handle kernel paging request at a016a270 PGD 3270067 P4D 3270067 PUD 3271063 PMD 230bbd067 PTE 0 Oops: [#1 CPU: 0 PID: 6134 Comm: modprobe Not tainted 5.1.0+ #33 Hardware name: QEMU Standard PC (i440FX +

[PATCH 5.1 080/405] net/mlx5: E-Switch, Use atomic rep state to serialize state change

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 6f4e02193c9a9ea54dd3151cf97489fa787cd0e6 ] When the state of rep was introduced, it was also designed to prevent duplicate unloading of the same rep. Considering the following two flows when an eswitch manager is at switchdev mode with n VF reps loaded.

[PATCH 5.1 075/405] powerpc/boot: Fix missing check of lseek() return value

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 5d085ec04a000fefb5182d3b03ee46ca96d8389b ] This is detected by Coverity scan: CID: 1440481 Signed-off-by: Bo YU Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/boot/addnote.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[PATCH 5.1 042/405] acct_on(): dont mess with freeze protection

2019-05-29 Thread Greg Kroah-Hartman
From: Al Viro commit 9419a3191dcb27f24478d288abaab697228d28e6 upstream. What happens there is that we are replacing file->path.mnt of a file we'd just opened with a clone and we need the write count contribution to be transferred from original mount to new one. That's it. We do *NOT* want any

[PATCH 5.1 071/405] usb: dwc3: move synchronize_irq() out of the spinlock protected block

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 41a91c606e7d2b74358a944525267cc451c271e8 ] dwc3_gadget_suspend() is called under dwc->lock spinlock. In such context calling synchronize_irq() is not allowed. Move the problematic call out of the protected block to fix the following kernel BUG during system suspend: BUG:

[PATCH 5.1 078/405] ASoC: imx: fix fiq dependencies

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit ea751227c813ab833609afecfeedaf0aa26f327e ] During randconfig builds, I occasionally run into an invalid configuration of the freescale FIQ sound support: WARNING: unmet direct dependencies detected for SND_SOC_IMX_PCM_FIQ Depends on [m]: SOUND [=y] && !UML && SND [=y] &&

[PATCH 5.1 040/405] batman-adv: mcast: fix multicast tt/tvlv worker locking

2019-05-29 Thread Greg Kroah-Hartman
From: Linus Lüssing commit a3c7cd0cdf1107f891aff847ad481e34df727055 upstream. Syzbot has reported some issues with the locking assumptions made for the multicast tt/tvlv worker: It was able to trigger the WARN_ON() in batadv_mcast_mla_tt_retract() and batadv_mcast_mla_tt_add(). While hard/not

[PATCH 5.1 077/405] spi: atmel-quadspi: fix crash while suspending

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit e5c27498a0403b270620b1a8a0a66e3efc222fb6 ] atmel_qspi objects are kept in spi_controller objects, so, first get pointer to spi_controller object and then get atmel_qspi object from spi_controller object. Fixes: 2d30ac5ed633 ("mtd: spi-nor: atmel-quadspi: Use spi-mem interface

[PATCH 5.1 074/405] powerpc/perf: Return accordingly on invalid chip-id in

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit a913e5e8b43be1d3897a141ce61c1ec071cad89c ] Nest hardware counter memory resides in a per-chip reserve-memory. During nest_imc_event_init(), chip-id of the event-cpu is considered to calculate the base memory addresss for that cpu. Return, proper error condition if the chip_id

[PATCH 5.1 103/405] s390/kexec_file: Fix detection of text segment in ELF loader

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 729829d775c9a5217abc784b2f16087d79c4eec8 ] To register data for the next kernel (command line, oldmem_base, etc.) the current kernel needs to find the ELF segment that contains head.S. This is currently done by checking ifor 'phdr->p_paddr == 0'. This works fine for the current

[PATCH 5.1 105/405] sched/nohz: Run NOHZ idle load balancer on HK_FLAG_MISC CPUs

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 9b019acb72e4b5741d88e8936d6f200ed44b66b2 ] The NOHZ idle balancer runs on the lowest idle CPU. This can interfere with isolated CPUs, so confine it to HK_FLAG_MISC housekeeping CPUs. HK_FLAG_SCHED is not used for this because it is not set anywhere at the moment. This could be

[PATCH 5.1 048/405] NFS: make nfs_match_client killable

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 950a578c6128c2886e295b9c7ecb0b6b22fcc92b ] Actually we don't do anything with return value from nfs_wait_client_init_complete in nfs_match_client, as a consequence if we get a fatal signal and client is not fully initialised, we'll loop to "again" label This

RE: [EXT] Re: Issue: regmap: use debugfs even when no device

2019-05-29 Thread Andy Duan
From: Mark Brown Sent: Wednesday, May 29, 2019 7:16 PM > To: Andy Duan > Cc: da...@lechnology.com; raf...@kernel.org; Robby Cai > ; gre...@linuxfoundation.org; linux-kernel > > Subject: Re: [EXT] Re: Issue: regmap: use debugfs even when no device > > On Wed, May 29, 2019 at 01:33:46AM +,

[PATCH 5.1 047/405] afs: Fix getting the afs.fid xattr

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit a2f611a3dc317d8ea1c98ad6c54b911cf7f93193 ] The AFS3 FID is three 32-bit unsigned numbers and is represented as three up-to-8-hex-digit numbers separated by colons to the afs.fid xattr. However, with the advent of support for YFS, the FID is now a 64-bit volume number, a 96-bit

[PATCH 5.1 089/405] powerpc/watchdog: Use hrtimers for per-CPU heartbeat

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 7ae3f6e130e8dc6188b59e3b4ebc2f16e9c8d053 ] Using a jiffies timer creates a dependency on the tick_do_timer_cpu incrementing jiffies. If that CPU has locked up and jiffies is not incrementing, the watchdog heartbeat timer for all CPUs stops and creates false positives and

[PATCH 5.1 082/405] ACPI / property: fix handling of data_nodes in acpi_get_next_subnode()

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 23583f7795025e3c783b680d906509366b0906ad ] When the DSDT tables expose devices with subdevices and a set of hierarchical _DSD properties, the data returned by acpi_get_next_subnode() is incorrect, with the results suggesting a bad pointer assignment. The parser works fine with

[PATCH 5.1 102/405] scsi: qedi: Abort ep termination if offload not scheduled

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit f848bfd8e167210a29374e8a678892bed591684f ] Sometimes during connection recovery when there is a failure to resolve ARP, and offload connection was not issued, driver tries to flush pending offload connection work which was not queued up. kernel: WARNING: CPU: 19 PID: 10110 at

[PATCH 5.1 090/405] cpufreq: Fix kobject memleak

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 4ebe36c94aed95de71a8ce6a6762226d31c938ee ] Currently the error return path from kobject_init_and_add() is not followed by a call to kobject_put() - which means we are leaking the kobject. Fix it by adding a call to kobject_put() in the error path of kobject_init_and_add().

[PATCH 5.1 101/405] rtc: stm32: manage the get_irq probe defer case

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit cf612c5949aca2bd81a1e28688957c8149ea2693 ] Manage the -EPROBE_DEFER error case for the wake IRQ. Signed-off-by: Fabien Dessenne Acked-by: Amelie Delaunay Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin --- drivers/rtc/rtc-stm32.c | 9 ++--- 1 file changed,

[PATCH 5.1 113/405] net: hns3: use atomic_t replace u32 for arqs count

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 30780a8b1677e7409b32ae52a9a84f7d41ae6b43 ] Since irq handler and mailbox task will both update arq's count, so arq's count should use atomic_t instead of u32, otherwise its value may go wrong finally. Fixes: 07a0556a3a73 ("net: hns3: Changes to support ARQ(Asynchronous Receive

[PATCH 5.1 115/405] mac80211/cfg80211: update bss channel on channel switch

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 5dc8cdce1d722c733f8c7af14c5fb595cfedbfa8 ] FullMAC STAs have no way to update bss channel after CSA channel switch completion. As a result, user-space tools may provide inconsistent channel info. For instance, consider the following two commands: $ sudo iw dev wlan0 link $ sudo

[PATCH 5.1 108/405] net: hns3: fix pause configure fail problem

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit fba2efdae8b4f998f66a2ff4c9f0575e1c4bbc40 ] When configure pause, current implementation returns directly after setup PFC without setup BP, which is not sufficient. So this patch fixes it, only return while setting PFC failed. Fixes: 44e59e375bf7 ("net: hns3: do not return GE

[PATCH 5.1 119/405] regulator: core: Actually put the gpiod after use

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 78927aa40bc82f32de07323ddc1c9de07ac68180 ] I went to great lengths to hand over the management of the GPIO descriptors to the regulator core, and some stray rebased oneliner in the old patch must have been assuming the devices were still doing devres management of it. We handed

[PATCH 5.1 116/405] drm: prefix header search paths with $(srctree)/

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 43068cb7ba1f6ceb1523e947c84002b2a61fd6d4 ] Currently, the Kbuild core manipulates header search paths in a crazy way [1]. To fix this mess, I want all Makefiles to add explicit $(srctree)/ to the search paths in the srctree. Some Makefiles are already written in that way, but

linux-next: build warning after merge of the akpm-current tree

2019-05-29 Thread Stephen Rothwell
Hi all, After merging the akpm-current tree, today's linux-next build (x86_64 allmodconfig) produced this warning: net/tipc/sysctl.c:42:12: warning: 'one' defined but not used [-Wunused-variable] static int one = 1; ^~~ net/tipc/sysctl.c:41:12: warning: 'zero' defined but not used

[PATCH 5.1 093/405] scsi: qla2xxx: Avoid that lockdep complains about unsafe locking in tcm_qla2xxx_close_session()

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit d4023db71108375e4194e92730ba0d32d7f07813 ] This patch avoids that lockdep reports the following warning: = WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected 5.1.0-rc1-dbg+ #11 Tainted: GW

[PATCH 5.1 061/405] blk-mq: split blk_mq_alloc_and_init_hctx into two parts

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 7c6c5b7c9186e3fb5b10afb8e5f710ae661144c6 ] Split blk_mq_alloc_and_init_hctx into two parts, and one is blk_mq_alloc_hctx() for allocating all hctx resources, another is blk_mq_init_hctx() for initializing hctx, which serves as counter-part of blk_mq_exit_hctx(). Cc: Dongli

[PATCH 5.1 125/405] nvme: set 0 capacity if namespace block size exceeds PAGE_SIZE

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 01fa017484ad98fccdeaab32db0077c574b6bd6f ] If our target exposed a namespace with a block size that is greater than PAGE_SIZE, set 0 capacity on the namespace as we do not support it. This issue encountered when the nvmet namespace was backed by a tempfile. Signed-off-by: Sagi

[PATCH 5.1 124/405] net: cw1200: fix a NULL pointer dereference

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 0ed2a005347400500a39ea7c7318f1fea57fb3ca ] In case create_singlethread_workqueue fails, the fix free the hardware and returns NULL to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin ---

[PATCH 5.1 114/405] dmaengine: pl330: _stop: clear interrupt status

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 2da254cc7908105a60a6bb219d18e8dced03dcb9 ] This patch kill instructs the DMAC to immediately terminate execution of a thread. and then clear the interrupt status, at last, stop generating interrupts for DMA_SEV. to guarantee the next dma start is clean. otherwise, one interrupt

[PATCH 5.1 106/405] net: ethernet: ti: cpsw: fix allmulti cfg in dual_mac mode

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 06095f34f8a0a2c4c83a19514c272699edd5f80b ] Now CPSW ALE will set/clean Host port bit in Unregistered Multicast Flood Mask (UNREG_MCAST_FLOOD_MASK) for every VLAN without checking if this port belongs to VLAN or not when ALLMULTI mode flag is set for nedev. This is working in non

[PATCH 5.1 104/405] ALSA: hda: fix unregister device twice on ASoC driver

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 4d95c51776b2edb4d4ebcea00b6e5a1fe538ce66 ] snd_hda_codec_device_new() is used by both legacy HDA and ASoC driver. However, we will call snd_hdac_device_unregister() in snd_hdac_ext_bus_device_remove() for ASoC device. This patch uses the type flag in hdac_device struct to

[PATCH 5.1 111/405] s390: qeth: address type mismatch warning

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 46b83629dede262315aa82179d105581f11763b6 ] clang produces a harmless warning for each use for the qeth_adp_supported macro: drivers/s390/net/qeth_l2_main.c:559:31: warning: implicit conversion from enumeration type 'enum qeth_ipa_setadp_cmd' to different enumeration type

[PATCH 5.1 112/405] arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 84ff7a09c371bc7417eabfda19bf7f113ec917b6 ] Rather embarrassingly, our futex() FUTEX_WAKE_OP implementation doesn't explicitly set the return value on the non-faulting path and instead leaves it holding the result of the underlying atomic operation. This means that any

[PATCH 5.1 110/405] net: phy: improve genphy_soft_reset

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 8c90b795e90f7753d23c18e8b95dd71b4a18c5d9 ] PHY's behave differently when being reset. Some reset registers to defaults, some don't. Some trigger an autoneg restart, some don't. So let's also set the autoneg restart bit when resetting. Then PHY behavior should be more

[PATCH 5.1 109/405] net: hns3: fix for TX clean num when cleaning TX BD

2019-05-29 Thread Greg Kroah-Hartman
[ Upstream commit 63380a1ae4ced8aef67659ff9547c69ef8b9613a ] hns3_desc_unused() returns how many BD have been cleaned, but new buffer has not been attached to them. The register of HNS3_RING_RX_RING_FBDNUM_REG returns how many BD need allocating new buffer to or need to cleaned. So the remaining

  1   2   3   4   5   6   7   8   9   10   >