[PATCH 4.9 214/223] i2c: qup: fixed releasing dma without flush operation completion

2019-08-02 Thread Greg Kroah-Hartman
From: Abhishek Sahu commit 7239872fb3400b21a8f5547257f9f86455867bd6 upstream. The QUP BSLP BAM generates the following error sometimes if the current I2C DMA transfer fails and the flush operation has been scheduled “bam-dma-engine 7884000.dma: Cannot free busy channel” If any I2C error

[PATCH 4.9 213/223] arm64: dts: marvell: Fix A37xx UART0 register size

2019-08-02 Thread Greg Kroah-Hartman
From: allen yan commit c737abc193d16e62e23e2fb585b8b7398ab380d8 upstream. Armada-37xx UART0 registers are 0x200 bytes wide. Right next to them are the UART1 registers that should not be declared in this node. Update the example in DT bindings document accordingly. Signed-off-by: allen yan

[PATCH 4.9 222/223] drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl

2019-08-02 Thread Greg Kroah-Hartman
From: Miroslav Lichvar commit 5515e9a6273b8c02034466bcbd717ac9f53dab99 upstream. The PPS assert/clear offset corrections are set by the PPS_SETPARAMS ioctl in the pps_ktime structs, which also contain flags. The flags are not initialized by applications (using the timepps.h header) and they

[PATCH 4.9 223/223] ceph: hold i_ceph_lock when removing caps for freeing inode

2019-08-02 Thread Greg Kroah-Hartman
From: Yan, Zheng commit d6e47819721ae2d9d090058ad5570a66f3c42e39 upstream. ceph_d_revalidate(, LOOKUP_RCU) may call __ceph_caps_issued_mask() on a freeing inode. Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.9 216/223] ISDN: hfcsusb: checking idx of ep configuration

2019-08-02 Thread Greg Kroah-Hartman
From: Phong Tran commit f384e62a82ba5d85408405fdd6aeff89354deaa9 upstream. The syzbot test with random endpoint address which made the idx is overflow in the table of endpoint configuations. this adds the checking for fixing the error report from syzbot KASAN: stack-out-of-bounds Read in

[PATCH 4.9 221/223] sched/fair: Dont free p->numa_faults with concurrent readers

2019-08-02 Thread Greg Kroah-Hartman
From: Jann Horn commit 16d51a590a8ce3befb1308e0e7ab77f3b661af33 upstream. When going through execve(), zero out the NUMA fault statistics instead of freeing them. During execve, the task is reachable through procfs and the scheduler. A concurrent /proc/*/sched reader can read data from a freed

[PATCH 4.9 202/223] usb: wusbcore: fix unbalanced get/put cluster_id

2019-08-02 Thread Greg Kroah-Hartman
From: Phong Tran commit f90bf1ece48a736097ea224430578fe586a9544c upstream. syzboot reported that https://syzkaller.appspot.com/bug?extid=fd2bd7df88c606eea4ef There is not consitency parameter in cluste_id_get/put calling. In case of getting the id with result is failure, the wusbhc->cluster_id

[PATCH 4.9 211/223] ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 99253eb750fda6a644d5188fb26c43bad8d5a745 ] Commit 5e1859fbcc3c ("ipv4: ipmr: various fixes and cleanups") fixed the issue for ipv4 ipmr: ip_mroute_setsockopt() & ip_mroute_getsockopt() should not access/set raw_sk(sk)->ipmr_table before making sure the socket is a raw

[PATCH 4.9 194/223] mailbox: handle failed named mailbox channel request

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 25777e5784a7b417967460d4fcf9660d05a0c320 ] Previously, if mbox_request_channel_byname was used with a name which did not exist in the "mbox-names" property of a mailbox client, the mailbox corresponding to the last entry in the "mbox-names" list would be incorrectly selected.

[PATCH 4.9 207/223] ALSA: line6: Fix wrong altsetting for LINE6_PODHD500_1

2019-08-02 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit 70256b42caaf3e13c2932c2be7903a73fbe8bb8b upstream. Commit 7b9584fa1c0b ("staging: line6: Move altsetting to properties") set a wrong altsetting for LINE6_PODHD500_1 during refactoring. Set the correct altsetting number to fix the issue. BugLink:

[PATCH 4.9 198/223] 9p: pass the correct prototype to read_cache_page

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit f053cbd4366051d7eb6ba1b8d529d20f719c2963 ] Fix the callback 9p passes to read_cache_page to actually have the proper type expected. Casting around function pointers can easily hide typing bugs, and defeats control flow protection. Link:

[PATCH 4.9 199/223] mm/mmu_notifier: use hlist_add_head_rcu()

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 543bdb2d825fe2400d6e951f1786d92139a16931 ] Make mmu_notifier_register() safer by issuing a memory barrier before registering a new notifier. This fixes a theoretical bug on weakly ordered CPUs. For example, take this simplified use of notifiers by a driver:

[PATCH 4.9 196/223] sh: prevent warnings when using iounmap

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 733f0025f0fb43e382b84db0930ae502099b7e62 ] When building drm/exynos for sh, as part of an allmodconfig build, the following warning triggered: exynos7_drm_decon.c: In function `decon_remove': exynos7_drm_decon.c:769:24: warning: unused variable `ctx' struct

[PATCH 4.9 206/223] hpet: Fix division by zero in hpet_time_div()

2019-08-02 Thread Greg Kroah-Hartman
From: Kefeng Wang commit 0c7d37f4d9b8446956e97b7c5e61173cdb7c8522 upstream. The base value in do_div() called by hpet_time_div() is truncated from unsigned long to uint32_t, resulting in a divide-by-zero exception. UBSAN: Undefined behaviour in ../drivers/char/hpet.c:572:2 division by zero

[PATCH 4.9 201/223] locking/lockdep: Hide unused class variable

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 68037aa78208f34bda4e5cd76c357f718b838cbb ] The usage is now hidden in an #ifdef, so we need to move the variable itself in there as well to avoid this warning: kernel/locking/lockdep_proc.c:203:21: error: unused variable 'class' [-Werror,-Wunused-variable] Signed-off-by:

[PATCH 4.9 183/223] mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 7efd105c27fd2323789b41b64763a0e33ed79c08 ] Since devm_regmap_init_mmio_clk can fail, add return value checking. Signed-off-by: Axel Lin Acked-by: Chen Feng Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/mfd/hi655x-pmic.c | 2 ++ 1 file changed, 2

[PATCH 4.9 185/223] powerpc/4xx/uic: clear pending interrupt after irq type/pol change

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 3ab3a0689e74e6aa5b41360bc18861040ddef5b1 ] When testing out gpio-keys with a button, a spurious interrupt (and therefore a key press or release event) gets triggered as soon as the driver enables the irq line for the first time. This patch clears any potential bogus generated

[PATCH 4.9 186/223] RDMA/i40iw: Set queue pair state when being queried

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 2e67e775845373905d2c2aecb9062c2c4352a535 ] The API for ib_query_qp requires the driver to set qp_state and cur_qp_state on return, add the missing sets. Fixes: d37498417947 ("i40iw: add files for iwarp interface") Signed-off-by: Changcheng Liu Acked-by: Shiraz Saleem

[PATCH 4.9 188/223] serial: sh-sci: Fix TX DMA buffer flushing and workqueue races

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 8493eab02608b0e82f67b892aa72882e510c31d0 ] When uart_flush_buffer() is called, the .flush_buffer() callback zeroes the tx_dma_len field. This may race with the work queue function handling transmit DMA requests: 1. If the buffer is flushed before the first DMA API call,

[PATCH 4.9 182/223] mfd: arizona: Fix undefined behavior

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 5da6cbcd2f395981aa9bfc571ace99f1c786c985 ] When the driver is used with a subdevice that is disabled in the kernel configuration, clang gets a little confused about the control flow and fails to notice that n_subdevs is only uninitialized when subdevs is NULL, and we check for

[PATCH 4.9 179/223] iio: iio-utils: Fix possible incorrect mask calculation

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 208a68c8393d6041a9086299f3d7943d44d6 ] On some machines, iio-sensor-proxy was returning all 0's for IIO sensor values. It turns out that the bits_used for this sensor is 32, which makes the mask calculation: *mask = (1 << 32) - 1; If the compiler interprets the 1 literals

[PATCH 4.9 195/223] powerpc/eeh: Handle hugepages in ioremap space

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 33439620680be5225c1b8806579a291e0d761ca0 ] In commit 4a7b06c157a2 ("powerpc/eeh: Handle hugepages in ioremap space") support for using hugepages in the vmalloc and ioremap areas was enabled for radix. Unfortunately this broke EEH MMIO error checking. Detection works by

[PATCH 4.9 184/223] um: Silence lockdep complaint about mmap_sem

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 80bf6ceaf9310b3f61934c69b382d4912deee049 ] When we get into activate_mm(), lockdep complains that we're doing something strange: WARNING: possible circular locking dependency detected 5.1.0-10252-gb00152307319-dirty #121 Not tainted

[PATCH 4.9 193/223] f2fs: avoid out-of-range memory access

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 56f3ce675103e3fb9e631cfb4131fc768bc23e9a ] blkoff_off might over 512 due to fs corrupt or security vulnerability. That should be checked before being using. Use ENTRIES_IN_SUM to protect invalid value in cur_data_blkoff. Signed-off-by: Ocean Chen Reviewed-by: Chao Yu

[PATCH 4.9 088/223] NFSv4: Handle the special Linux file open access mode

2019-08-02 Thread Greg Kroah-Hartman
From: Trond Myklebust commit 44942b4e457beda00981f616402a1a791e8c616e upstream. According to the open() manpage, Linux reserves the access mode 3 to mean "check for read and write permission on the file and return a file descriptor that can't be used for reading or writing." Currently, the

[PATCH 4.9 162/223] pinctrl: rockchip: fix leaked of_node references

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 3c89c70634bb0b6f48512de873e7a45c7e1fbaa5 ] 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 4.9 080/223] crypto: arm64/sha2-ce - correct digest for empty data in finup

2019-08-02 Thread Greg Kroah-Hartman
From: Elena Petrova commit 6bd934de1e393466b319d29c4427598fda096c57 upstream. The sha256-ce finup implementation for ARM64 produces wrong digest for empty input (len=0). Expected: the actual digest, result: initial value of SHA internal state. The error is in sha256_ce_finup: for empty data

[PATCH 4.9 192/223] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 9e005b761e7ad153dcf40a6cba1d681fe0830ac6 ] The next commit will make the way of passing CONFIG options more robust. Unfortunately, it would uncover another hidden issue; without this commit, skiroot_defconfig would be broken like this: | WRAP

[PATCH 4.9 089/223] lib/scatterlist: Fix mapping iterator when sg->offset is greater than PAGE_SIZE

2019-08-02 Thread Greg Kroah-Hartman
From: Christophe Leroy commit aeb87246537a83c2aff482f3f34a2e0991e02cbc upstream. All mapping iterator logic is based on the assumption that sg->offset is always lower than PAGE_SIZE. But there are situations where sg->offset is such that the SG item is on the second page. In that case

[PATCH 4.9 107/223] floppy: fix out-of-bounds read in copy_buffer

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit da99466ac243f15fbba65bd261bfc75ffa1532b6 ] This fixes a global out-of-bounds read access in the copy_buffer function of the floppy driver. The FDDEFPRM ioctl allows one to set the geometry of a disk. The sect and head fields (unsigned int) of the floppy_drive structure are

[PATCH 4.9 087/223] tracing/snapshot: Resize spare buffer if size changed

2019-08-02 Thread Greg Kroah-Hartman
From: Eiichi Tsukata commit 46cc0b44428d0f0e81f11ea98217fc0edfbeab07 upstream. Current snapshot implementation swaps two ring_buffers even though their sizes are different from each other, that can cause an inconsistency between the contents of buffer_size_kb file and the current buffer size.

[PATCH 4.9 191/223] RDMA/rxe: Fill in wc byte_len with IB_WC_RECV_RDMA_WITH_IMM

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit bdce1290493caa3f8119f24b5dacc3fb7ca27389 ] Calculate the correct byte_len on the receiving side when a work completion is generated with IB_WC_RECV_RDMA_WITH_IMM opcode. According to the IBA byte_len must indicate the number of written bytes, whereas it was always equal to zero

[PATCH 4.9 086/223] iwlwifi: pcie: dont service an interrupt that was masked

2019-08-02 Thread Greg Kroah-Hartman
From: Emmanuel Grumbach commit 3b57a10ca14c619707398dc58fe5ece18c95b20b upstream. Sometimes the register status can include interrupts that were masked. We can, for example, get the RF-Kill bit set in the interrupt status register although this interrupt was masked. Then if we get the ALIVE

[PATCH 4.9 108/223] coda: pass the host file in vma->vm_file on mmap

2019-08-02 Thread Greg Kroah-Hartman
From: Jan Harkes commit 7fa0a1da3dadfd9216df7745a1331fdaa0940d1c upstream. Patch series "Coda updates". The following patch series is a collection of various fixes for Coda, most of which were collected from linux-fsdevel or linux-kernel but which have as yet not found their way upstream.

[PATCH 4.9 123/223] usb: Handle USB3 remote wakeup for LPM enabled devices correctly

2019-08-02 Thread Greg Kroah-Hartman
From: Lee, Chiasheng commit e244c4699f859cf7149b0781b1894c7996a8a1df upstream. With Link Power Management (LPM) enabled USB3 links transition to low power U1/U2 link states from U0 state automatically. Current hub code detects USB3 remote wakeups by checking if the software state still shows

[PATCH 4.9 116/223] parisc: Ensure userspace privilege for ptraced processes in regset functions

2019-08-02 Thread Greg Kroah-Hartman
From: Helge Deller commit 34c32fc603311a72cb558e5e337555434f64c27b upstream. On parisc the privilege level of a process is stored in the lowest two bits of the instruction pointers (IAOQ0 and IAOQ1). On Linux we use privilege level 0 for the kernel and privilege level 3 for user-space. So

[PATCH 4.9 099/223] 9p/virtio: Add cleanup path in p9_virtio_init

2019-08-02 Thread Greg Kroah-Hartman
From: YueHaibing commit d4548543fc4ece56c6f04b8586f435fb4fd84c20 upstream. KASAN report this: BUG: unable to handle kernel paging request at a0097000 PGD 3870067 P4D 3870067 PUD 3871063 PMD 2326e2067 PTE 0 Oops: [#1 CPU: 0 PID: 5340 Comm: modprobe Not tainted 5.1.0-rc7+ #25

[PATCH 4.9 103/223] take floppy compat ioctls to sodding floppy.c

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 229b53c9bf4e1132a4aa6feb9632a7a1f1d08c5c ] all other drivers recognizing those ioctls are very much *not* biarch. Signed-off-by: Al Viro Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- block/compat_ioctl.c | 340

[PATCH 4.9 102/223] libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields

2019-08-02 Thread Greg Kroah-Hartman
From: Dan Williams commit 7e3e888dfc138089f4c15a81b418e88f0978f744 upstream. At namespace creation time there is the potential for the "expected to be zero" fields of a 'pfn' info-block to be filled with indeterminate data. While the kernel buffer is zeroed on allocation it is immediately

[PATCH 4.9 104/223] floppy: fix div-by-zero in setup_format_params

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit f3554aeb991214cbfafd17d55e2bfddb50282e32 ] This fixes a divide by zero error in the setup_format_params function of the floppy driver. Two consecutive ioctls can trigger the bug: The first one should set the drive geometry with such .sect and .rate values for the

[PATCH 4.9 117/223] parisc: Fix kernel panic due invalid values in IAOQ0 or IAOQ1

2019-08-02 Thread Greg Kroah-Hartman
From: Helge Deller commit 10835c854685393a921b68f529bf740fa7c9984d upstream. On parisc the privilege level of a process is stored in the lowest two bits of the instruction pointers (IAOQ0 and IAOQ1). On Linux we use privilege level 0 for the kernel and privilege level 3 for user-space. So

[PATCH 4.9 120/223] eCryptfs: fix a couple type promotion bugs

2019-08-02 Thread Greg Kroah-Hartman
From: Dan Carpenter commit 0bdf8a8245fdea6f075a5fede833a5fcf1b3466c upstream. ECRYPTFS_SIZE_AND_MARKER_BYTES is type size_t, so if "rc" is negative that gets type promoted to a high positive value and treated as success. Fixes: 778aeb42a708 ("eCryptfs: Cleanup and optimize

[PATCH 4.9 115/223] um: Fix FP register size for XSTATE/XSAVE

2019-08-02 Thread Greg Kroah-Hartman
From: Thomas Meyer commit 6f602afda7275c24c20ba38b5b6cd4ed08561fff upstream. Hard code max size. Taken from https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/common/x86-xstate.h Signed-off-by: Thomas Meyer Signed-off-by: Richard Weinberger Signed-off-by: Alessio Balsini

[PATCH 4.9 129/223] bnx2x: Prevent load reordering in tx completion processing

2019-08-02 Thread Greg Kroah-Hartman
From: Brian King [ Upstream commit ea811b795df24644a8eb760b493c43fba4450677 ] This patch fixes an issue seen on Power systems with bnx2x which results in the skb is NULL WARN_ON in bnx2x_free_tx_pkt firing due to the skb pointer getting loaded in bnx2x_free_tx_pkt prior to the hw_cons load in

[PATCH 4.9 112/223] PCI: hv: Fix a use-after-free bug in hv_eject_device_work()

2019-08-02 Thread Greg Kroah-Hartman
From: Dexuan Cui commit 4df591b20b80cb77920953812d894db259d85bd7 upstream. Fix a use-after-free in hv_eject_device_work(). Fixes: 05f151a73ec2 ("PCI: hv: Fix a memory leak in hv_eject_device_work()") Signed-off-by: Dexuan Cui Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley Cc:

[PATCH 4.9 106/223] floppy: fix invalid pointer dereference in drive_name

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 9b04609b784027968348796a18f601aed9db3789 ] This fixes the invalid pointer dereference in the drive_name function of the floppy driver. The native_format field of the struct floppy_drive_params is used as floppy_type array index in the drive_name function. Thus, the field

[PATCH 4.9 127/223] lib/strscpy: Shut up KASAN false-positives in strscpy()

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 1a3241ff10d038ecd096d03380327f2a0b5840a6 ] strscpy() performs the word-at-a-time optimistic reads. So it may may access the memory past the end of the object, which is perfectly fine since strscpy() doesn't use that (past-the-end) data and makes sure the optimistic read won't

Re: [PATCH 0/5] Fix FIFO-99 abuse

2019-08-02 Thread Thomas Gleixner
On Fri, 2 Aug 2019, Peter Zijlstra wrote: > On Thu, Aug 01, 2019 at 02:17:07PM +0100, Qais Yousef wrote: > > On 08/01/19 13:13, Peter Zijlstra wrote: > > > I noticed a bunch of kthreads defaulted to FIFO-99, fix them. > > > > > > The generic default is FIFO-50, the admin will have to configure

[GIT PULL] Power management fix for v5.3-rc3

2019-08-02 Thread Rafael J. Wysocki
Hi Linus, Please pull from the tag git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \ pm-5.3-rc3 with top-most commit 42787ed79638dc7f0f8d5c164caba1e87bfab50f ACPI: PM: Fix regression in acpi_device_set_power() on top of commit 609488bc979f99f805f34e9a32c1e3b71179d10b

[PATCH 4.9 131/223] caif-hsi: fix possible deadlock in cfhsi_exit_module()

2019-08-02 Thread Greg Kroah-Hartman
From: Taehee Yoo [ Upstream commit fdd258d49e88a9e0b49ef04a506a796f1c768a8e ] cfhsi_exit_module() calls unregister_netdev() under rtnl_lock(). but unregister_netdev() internally calls rtnl_lock(). So deadlock would occur. Fixes: c41254006377 ("caif-hsi: Add rtnl support") Signed-off-by: Taehee

[PATCH 4.9 133/223] ipv4: dont set IPv6 only flags to IPv4 addresses

2019-08-02 Thread Greg Kroah-Hartman
From: Matteo Croce [ Upstream commit 2e60546368165c2449564d71f6005dda9205b5fb ] Avoid the situation where an IPV6 only flag is applied to an IPv4 address: # ip addr add 192.0.2.1/24 dev dummy0 nodad home mngtmpaddr noprefixroute # ip -4 addr show dev dummy0 2: dummy0: mtu 1500

[PATCH 4.9 164/223] drm/bridge: tc358767: read display_props in get_modes()

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 3231573065ad4f4ecc5c9147b24f29f846dc0c2f ] We need to know the link bandwidth to filter out modes we cannot support, so we need to have read the display props before doing the filtering. To ensure we have up to date display props, call tc_get_display_props() in the beginning of

[PATCH 4.9 139/223] rxrpc: Fix send on a connected, but unbound socket

2019-08-02 Thread Greg Kroah-Hartman
From: David Howells [ Upstream commit e835ada07091f40dcfb1bc735082bd0a7c005e59 ] If sendmsg() or sendmmsg() is called on a connected socket that hasn't had bind() called on it, then an oops will occur when the kernel tries to connect the call because no local endpoint has been allocated. Fix

[PATCH 4.9 143/223] macsec: fix checksumming after decryption

2019-08-02 Thread Greg Kroah-Hartman
From: Andreas Steinmetz [ Upstream commit 7d8b16b9facb0dd81d1469808dd9a575fa1d525a ] Fix checksumming after decryption. Signed-off-by: Andreas Steinmetz Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/macsec.c |1 + 1 file changed, 1 insertion(+) ---

Re: [PATCH] power: supply: Init device wakeup after device_add()

2019-08-02 Thread Rafael J. Wysocki
On Thursday, August 1, 2019 11:33:30 PM CEST Stephen Boyd wrote: > We may want to use the device pointer in device_init_wakeup() with > functions that expect the device to already be added with device_add(). > For example, if we were to link the device initializing wakeup to > something in sysfs

[PATCH 4.9 134/223] net: bcmgenet: use promisc for unsupported filters

2019-08-02 Thread Greg Kroah-Hartman
From: Justin Chen [ Upstream commit 35cbef9863640f06107144687bd13151bc2e8ce3 ] Currently we silently ignore filters if we cannot meet the filter requirements. This will lead to the MAC dropping packets that are expected to pass. A better solution would be to set the NIC to promisc mode when the

[PATCH 4.9 140/223] sky2: Disable MSI on ASUS P6T

2019-08-02 Thread Greg Kroah-Hartman
From: Takashi Iwai [ Upstream commit a261e3797506bd561700be643fe1a85bf81e9661 ] The onboard sky2 NIC on ASUS P6T WS PRO doesn't work after PM resume due to the infamous IRQ problem. Disabling MSI works around it, so let's add it to the blacklist. Unfortunately the BIOS on the machine doesn't

[PATCH 4.9 153/223] perf/events/amd/uncore: Fix amd_uncore_llc ID to use pre-defined cpu_llc_id

2019-08-02 Thread Greg Kroah-Hartman
Current logic iterates over CPUID Fn801d leafs (Cache Properties) to detect the last level cache, and derive the last-level cache ID. However, this information is already available in the cpu_llc_id. Therefore, make use of it instead. Signed-off-by: Suravee Suthikulpanit Signed-off-by:

[PATCH 4.9 167/223] tty/serial: digicolor: Fix digicolor-usart already registered warning

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit c7ad9ba0611c53cfe194223db02e3bca015f0674 ] When modprobe/rmmod/modprobe module, if platform_driver_register() fails, the kernel complained, proc_dir_entry 'driver/digicolor-usart' already registered WARNING: CPU: 1 PID: 5636 at fs/proc/generic.c:360

[PATCH 4.9 171/223] phy: renesas: rcar-gen2: Fix memory leak at error paths

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit d4a36e82924d3305a17ac987a510f3902df5a4b2 ] This patch fixes memory leak at error paths of the probe function. In for_each_child_of_node, if the loop returns, the driver should call of_put_node() before returns. Reported-by: Julia Lawall Fixes: 1233f59f745b237 ("phy: Renesas

[PATCH 4.9 170/223] drm/virtio: Add memory barriers for capset cache.

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 9ff3a5c88e1f1ab17a31402b96d45abe14aab9d7 ] After data is copied to the cache entry, atomic_set is used indicate that the data is the entry is valid without appropriate memory barriers. Similarly the read side was missing the corresponding memory barriers. Signed-off-by: David

[PATCH 4.9 168/223] tty: serial: msm_serial: avoid system lockup condition

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit ba3684f99f1b25d2a30b6956d02d339d7acb9799 ] The function msm_wait_for_xmitr can be taken with interrupts disabled. In order to avoid a potential system lockup - demonstrated under stress testing conditions on SoC QCS404/5 - make sure we wait for a bounded amount of time. Tested

[PATCH 4.9 166/223] memstick: Fix error cleanup path of memstick_init

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 65f1a0d39c289bb6fc85635528cd36c4b07f560e ] If bus_register fails. On its error handling path, it has cleaned up what it has done. There is no need to call bus_unregister again. Otherwise, if bus_unregister is called, issues such as null-ptr-deref will arise. Syzkaller report

[PATCH 4.9 169/223] serial: 8250: Fix TX interrupt handling condition

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit db1b5bc047b3cadaedab3826bba82c3d9e023c4b ] Interrupt handler checked THRE bit (transmitter holding register empty) in LSR to detect if TX fifo is empty. In case when there is only receive interrupts the TX handling got called because THRE bit in LSR is set when there is no

[PATCH 4.9 174/223] usb: gadget: Zero ffs_io_data

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 508595515f4bcfe36246e4a565cf280937aeaade ] In some cases the "Allocate & copy" block in ffs_epfile_io() is not executed. Consequently, in such a case ffs_alloc_buffer() is never called and struct ffs_io_data is not initialized properly. This in turn leads to problems when

[PATCH 4.9 176/223] PCI: sysfs: Ignore lockdep for remove attribute

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit dc6b698a86fe40a50525433eb8e92a267847f6f9 ] With CONFIG_PROVE_LOCKING=y, using sysfs to remove a bridge with a device below it causes a lockdep warning, e.g., # echo 1 > /sys/class/pci_bus/:00/device/:00:00.0/remove

[PATCH 4.9 173/223] tty: serial_core: Set port active bit in uart_port_activate

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 13b18d35909707571af9539f7731389fbf0feb31 ] A bug was introduced by commit b3b576461864 ("tty: serial_core: convert uart_open to use tty_port_open"). It caused a constant warning printed into the system log regarding the tty and port counter mismatch: [ 21.644197] ttyS ttySx:

[PATCH 4.9 178/223] PCI: xilinx-nwl: Fix Multi MSI data programming

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 181fa434d0514e40ebf6e9721f2b72700287b6e2 ] According to the PCI Local Bus specification Revision 3.0, section 6.8.1.3 (Message Control for MSI), endpoints that are Multiple Message Capable as defined by bits [3:1] in the Message Control for MSI can request a number of vectors

[PATCH 4.9 177/223] kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 589834b3a0097a4908f4112eac0ca2feb486fa32 ] In commit ebcc5928c5d9 ("arm64: Silence gcc warnings about arch ABI drift"), the arm64 Makefile added -Wno-psabi to KBUILD_CFLAGS, which is a GCC only option so clang rightfully complains: warning: unknown warning option '-Wno-psabi'

[PATCH 4.9 146/223] bonding: validate ip header before check IPPROTO_IGMP

2019-08-02 Thread Greg Kroah-Hartman
From: Cong Wang [ Upstream commit 9d1bc24b52fb8c5d859f9a47084bf1179470e04c ] bond_xmit_roundrobin() checks for IGMP packets but it parses the IP header even before checking skb->protocol. We should validate the IP header with pskb_may_pull() before using iph->protocol. Reported-and-tested-by:

[PATCH 4.9 175/223] powerpc/pci/of: Fix OF flags parsing for 64bit BARs

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit df5be5be8735ef2ae80d5ae1f2453cd81a035c4b ] When the firmware does PCI BAR resource allocation, it passes the assigned addresses and flags (prefetch/64bit/...) via the "reg" property of a PCI device device tree node so the kernel does not need to do resource allocation. The

[PATCH 4.9 165/223] drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 8dbfc5b65023b67397aca28e8adb25c819f6398c ] The pixel clock unit in the first two registers (0x00 and 0x01) of sii9022 is 10kHz, not 1kHz as in struct drm_display_mode. Division by 10 fixes the issue. Signed-off-by: Jyri Sarha Reviewed-by: Andrzej Hajda Reviewed-by: Laurent

[PATCH 4.9 172/223] drm/rockchip: Properly adjust to a true clock in adjusted_mode

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 99b9683f2142b20bad78e61f7f829e8714e45685 ] When fixing up the clock in vop_crtc_mode_fixup() we're not doing it quite correctly. Specifically if we've got the true clock 26667 Hz, we'll perform this calculation: 26667 / 1000 => 26 Later when we try to set the

[PATCH 4.9 154/223] NFSv4: Fix open create exclusive when the server reboots

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 8fd1ab747d2b1ec7ec663ad0b41a32eaa35117a8 ] If the server that does not implement NFSv4.1 persistent session semantics reboots while we are performing an exclusive create, then the return value of NFS4ERR_DELAY when we replay the open during the grace period causes us to lose the

[PATCH 4.9 157/223] nfsd: fix performance-limiting session calculation

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit c54f24e338ed2a35218f117a4a1afb5f9e2b4e64 ] We're unintentionally limiting the number of slots per nfsv4.1 session to 10. Often more than 10 simultaneous RPCs are needed for the best performance. This calculation was meant to prevent any one client from using up more than a

[PATCH 4.9 151/223] perf/x86/amd/uncore: Rename L2 to LLC

2019-08-02 Thread Greg Kroah-Hartman
This patch renames L2 counters to LLC counters. In AMD Family17h processors, L3 cache counter is supported. Since older families have at most L2 counters, last level cache (LLC) indicates L2/L3 based on the family. Signed-off-by: Janakarajan Natarajan Signed-off-by: Peter Zijlstra (Intel) Cc:

[PATCH 4.9 159/223] drm/panel: simple: Fix panel_simple_dsi_probe

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 7ad9db66fafb0f0ad53fd2a66217105da5ddeffe ] In case mipi_dsi_attach() fails remove the registered panel to avoid added panel without corresponding device. Signed-off-by: Peter Ujfalusi Signed-off-by: Thierry Reding Link:

[PATCH 4.9 155/223] nfsd: increase DRC cache limit

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 44d8660d3bb0a1c8363ebcb906af2343ea8e15f6 ] An NFSv4.1+ client negotiates the size of its duplicate reply cache size in the initial CREATE_SESSION request. The server preallocates the memory for the duplicate reply cache to ensure that we'll never fail to record the response to

[PATCH 4.9 147/223] tcp: Reset bytes_acked and bytes_received when disconnecting

2019-08-02 Thread Greg Kroah-Hartman
From: Christoph Paasch [ Upstream commit e858faf556d4e14c750ba1e8852783c6f9520a0e ] If an app is playing tricks to reuse a socket via tcp_disconnect(), bytes_acked/received needs to be reset to 0. Otherwise tcp_info will report the sum of the current and the old connection.. Cc: Eric Dumazet

[PATCH 4.9 158/223] nfsd: Fix overflow causing non-working mounts on 1 TB machines

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 3b2d4dcf71c4a91b420f835e52ddea8192300a3b ] Since commit 10a68cdf10 (nfsd: fix performance-limiting session calculation) (Linux 5.1-rc1 and 4.19.31), shares from NFS servers with 1 TB of memory cannot be mounted anymore. The mount just hangs on the client. The gist of commit

[PATCH 4.9 152/223] perf/x86/amd/uncore: Get correct number of cores sharing last level cache

2019-08-02 Thread Greg Kroah-Hartman
In Family 17h, the number of cores sharing a cache level is obtained from the Cache Properties CPUID leaf (0x801d) by passing in the cache level in ECX. In prior families, a cache level of 2 was used to determine this information. To get the right information, irrespective of Family, iterate

[PATCH 4.9 163/223] tty: serial: cpm_uart - fix init when SMC is relocated

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 06aaa3d066db87e8478522d910285141d44b1e58 ] SMC relocation can also be activated earlier by the bootloader, so the driver's behaviour cannot rely on selected kernel config. When the SMC is relocated, CPM_CR_INIT_TRX cannot be used. But the only thing CPM_CR_INIT_TRX does is to

[PATCH 4.9 149/223] net: bridge: mcast: fix stale ipv6 hdr pointer when handling v6 query

2019-08-02 Thread Greg Kroah-Hartman
From: Nikolay Aleksandrov [ Upstream commit 3b26a5d03d35d8f732d75951218983c0f7f68dff ] We get a pointer to the ipv6 hdr in br_ip6_multicast_query but we may call pskb_may_pull afterwards and end up using a stale pointer. So use the header directly, it's just 1 place where it's needed. Fixes:

[PATCH 4.9 130/223] bnx2x: Prevent ptp_task to be rescheduled indefinitely

2019-08-02 Thread Greg Kroah-Hartman
From: "Guilherme G. Piccoli" [ Upstream commit 3c91f25c2f72ba6001775a5932857c1d2131c531 ] Currently bnx2x ptp worker tries to read a register with timestamp information in case of TX packet timestamping and in case it fails, the routine reschedules itself indefinitely. This was reported as a

Re: [PATCH] sched/fair: util_est: fast ramp-up EWMA on utilization increases

2019-08-02 Thread Patrick Bellasi
Hi Peter, Vincent, is there anything different I can do on this? Cheers, Patrick On 28-Jun 15:00, Patrick Bellasi wrote: > On 28-Jun 14:38, Peter Zijlstra wrote: > > On Fri, Jun 28, 2019 at 11:08:14AM +0100, Patrick Bellasi wrote: > > > On 26-Jun 13:40, Vincent Guittot wrote: > > > > Hi Patrick,

[PATCH 4.9 150/223] net: bridge: stp: dont cache eth dest pointer before skb pull

2019-08-02 Thread Greg Kroah-Hartman
From: Nikolay Aleksandrov [ Upstream commit 2446a68ae6a8cee6d480e2f5b52f5007c7c41312 ] Don't cache eth dest pointer before calling pskb_may_pull. Fixes: cf0f02d04a83 ("[BRIDGE]: use llc for receiving STP packets") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller

[PATCH 4.9 148/223] net: bridge: mcast: fix stale nsrcs pointer in igmp3/mld2 report handling

2019-08-02 Thread Greg Kroah-Hartman
From: Nikolay Aleksandrov [ Upstream commit e57f61858b7cf478ed6fa23ed4b3876b1c9625c4 ] We take a pointer to grec prior to calling pskb_may_pull and use it afterwards to get nsrcs so record nsrcs before the pull when handling igmp3 and we get a pointer to nsrcs and call pskb_may_pull when

[PATCH 4.9 161/223] tty: max310x: Fix invalid baudrate divisors calculator

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 35240ba26a932b279a513f66fa4cabfd7af55221 ] Current calculator doesn't do it' job quite correct. First of all the max310x baud-rates generator supports the divisor being less than 16. In this case the x2/x4 modes can be used to double or quadruple the reference frequency. But the

[PATCH 4.9 160/223] usb: core: hub: Disable hub-initiated U1/U2

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit 561759292774707b71ee61aecc07724905bb7ef1 ] If the device rejects the control transfer to enable device-initiated U1/U2 entry, then the device will not initiate U1/U2 transition. To improve the performance, the downstream port should not initate transition to U1/U2 to avoid the

[PATCH 4.9 137/223] net: openvswitch: fix csum updates for MPLS actions

2019-08-02 Thread Greg Kroah-Hartman
From: John Hurley [ Upstream commit 0e3183cd2a64843a95b62f8bd4a83605a4cf0615 ] Skbs may have their checksum value populated by HW. If this is a checksum calculated over the entire packet then the CHECKSUM_COMPLETE field is marked. Changes to the data pointer on the skb throughout the network

[PATCH 4.9 156/223] nfsd: give out fewer session slots as limit approaches

2019-08-02 Thread Greg Kroah-Hartman
[ Upstream commit de766e570413bd0484af0b580299b495ada625c3 ] Instead of granting client's full requests until we hit our DRC size limit and then failing CREATE_SESSIONs (and hence mounts) completely, start granting clients smaller slot tables as we approach the limit. The factor chosen here is

[PATCH 4.9 138/223] nfc: fix potential illegal memory access

2019-08-02 Thread Greg Kroah-Hartman
From: Yang Wei [ Upstream commit dd006fc434e107ef90f7de0db9907cbc1c521645 ] The frags_q is not properly initialized, it may result in illegal memory access when conn_info is NULL. The "goto free_exit" should be replaced by "goto exit". Signed-off-by: Yang Wei Signed-off-by: David S. Miller

[PATCH 4.9 136/223] net: neigh: fix multiple neigh timer scheduling

2019-08-02 Thread Greg Kroah-Hartman
From: Lorenzo Bianconi [ Upstream commit 071c37983d99da07797294ea78e9da1a6e287144 ] Neigh timer can be scheduled multiple times from userspace adding multiple neigh entries and forcing the neigh timer scheduling passing NTF_USE in the netlink requests. This will result in a refcount leak and in

[PATCH 4.9 132/223] igmp: fix memory leak in igmpv3_del_delrec()

2019-08-02 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit e5b1c6c6277d5a283290a8c033c72544746f9b5b ] im->tomb and/or im->sources might not be NULL, but we currently overwrite their values blindly. Using swap() will make sure the following call to kfree_pmc(pmc) will properly free the psf structures. Tested with

[PATCH 4.9 135/223] net: dsa: mv88e6xxx: wait after reset deactivation

2019-08-02 Thread Greg Kroah-Hartman
From: Baruch Siach [ Upstream commit 7b75e49de424ceb53d13e60f35d0a73765626fda ] Add a 1ms delay after reset deactivation. Otherwise the chip returns bogus ID value. This is observed with 88E6390 (Peridot) chip. Signed-off-by: Baruch Siach Reviewed-by: Andrew Lunn Signed-off-by: David S.

[PATCH 4.9 145/223] netrom: hold sock when setting skb->destructor

2019-08-02 Thread Greg Kroah-Hartman
From: Cong Wang [ Upstream commit 4638faac032756f7eab5524be7be56bee77e426b ] sock_efree() releases the sock refcnt, if we don't hold this refcnt when setting skb->destructor to it, the refcnt would not be balanced. This leads to several bug reports from syzbot. I have checked other users of

[PATCH 4.9 113/223] crypto: caam - limit output IV to CBC to work around CTR mode DMA issue

2019-08-02 Thread Greg Kroah-Hartman
From: Ard Biesheuvel commit ed527b13d800dd515a9e6c582f0a73eca65b2e1b upstream. The CAAM driver currently violates an undocumented and slightly controversial requirement imposed by the crypto stack that a buffer referred to by the request structure via its virtual address may not be modified

[PATCH 4.9 144/223] netrom: fix a memory leak in nr_rx_frame()

2019-08-02 Thread Greg Kroah-Hartman
From: Cong Wang [ Upstream commit c8c8218ec5af5d2598381883acbefbf604e56b5e ] When the skb is associated with a new sock, just assigning it to skb->sk is not sufficient, we have to set its destructor to free the sock properly too. Reported-by:

[PATCH 4.9 142/223] macsec: fix use-after-free of skb during RX

2019-08-02 Thread Greg Kroah-Hartman
From: Andreas Steinmetz [ Upstream commit 095c02da80a41cf6d311c504d8955d6d1c2add10 ] Fix use-after-free of skb when rx_handler returns RX_HANDLER_PASS. Signed-off-by: Andreas Steinmetz Acked-by: Willem de Bruijn Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.9 141/223] vrf: make sure skb->data contains ip header to make routing

2019-08-02 Thread Greg Kroah-Hartman
From: Peter Kosyh [ Upstream commit 107e47cc80ec37cb332bd41b22b1c7779e22e018 ] vrf_process_v4_outbound() and vrf_process_v6_outbound() do routing using ip/ipv6 addresses, but don't make sure the header is available in skb->data[] (skb_headlen() is less then header size). Case: 1) igb driver

<    5   6   7   8   9   10   11   12   13   14   >