[PATCH 4.19 064/113] kallsyms: exclude kasan local symbols on s390

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 33177f01ca3fe550146bb9001bec2fd806b2f40c ] gcc asan instrumentation emits the following sequence to store frame pc when the kernel is built with CONFIG_RELOCATABLE: debug/vsprintf.s: .section.data.rel.ro.local,"aw" .align 8 .LC3: .quad

[PATCH 4.19 049/113] mfd: core: Set fwnode for created devices

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit c176c6d7e932662668bcaec2d763657096589d85 ] The logic for setting the of_node on devices created by mfd did not set the fwnode pointer to match, which caused fwnode-based APIs to malfunction on these devices since the fwnode pointer was null. Fix this. Signed-off-by: Robert

Re: [PATCH v12 0/6] Add utilization clamping support (CGroups API)

2019-07-29 Thread Tejun Heo
Hello, Looks good to me. On cgroup side, Acked-by: Tejun Heo Thanks. -- tejun

Re: [PATCH v2 1/7] ASoC: fsl_sai: Add registers definition for multiple datalines

2019-07-29 Thread Nicolin Chen
On Sun, Jul 28, 2019 at 10:24:23PM +0300, Daniel Baluta wrote: > SAI IP supports up to 8 data lines. The configuration of > supported number of data lines is decided at SoC integration > time. > > This patch adds definitions for all related data TX/RX registers: > * TDR0..7, Transmit data

Re: [PATCH 03/14] sched,fair: redefine runnable_load_avg as the sum of task_h_load

2019-07-29 Thread Peter Zijlstra
On Mon, Jul 22, 2019 at 01:33:37PM -0400, Rik van Riel wrote: > @@ -3012,25 +2983,24 @@ static inline int throttled_hierarchy(struct cfs_rq > *cfs_rq); > static void update_cfs_group(struct sched_entity *se) > { > struct cfs_rq *gcfs_rq = group_cfs_rq(se); > - long shares, runnable; >

[PATCH 4.19 053/113] um: Silence lockdep complaint about mmap_sem

2019-07-29 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.19 047/113] recordmcount: Fix spurious mcount entries on powerpc

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 80e5302e4bc85a6b685b7668c36c6487b5f90e9a ] An impending change to enable HAVE_C_RECORDMCOUNT on powerpc leads to warnings such as the following: # modprobe kprobe_example ftrace-powerpc: Not expected bl: opcode is 3c4c0001 WARNING: CPU: 0 PID: 227 at

[PATCH 4.19 042/113] genksyms: Teach parser about 128-bit built-in types

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit a222061b85234d8a44486a46bd4df7e2cda52385 ] __uint128_t crops up in a few files that export symbols to modules, so teach genksyms about it and the other GCC built-in 128-bit integer types so that we don't end up skipping the CRC generation for some symbols due to the parser

[PATCH 4.19 044/113] iio: iio-utils: Fix possible incorrect mask calculation

2019-07-29 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.19 041/113] kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS

2019-07-29 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.19 020/113] drm/crc-debugfs: User irqsafe spinlock in drm_crtc_add_crc_entry

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 1882018a70e06376234133e69ede9dd743b4dbd9 ] We can be called from any context, we need to be prepared. Noticed this while hacking on vkms, which calls this function from a normal worker. Which really upsets lockdep. Cc: Rodrigo Siqueira Cc: Tomeu Vizoso Cc: Emil Velikov Cc:

[PATCH 4.19 002/113] drm/panel: simple: Fix panel_simple_dsi_probe

2019-07-29 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.19 018/113] drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz

2019-07-29 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.19 029/113] drm/amd/display: fix compilation error

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 88099f53cc3717437f5fc9cf84205c5b65118377 ] this patch fixes below compilation error drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In function ‘dcn10_apply_ctx_for_surface’: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2378:3: error:

[PATCH 4.19 030/113] powerpc/pseries/mobility: prevent cpu hotplug during DT update

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit e59a175faa8df9d674247946f2a5a9c29c835725 ] CPU online/offline code paths are sensitive to parts of the device tree (various cpu node properties, cache nodes) that can be changed as a result of a migration. Prevent CPU hotplug while the device tree potentially is inconsistent.

[PATCH 4.19 016/113] PCI: Return error if cannot probe VF

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 76002d8b48c4b08c9bd414517dd295e132ad910b ] Commit 0e7df22401a3 ("PCI: Add sysfs sriov_drivers_autoprobe to control VF driver binding") allows the user to specify that drivers for VFs of a PF should not be probed, but it actually causes pci_device_probe() to return success back

[PATCH 4.19 007/113] tty: max310x: Fix invalid baudrate divisors calculator

2019-07-29 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.19 017/113] drm/bridge: tc358767: read display_props in get_modes()

2019-07-29 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.19 008/113] pinctrl: rockchip: fix leaked of_node references

2019-07-29 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.14 286/293] binder: prevent transactions to context manager from its own process.

2019-07-29 Thread Greg Kroah-Hartman
From: Hridya Valsaraju commit 49ed96943a8e0c62cc5a9b0a6cfc88be87d1fcec upstream. Currently, a transaction to context manager from its own process is prevented by checking if its binder_proc struct is the same as that of the sender. However, this would not catch cases where the process opens the

[PATCH 4.14 288/293] hpet: Fix division by zero in hpet_time_div()

2019-07-29 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.14 290/293] ALSA: hda - Add a conexant codec entry to let mute led work

2019-07-29 Thread Greg Kroah-Hartman
From: Hui Wang commit 3f8809499bf02ef7874254c5e23fc764a47a21a0 upstream. This conexant codec isn't in the supported codec list yet, the hda generic driver can drive this codec well, but on a Lenovo machine with mute/mic-mute leds, we need to apply CXT_FIXUP_THINKPAD_ACPI to make the leds work.

[PATCH 4.14 275/293] mm/mmu_notifier: use hlist_add_head_rcu()

2019-07-29 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.14 276/293] locking/lockdep: Fix lock used or unused stats error

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 68d41d8c94a31dfb8233ab90b9baf41a2ed2da68 ] The stats variable nr_unused_locks is incremented every time a new lock class is register and decremented when the lock is first used in __lock_acquire(). And after all, it is shown and checked in lockdep_stats. However, under

[PATCH 4.19 001/113] hvsock: fix epollout hang from race condition

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit cb359b60416701c8bed82fec79de25a144beb893 ] Currently, hvsock can enter into a state where epoll_wait on EPOLLOUT will not return even when the hvsock socket is writable, under some race condition. This can happen under the following sequence: - fd = socket(hvsocket) - fd_out =

[PATCH 4.14 270/293] sh: prevent warnings when using iounmap

2019-07-29 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.14 272/293] 9p: pass the correct prototype to read_cache_page

2019-07-29 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.14 273/293] mm/gup.c: mark undo_dev_pagemap as __maybe_unused

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 790c73690c2bbecb3f6f8becbdb11ddc9bcff8cc ] Several mips builds generate the following build warning. mm/gup.c:1788:13: warning: 'undo_dev_pagemap' defined but not used The function is declared unconditionally but only called from behind various ifdefs. Mark it

[PATCH 4.14 287/293] fpga-manager: altera-ps-spi: Fix build error

2019-07-29 Thread Greg Kroah-Hartman
From: YueHaibing commit 3d139703d397f6281368047ba7ad1c8bf95aa8ab upstream. If BITREVERSE is m and FPGA_MGR_ALTERA_PS_SPI is y, build fails: drivers/fpga/altera-ps-spi.o: In function `altera_ps_write': altera-ps-spi.c:(.text+0x4ec): undefined reference to `byte_rev_table' Select BITREVERSE to

Re: [RFC PATCH 15/16] RISC-V: KVM: Add SBI v0.1 support

2019-07-29 Thread Paolo Bonzini
On 29/07/19 21:51, Atish Patra wrote: > On Mon, 2019-07-29 at 21:40 +0200, Paolo Bonzini wrote: >> On 29/07/19 13:57, Anup Patel wrote: >>> + csr_write(CSR_HSTATUS, vcpu->arch.guest_context.hstatus | >>> HSTATUS_SPRV); >>> + csr_write(CSR_SSTATUS, vcpu->arch.guest_context.sstatus); >>> + val

[PATCH 4.14 234/293] tty: serial: msm_serial: avoid system lockup condition

2019-07-29 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.14 259/293] kallsyms: exclude kasan local symbols on s390

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 33177f01ca3fe550146bb9001bec2fd806b2f40c ] gcc asan instrumentation emits the following sequence to store frame pc when the kernel is built with CONFIG_RELOCATABLE: debug/vsprintf.s: .section.data.rel.ro.local,"aw" .align 8 .LC3: .quad

[PATCH 4.14 263/293] RDMA/rxe: Fill in wc byte_len with IB_WC_RECV_RDMA_WITH_IMM

2019-07-29 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.14 231/293] drm/crc-debugfs: User irqsafe spinlock in drm_crtc_add_crc_entry

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 1882018a70e06376234133e69ede9dd743b4dbd9 ] We can be called from any context, we need to be prepared. Noticed this while hacking on vkms, which calls this function from a normal worker. Which really upsets lockdep. Cc: Rodrigo Siqueira Cc: Tomeu Vizoso Cc: Emil Velikov Cc:

[PATCH 4.14 261/293] perf session: Fix potential NULL pointer dereference found by the smatch tool

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit f3c8d90757724982e5f07cd77d315eb64ca145ac ] Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/util/session.c:1252 dump_read() error: we previously assumed 'evsel' could be null (see line 1249)

[PATCH 4.14 241/293] usb: gadget: Zero ffs_io_data

2019-07-29 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.14 236/293] drm/virtio: Add memory barriers for capset cache.

2019-07-29 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.14 244/293] serial: mctrl_gpio: Check if GPIO property exisits before requesting it

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit d99482673f950817b30caf3fcdfb31179b050ce1 ] This patch adds a check for the GPIOs property existence, before the GPIO is requested. This fixes an issue seen when the 8250 mctrl_gpio support is added (2nd patch in this patch series) on x86 platforms using ACPI. Here Mika's

[PATCH] media input infrastructure:tw686x: Fix of possibleinconsistent memory deallocation and/or race condition by implementation of custom video_device_release function in tw686x driver

2019-07-29 Thread Mark Balantzyan
Possible inconsistent memory deallocation and/or race conditions were detected specifically with respect to remaining open handles to the video device handled by the tw686x driver. This patch addresses this by implementing a revised independent instance of the video_device_release function

[PATCH 4.14 252/293] mfd: arizona: Fix undefined behavior

2019-07-29 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.14 255/293] powerpc/4xx/uic: clear pending interrupt after irq type/pol change

2019-07-29 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.14 228/293] PCI: Return error if cannot probe VF

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 76002d8b48c4b08c9bd414517dd295e132ad910b ] Commit 0e7df22401a3 ("PCI: Add sysfs sriov_drivers_autoprobe to control VF driver binding") allows the user to specify that drivers for VFs of a PF should not be probed, but it actually causes pci_device_probe() to return success back

[PATCH 4.14 192/293] sky2: Disable MSI on ASUS P6T

2019-07-29 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.14 190/293] nfc: fix potential illegal memory access

2019-07-29 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.14 184/293] igmp: fix memory leak in igmpv3_del_delrec()

2019-07-29 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.14 218/293] nfsd: give out fewer session slots as limit approaches

2019-07-29 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.14 223/293] usb: core: hub: Disable hub-initiated U1/U2

2019-07-29 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

Re: BUG: KASAN: global-out-of-bounds in ata_exec_internal_sg+0x50f/0xc70

2019-07-29 Thread Jeffrin Thalakkottoor
hello Kees Cook, i tested your fix and i think it worked like a charm ! kasan message related disappeared during boot time and it does not show in the output of "sudo dmesg -l err" anyway thanks a lot ! On Fri, Jul 19, 2019 at 3:05 AM Kees Cook wrote: > > On Tue, Jul 16, 2019 at 11:28:29AM

[PATCH 4.14 221/293] hvsock: fix epollout hang from race condition

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit cb359b60416701c8bed82fec79de25a144beb893 ] Currently, hvsock can enter into a state where epoll_wait on EPOLLOUT will not return even when the hvsock socket is writable, under some race condition. This can happen under the following sequence: - fd = socket(hvsocket) - fd_out =

[PATCH 4.14 220/293] nfsd: Fix overflow causing non-working mounts on 1 TB machines

2019-07-29 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.14 207/293] MIPS: lb60: Fix pin mappings

2019-07-29 Thread Greg Kroah-Hartman
From: Paul Cercueil commit 1323c3b72a987de57141cabc44bf9cd83656bc70 upstream. The pin mappings introduced in commit 636f8ba67fb6 ("MIPS: JZ4740: Qi LB60: Add pinctrl configuration for several drivers") are completely wrong. The pinctrl driver name is incorrect, and the function and group fields

[PATCH 4.14 186/293] net: bcmgenet: use promisc for unsupported filters

2019-07-29 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

Re: [PATCH v4 1/5] vsock/virtio: limit the memory used per-socket

2019-07-29 Thread Michael S. Tsirkin
On Mon, Jul 29, 2019 at 06:41:27PM +0200, Stefano Garzarella wrote: > On Mon, Jul 29, 2019 at 12:01:37PM -0400, Michael S. Tsirkin wrote: > > On Mon, Jul 29, 2019 at 05:36:56PM +0200, Stefano Garzarella wrote: > > > On Mon, Jul 29, 2019 at 10:04:29AM -0400, Michael S. Tsirkin wrote: > > > > On

[PATCH 4.14 199/293] net: make skb_dst_force return true when dst is refcounted

2019-07-29 Thread Greg Kroah-Hartman
From: Florian Westphal [ Upstream commit b60a77386b1d4868f72f6353d35dabe5fbe981f2 ] netfilter did not expect that skb_dst_force() can cause skb to lose its dst entry. I got a bug report with a skb->dst NULL dereference in netfilter output path. The backtrace contains nf_reinject(), so the dst

[PATCH 4.14 200/293] tcp: fix tcp_set_congestion_control() use from bpf hook

2019-07-29 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 8d650cdedaabb33e85e9b7c517c0c71fcecc1de9 ] Neal reported incorrect use of ns_capable() from bpf hook. bpf_setsockopt(...TCP_CONGESTION...) -> tcp_set_congestion_control() -> ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN) -> ns_capable_common()

[PATCH 4.14 201/293] tcp: Reset bytes_acked and bytes_received when disconnecting

2019-07-29 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.14 213/293] ext4: allow directory holes

2019-07-29 Thread Greg Kroah-Hartman
From: Theodore Ts'o commit 4e19d6b65fb4fc42e352ce9883649e049da14743 upstream. The largedir feature was intended to allow ext4 directories to have unmapped directory blocks (e.g., directory holes). And so the released e2fsprogs no longer enforces this for largedir file systems; however, the

Re: [PATCH v3 09/13] objtool: Prepare to merge recordmcount

2019-07-29 Thread Matt Helsley
> On Jul 28, 2019, at 10:48 AM, Josh Poimboeuf wrote: > > On Wed, Jul 24, 2019 at 02:05:03PM -0700, Matt Helsley wrote: >> Move recordmcount into the objtool directory. We keep this step separate >> so changes which turn recordmcount into a subcommand of objtool don't >> get obscured. >> >>

[PATCH 4.14 197/293] netrom: hold sock when setting skb->destructor

2019-07-29 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.14 194/293] macsec: fix use-after-free of skb during RX

2019-07-29 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 ---

Re: [PATCH 1/1] psi: do not require setsched permission from the trigger creator

2019-07-29 Thread Suren Baghdasaryan
On Mon, Jul 29, 2019 at 12:57 PM Greg KH wrote: > > On Mon, Jul 29, 2019 at 12:42:05PM -0700, Suren Baghdasaryan wrote: > > When a process creates a new trigger by writing into /proc/pressure/* > > files, permissions to write such a file should be used to determine whether > > the process is

[PATCH 4.14 179/293] compiler.h: Add read_word_at_a_time() function.

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 7f1e541fc8d57a143dd5df1d0a1276046e08c083 ] Sometimes we know that it's safe to do potentially out-of-bounds access because we know it won't cross a page boundary. Still, KASAN will report this as a bug. Add read_word_at_a_time() function which is supposed to be used in such

[PATCH 4.14 146/293] drm/nouveau/i2c: Enable i2c pads & busses during preinit

2019-07-29 Thread Greg Kroah-Hartman
From: Lyude Paul commit 7cb95eeea6706c790571042a06782e378b2561ea upstream. It turns out that while disabling i2c bus access from software when the GPU is suspended was a step in the right direction with: commit 342406e4fbba ("drm/nouveau/i2c: Disable i2c bus access after ->fini()") We also

[PATCH 4.14 147/293] padata: use smp_mb in padata_reorder to avoid orphaned padata jobs

2019-07-29 Thread Greg Kroah-Hartman
From: Daniel Jordan commit cf144f81a99d1a3928f90b0936accfd3f45c9a0a upstream. Testing padata with the tcrypt module on a 5.2 kernel... # modprobe tcrypt alg="pcrypt(rfc4106(gcm(aes)))" type=3 # modprobe tcrypt mode=211 sec=1 ...produces this splat: INFO: task modprobe:10075

Re: [PATCH 03/14] sched,fair: redefine runnable_load_avg as the sum of task_h_load

2019-07-29 Thread Peter Zijlstra
On Mon, Jul 22, 2019 at 01:33:37PM -0400, Rik van Riel wrote: > The runnable_load magic is used to quickly propagate information about > runnable tasks up the hierarchy of runqueues. The runnable_load_avg is > mostly used for the load balancing code, which only examines the value at > the root

[PATCH 4.14 181/293] bnx2x: Prevent load reordering in tx completion processing

2019-07-29 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.14 174/293] usb: Handle USB3 remote wakeup for LPM enabled devices correctly

2019-07-29 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

Re: [PATCH 3/3] Fix insn.c misaligned address error

2019-07-29 Thread Ian Rogers
On Mon, Jul 29, 2019 at 1:24 AM Adrian Hunter wrote: > > On 27/07/19 12:46 PM, Masami Hiramatsu wrote: > > On Fri, 26 Jul 2019 16:38:06 -0300 > > Arnaldo Carvalho de Melo wrote: > > > >> Em Wed, Jul 24, 2019 at 11:45:12AM -0700, Numfor Mbiziwo-Tiapo escreveu: > >>> The ubsan (undefined behavior

[PATCH 4.14 145/293] fs/proc/proc_sysctl.c: fix the default values of i_uid/i_gid on /proc/sys inodes.

2019-07-29 Thread Greg Kroah-Hartman
From: Radoslaw Burny commit 5ec27ec735ba0477d48c80561cc5e856f0c5dfaf upstream. Normally, the inode's i_uid/i_gid are translated relative to s_user_ns, but this is not a correct behavior for proc. Since sysctl permission check in test_perm is done against GLOBAL_ROOT_[UG]ID, it makes more sense

[PATCH 4.14 167/293] parisc: Ensure userspace privilege for ptraced processes in regset functions

2019-07-29 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.14 169/293] powerpc/32s: fix suspend/resume when IBATs 4-7 are used

2019-07-29 Thread Greg Kroah-Hartman
From: Christophe Leroy commit 6ecb78ef56e08d2119d337ae23cb951a640dc52d upstream. Previously, only IBAT1 and IBAT2 were used to map kernel linear mem. Since commit 63b2bc619565 ("powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX"), we may have all 8 BATs used for mapping kernel text. But the

[PATCH 4.14 143/293] KVM: x86/vPMU: refine kvm_pmu err msg when event creation failed

2019-07-29 Thread Greg Kroah-Hartman
From: Like Xu commit 6fc3977ccc5d3c22e851f2dce2d3ce2a0a843842 upstream. If a perf_event creation fails due to any reason of the host perf subsystem, it has no chance to log the corresponding event for guest which may cause abnormal sampling data in guest result. In debug mode, this message

[PATCH 4.14 152/293] x86/boot: Fix memory leak in default_get_smp_config()

2019-07-29 Thread Greg Kroah-Hartman
From: David Rientjes commit e74bd96989dd42a51a73eddb4a5510a6f5e42ac3 upstream. When default_get_smp_config() is called with early == 1 and mpf->feature1 is non-zero, mpf is leaked because the return path does not do early_memunmap(). Fix this and share a common exit routine. Fixes:

[PATCH 4.14 106/293] iavf: fix dereference of null rx_buffer pointer

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 9fe06a51287b2d41baef7ece94df34b5abf19b90 ] A recent commit efa14c3985828d ("iavf: allow null RX descriptors") added a null pointer sanity check on rx_buffer, however, rx_buffer is being dereferenced before that check, which implies a null pointer dereference bug can potentially

[PATCH 4.14 165/293] PCI: hv: Fix a use-after-free bug in hv_eject_device_work()

2019-07-29 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.14 144/293] arm64: tegra: Fix AGIC register range

2019-07-29 Thread Greg Kroah-Hartman
From: Jon Hunter commit ba24eee6686f6ed3738602b54d959253316a9541 upstream. The Tegra AGIC interrupt controller is an ARM GIC400 interrupt controller. Per the ARM GIC device-tree binding, the first address region is for the GIC distributor registers and the second address region is for the GIC

[PATCH 4.14 162/293] libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields

2019-07-29 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.14 160/293] HID: wacom: generic: only switch the mode on devices with LEDs

2019-07-29 Thread Greg Kroah-Hartman
From: Aaron Armstrong Skomra commit d8e9806005f28bbb49899dab2068e3359e22ba35 upstream. Currently, the driver will attempt to set the mode on all devices with a center button, but some devices with a center button lack LEDs, and attempting to set the LEDs on devices without LEDs results in the

[PATCH 4.14 107/293] floppy: fix div-by-zero in setup_format_params

2019-07-29 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.14 099/293] gtp: add missing gtp_encap_disable_sock() in gtp_encap_enable()

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit e30155fd23c9c141cbe7d99b786e10a83a328837 ] If an invalid role is sent from user space, gtp_encap_enable() will fail. Then, it should call gtp_encap_disable_sock() but current code doesn't. It makes memory leak. Fixes: 91ed81f9abc7 ("gtp: support SGSN-side tunnels")

Re: [PATCH v3 0/6] Introduce Bandwidth OPPs for interconnect paths

2019-07-29 Thread Saravana Kannan
On Mon, Jul 29, 2019 at 2:24 AM Viresh Kumar wrote: > > On 18-07-19, 21:12, Saravana Kannan wrote: > > On Wed, Jul 17, 2019 at 10:37 PM Viresh Kumar > > wrote: > > > I would like > > > to put this data in the GPU OPP table only. What about putting a > > > range in the GPU OPP table for the

[PATCH 4.14 104/293] gtp: fix use-after-free in gtp_newlink()

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit a2bed90704c68d3763bf24decb1b781a45395de8 ] Current gtp_newlink() could be called after unregister_pernet_subsys(). gtp_newlink() uses gtp_net but it can be destroyed by unregister_pernet_subsys(). So unregister_pernet_subsys() should be called after rtnl_link_unregister(). Test

[PATCH 4.14 105/293] net: mvmdio: defer probe of orion-mdio if a clock is not ready

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 433a06d7d74e677c40b1148c70c48677ff62fb6b ] Defer probing of the orion-mdio interface when getting a clock returns EPROBE_DEFER. This avoids locking up the Armada 8k SoC when mdio is used before all clocks have been enabled. Signed-off-by: Josua Mayer Reviewed-by: Andrew Lunn

[PATCH 4.14 140/293] ALSA: hda/realtek: apply ALC891 headset fixup to one Dell machine

2019-07-29 Thread Greg Kroah-Hartman
From: Hui Wang commit 4b4e0e32e4b09274dbc9d173016c1a026f44608c upstream. Without this patch, the headset-mic and headphone-mic don't work. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_realtek.c |5 + 1 file

[PATCH 4.14 103/293] gtp: fix use-after-free in gtp_encap_destroy()

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 1788b8569f5de27da09087fa3f6580d2aa04cc75 ] gtp_encap_destroy() is called twice. 1. When interface is deleted. 2. When udp socket is destroyed. either gtp->sk0 or gtp->sk1u could be freed by sock_put() in gtp_encap_destroy(). so, when gtp_encap_destroy() is called again, it would

[PATCH 4.14 119/293] crypto: ghash - fix unaligned memory access in ghash_setkey()

2019-07-29 Thread Greg Kroah-Hartman
From: Eric Biggers commit 5c6bc4dfa515738149998bb0db2481a4fdead979 upstream. Changing ghash_mod_init() to be subsys_initcall made it start running before the alignment fault handler has been installed on ARM. In kernel builds where the keys in the ghash test vectors happened to be misaligned

[PATCH] net: hamradio: baycom_epp: Mark expected switch fall-through

2019-07-29 Thread Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: i386): drivers/net/hamradio/baycom_epp.c: In function ‘transmit’: drivers/net/hamradio/baycom_epp.c:491:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (i) {

[PATCH 4.14 132/293] arm64: tegra: Update Jetson TX1 GPU regulator timings

2019-07-29 Thread Greg Kroah-Hartman
From: Jon Hunter commit ece6031ece2dd64d63708cfe1088016cee5b10c0 upstream. The GPU regulator enable ramp delay for Jetson TX1 is set to 1ms which not sufficient because the enable ramp delay has been measured to be greater than 1ms. Furthermore, the downstream kernels released by NVIDIA for

[PATCH 4.14 123/293] crypto: chacha20poly1305 - fix atomic sleep when using async algorithm

2019-07-29 Thread Greg Kroah-Hartman
From: Eric Biggers commit 7545b6c2087f4ef0287c8c9b7eba6a728c67ff8e upstream. Clear the CRYPTO_TFM_REQ_MAY_SLEEP flag when the chacha20poly1305 operation is being continued from an async completion callback, since sleeping may not be allowed in that context. This is basically the same bug that

[PATCH 4.14 061/293] ipvs: defer hook registration to avoid leaks

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit cf47a0b882a4e5f6b34c7949d7b293e9287f1972 ] syzkaller reports for memory leak when registering hooks [1] As we moved the nf_unregister_net_hooks() call into __ip_vs_dev_cleanup(), defer the nf_register_net_hooks() call, so that hooks are allocated and freed from same

[PATCH 4.14 066/293] acpi/arm64: ignore 5.1 FADTs that are reported as 5.0

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 2af22f3ec3ca452f1e79b967f634708ff01ced8a ] Some Qualcomm Snapdragon based laptops built to run Microsoft Windows are clearly ACPI 5.1 based, given that that is the first ACPI revision that supports ARM, and introduced the FADT 'arm_boot_flags' field, which has a non-zero field

[PATCH 4.14 117/293] scsi: mac_scsi: Increase PIO/PDMA transfer length threshold

2019-07-29 Thread Greg Kroah-Hartman
From: Finn Thain commit 7398cee4c3e6aea1ba07a6449e5533ecd0b92cdd upstream. Some targets introduce delays when handshaking the response to certain commands. For example, a disk may send a 96-byte response to an INQUIRY command (or a 24-byte response to a MODE SENSE command) too slowly.

[PATCH 4.14 109/293] floppy: fix invalid pointer dereference in drive_name

2019-07-29 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

Re: BUG: KASAN: global-out-of-bounds in ata_exec_internal_sg+0x50f/0xc70

2019-07-29 Thread Jeffrin Thalakkottoor
hello Kees, please mention me ... Reported-by: Jeffrin Jose T Tested-by: Jeffrin Jose T On Tue, Jul 30, 2019 at 1:25 AM Jens Axboe wrote: > > On 7/29/19 1:34 PM, Jeffrin Thalakkottoor wrote: > > hello Kees Cook, > > > > i tested your fix and i think it worked like a charm ! > > kasan

[PATCH 4.14 111/293] xen: let alloc_xenballooned_pages() fail if not enough memory free

2019-07-29 Thread Greg Kroah-Hartman
From: Juergen Gross commit a1078e821b605813b63bf6bca414a85f804d5c66 upstream. Instead of trying to allocate pages with GFP_USER in add_ballooned_pages() check the available free memory via si_mem_available(). GFP_USER is far less limiting memory exhaustion than the test via si_mem_available().

Re: [PATCH v2 4/7] ASoC: dt-bindings: Document dl-mask property

2019-07-29 Thread Nicolin Chen
On Sun, Jul 28, 2019 at 10:24:26PM +0300, Daniel Baluta wrote: > SAI supports up to 8 data lines. This property let the user > configure how many data lines should be used per transfer > direction (Tx/Rx). This sounds a bit less persuasive to me as we are adding a DT property that's used to

[PATCH 4.14 065/293] timer_list: Guard procfs specific code

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit a9314773a91a1d3b36270085246a6715a326ff00 ] With CONFIG_PROC_FS=n the following warning is emitted: kernel/time/timer_list.c:361:36: warning: unused variable 'timer_list_sops' [-Wunused-const-variable] static const struct seq_operations timer_list_sops = { Add #ifdef guard

[PATCH 4.14 093/293] perf stat: Make metric event lookup more robust

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 145c407c808352acd625be793396fd4f33c794f8 ] After setting up metric groups through the event parser, the metricgroup code looks them up again in the event list. Make sure we only look up events that haven't been used by some other metric. The data structures currently cannot

[PATCH 4.14 064/293] ntp: Limit TAI-UTC offset

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit d897a4ab11dc8a9fda50d2eccc081a96a6385998 ] Don't allow the TAI-UTC offset of the system clock to be set by adjtimex() to a value larger than 10 seconds. This prevents an overflow in the conversion to int, prevents the CLOCK_TAI clock from getting too far ahead of the

[PATCH 4.14 088/293] bcache: check c->gc_thread by IS_ERR_OR_NULL in cache_set_flush()

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit b387e9b58679c60f5b1e4313939bd4878204fc37 ] When system memory is in heavy pressure, bch_gc_thread_start() from run_cache_set() may fail due to out of memory. In such condition, c->gc_thread is assigned to -ENOMEM, not NULL pointer. Then in following failure code path

  1   2   3   4   5   6   7   8   9   10   >