24 Aug, 2018

40 commits

  • [ Upstream commit 492b7e894587c151be681f86d4d1d086375f7b45 ]

    To avoid the below build warning message,
    use new generate_load() checking the return value.

    ignoring return value of ‘system’, declared with attribute warn_unused_result

    And it also refactors the duplicate code of both
    test_perf_event_all_cpu() and test_perf_event_task()

    Cc: Teng Qin
    Signed-off-by: Taeung Song
    Acked-by: David S. Miller
    Signed-off-by: Daniel Borkmann
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Taeung Song
     
  • [ Upstream commit 4d5d33a085335ef469c9a87792bcaaaa8e64d8c4 ]

    This fixes build error regarding redefinition:

    CLANG-bpf samples/bpf/parse_varlen.o
    samples/bpf/parse_varlen.c:111:8: error: redefinition of 'vlan_hdr'
    struct vlan_hdr {
    ^
    ./include/linux/if_vlan.h:38:8: note: previous definition is here

    So remove duplicate 'struct vlan_hdr' in sample code and include if_vlan.h

    Signed-off-by: Taeung Song
    Acked-by: David S. Miller
    Signed-off-by: Daniel Borkmann
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Taeung Song
     
  • [ Upstream commit fdddc65ab35d575b42aab411b2dc687601eab680 ]

    Current implementation does not guarantee packed pixel modes working
    with every dongle. There are some dongles, which require selecting
    the output mode explicitly.

    Write proper values to registers in packed_pixel mode, based on how it
    is done in vendor's code. Select output color space: RGB
    (no packed pixel) or YCBCR422 (packed pixel).

    This reverts commit e8b92efa629dac0e70ea4145c5e70616de5f89c8
    ("drm/bridge/sii8620: fix display of packed pixel modes in MHL2").

    Signed-off-by: Maciej Purski
    Signed-off-by: Andrzej Hajda
    Link: https://patchwork.freedesktop.org/patch/msgid/1530204243-6370-3-git-send-email-m.purski@samsung.com
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Maciej Purski
     
  • [ Upstream commit d461e3da905332189aad546b2ad9adbe6071c7cc ]

    In certain conditions, the device may not be able to link in gigabit mode. This software workaround ensures that the device will not enter the failure state.

    Fixes: d0cad871703b898a442e4049c532ec39168e5b57 ("SMSC75XX USB 2.0 Gigabit Ethernet Devices")
    Signed-off-by: Yuiko Oshino
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Yuiko Oshino
     
  • [ Upstream commit 1e8e18f694a52d703665012ca486826f64bac29d ]

    There is a special case that the size is "(N << KASAN_SHADOW_SCALE_SHIFT)
    Pages plus X", the value of X is [1, KASAN_SHADOW_SCALE_SIZE-1]. The
    operation "size >> KASAN_SHADOW_SCALE_SHIFT" will drop X, and the
    roundup operation can not retrieve the missed one page. For example:
    size=0x28006, PAGE_SIZE=0x1000, KASAN_SHADOW_SCALE_SHIFT=3, we will get
    shadow_size=0x5000, but actually we need 6 pages.

    shadow_size = round_up(size >> KASAN_SHADOW_SCALE_SHIFT, PAGE_SIZE);

    This can lead to a kernel crash when kasan is enabled and the value of
    mod->core_layout.size or mod->init_layout.size is like above. Because
    the shadow memory of X has not been allocated and mapped.

    move_module:
    ptr = module_alloc(mod->core_layout.size);
    ...
    memset(ptr, 0, mod->core_layout.size); //crashed

    Unable to handle kernel paging request at virtual address ffff0fffff97b000
    ......
    Call trace:
    __asan_storeN+0x174/0x1a8
    memset+0x24/0x48
    layout_and_allocate+0xcd8/0x1800
    load_module+0x190/0x23e8
    SyS_finit_module+0x148/0x180

    Link: http://lkml.kernel.org/r/1529659626-12660-1-git-send-email-thunder.leizhen@huawei.com
    Signed-off-by: Zhen Lei
    Reviewed-by: Dmitriy Vyukov
    Acked-by: Andrey Ryabinin
    Cc: Alexander Potapenko
    Cc: Hanjun Guo
    Cc: Libin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Zhen Lei
     
  • [ Upstream commit 26b68dd2f48fe7699a89f0cfbb9f4a650dc1c837 ]

    Silence warnings (triggered at W=1) by adding relevant __printf attributes.

    CC kernel/trace/trace.o
    kernel/trace/trace.c: In function ‘__trace_array_vprintk’:
    kernel/trace/trace.c:2979:2: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
    len = vscnprintf(tbuffer, TRACE_BUF_SIZE, fmt, args);
    ^~~
    AR kernel/trace/built-in.o

    Link: http://lkml.kernel.org/r/20180308205843.27447-1-malat@debian.org

    Signed-off-by: Mathieu Malaterre
    Signed-off-by: Steven Rostedt (VMware)
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Malaterre
     
  • [ Upstream commit ed2b82c03dc187018307c7c6bf9299705f3db383 ]

    Decrement the number of elements in the map in case the allocation
    of a new node fails.

    Fixes: 6c9059817432 ("bpf: pre-allocate hash map elements")
    Signed-off-by: Mauricio Vasquez B
    Acked-by: Alexei Starovoitov
    Signed-off-by: Daniel Borkmann
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Mauricio Vasquez B
     
  • [ Upstream commit 2ceb2780b790b74bc408a949f6aedbad8afa693e ]

    Select CONFIG_USB_CHIPIDEA_ULPI and CONFIG_USB_ULPI_BUS so that
    USB ULPI can be functional on some boards like that use ULPI
    interface.

    Signed-off-by: Fabio Estevam
    Signed-off-by: Shawn Guo
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Fabio Estevam
     
  • [ Upstream commit 157bcc06094c3c5800d3f4676527047b79b618e7 ]

    Select CONFIG_USB_CHIPIDEA_ULPI and CONFIG_USB_ULPI_BUS so that
    USB ULPI can be functional on some boards like imx51-babbge.

    This fixes a kernel hang in 4.18-rc1 on i.mx51-babbage, caused by commit
    03e6275ae381 ("usb: chipidea: Fix ULPI on imx51").

    Suggested-by: Andrey Smirnov
    Signed-off-by: Fabio Estevam
    Signed-off-by: Shawn Guo
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Fabio Estevam
     
  • [ Upstream commit 3b8d573586d1b9dee33edf6cb6f2ca05f4bca568 ]

    The touch sensors on the 2nd-gen Intuos tablets don't use a 4096x4096
    sensor like other similar tablets (3rd-gen Bamboo, Intuos5, etc.).
    The incorrect maximum XY values don't normally affect userspace since
    touch input from these devices is typically relative rather than
    absolute. It does, however, cause problems when absolute distances
    need to be measured, e.g. for gesture recognition. Since the resolution
    of the touch sensor on these devices is 10 units / mm (versus 100 for
    the pen sensor), the proper maximum values can be calculated by simply
    dividing by 10.

    Fixes: b5fd2a3e92 ("Input: wacom - add support for three new Intuos devices")
    Signed-off-by: Jason Gerecke
    Signed-off-by: Jiri Kosina
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Jason Gerecke
     
  • [ Upstream commit 4fb5f58e8d191f7c81637ad81284e4848afb4244 ]

    On 32-bit kernels, __flush_tlb_all() may have read the CR4 shadow before the
    initialization of CR4 shadow in cpu_init().

    Fix it by adding an explicit cr4_init_shadow() call into start_secondary()
    which is the first function called on non-boot SMP CPUs - ahead of the
    __flush_tlb_all() call.

    ( This is somewhat of a layering violation, but start_secondary() does
    CR4 bootstrap in the PCID case anyway. )

    Signed-off-by: Zhenzhong Duan
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Link: http://lkml.kernel.org/r/b07b6ae9-4b57-4b40-b9bc-50c2c67f1d91@default
    Signed-off-by: Ingo Molnar
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Zhenzhong Duan
     
  • [ Upstream commit 0859df22ab7cfb3ad2df2caed76cadce6ac33a80 ]

    The phys and vm versions had the values swapped.

    Reviewed-by: Junwei Zhang
    Signed-off-by: Alex Deucher
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Alex Deucher
     
  • [ Upstream commit 5dc2d3996a8b221c20dd0900bdad45031a572530 ]

    After we change the ipvlan mode from l3 to l2, or vice versa, we only
    reset IFF_NOARP flag, but don't flush the ARP table cache, which will
    cause eth->h_dest to be equal to eth->h_source in ipvlan_xmit_mode_l2().
    Then the message will not come out of host.

    Here is the reproducer on local host:

    ip link set eth1 up
    ip addr add 192.168.1.1/24 dev eth1
    ip link add link eth1 ipvlan1 type ipvlan mode l3

    ip netns add net1
    ip link set ipvlan1 netns net1
    ip netns exec net1 ip link set ipvlan1 up
    ip netns exec net1 ip addr add 192.168.2.1/24 dev ipvlan1

    ip route add 192.168.2.0/24 via 192.168.1.2
    ping 192.168.2.2 -c 2

    ip netns exec net1 ip link set ipvlan1 type ipvlan mode l2
    ping 192.168.2.2 -c 2

    Add the same configuration on remote host. After we set the mode to l2,
    we could find that the src/dst MAC addresses are the same on eth1:

    21:26:06.648565 00:b7:13:ad:d3:05 > 00:b7:13:ad:d3:05, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 58356, offset 0, flags [DF], proto ICMP (1), length 84)
    192.168.2.1 > 192.168.2.2: ICMP echo request, id 22686, seq 1, length 64

    Fix this by calling dev_change_flags(), which will call netdevice notifier
    with flag change info.

    v2:
    a) As pointed out by Wang Cong, check return value for dev_change_flags() when
    change dev flags.
    b) As suggested by Stefano and Sabrina, move flags setting before l3mdev_ops.
    So we don't need to redo ipvlan_{, un}register_nf_hook() again in err path.

    Reported-by: Jianlin Shi
    Reviewed-by: Stefano Brivio
    Reviewed-by: Sabrina Dubroca
    Fixes: 2ad7bf3638411 ("ipvlan: Initial check-in of the IPVLAN driver.")
    Signed-off-by: Hangbin Liu
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Hangbin Liu
     
  • [ Upstream commit 08b393d01c88aff27347ed2b1b354eb4db2f1532 ]

    Since the following commit:

    cd77849a69cf ("objtool: Fix GCC 8 cold subfunction detection for aliased functions")

    ... if the kernel is built with EXTRA_CFLAGS='-fno-reorder-functions',
    objtool can get stuck in an infinite loop.

    That flag causes the new GCC 8 cold subfunctions to be placed in .text
    instead of .text.unlikely. But it also has an unfortunate quirk: in the
    symbol table, the subfunction (e.g., nmi_panic.cold.7) is nested inside
    the parent (nmi_panic).

    That function overlap confuses objtool, and causes it to get into an
    infinite loop in next_insn_same_func(). Here's Allan's description of
    the loop:

    "Objtool iterates through the instructions in nmi_panic using
    next_insn_same_func. Once it reaches the end of nmi_panic at 0x534 it
    jumps to 0x528 as that's the start of nmi_panic.cold.7. However, since
    the instructions starting at 0x528 are still associated with nmi_panic
    objtool will get stuck in a loop, continually jumping back to 0x528
    after reaching 0x534."

    Fix it by shortening the length of the parent function so that the
    functions no longer overlap.

    Reported-and-analyzed-by: Allan Xavier
    Signed-off-by: Josh Poimboeuf
    Cc: Allan Xavier
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/9e704c52bee651129b036be14feda317ae5606ae.1530136978.git.jpoimboe@redhat.com
    Signed-off-by: Ingo Molnar
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Josh Poimboeuf
     
  • [ Upstream commit ecd60532e060e45c63c57ecf1c8549b1d656d34d ]

    Booting a ColdFire m68k core with MMU enabled causes a "bad page state"
    oops since commit 1d40a5ea01d5 ("mm: mark pages in use for page tables"):

    BUG: Bad page state in process sh pfn:01ce2
    page:004fefc8 count:0 mapcount:-1024 mapping:00000000 index:0x0
    flags: 0x0()
    raw: 00000000 00000000 00000000 fffffbff 00000000 00000100 00000200 00000000
    raw: 039c4000
    page dumped because: nonzero mapcount
    Modules linked in:
    CPU: 0 PID: 22 Comm: sh Not tainted 4.17.0-07461-g1d40a5ea01d5 #13

    Fix by calling pgtable_page_dtor() in our __pte_free_tlb() code path,
    so that the PG_table flag is cleared before we free the pte page.

    Note that I had to change the type of pte_free() to be static from
    extern. Otherwise you get a lot of warnings like this:

    ./arch/m68k/include/asm/mcf_pgalloc.h:80:2: warning: ‘pgtable_page_dtor’ is static but used in inline function ‘pte_free’ which is not static
    pgtable_page_dtor(page);
    ^

    And making it static is consistent with our use of this in the other
    m68k pgalloc definitions of pte_free().

    Signed-off-by: Greg Ungerer
    CC: Matthew Wilcox
    Reviewed-by: Geert Uytterhoeven
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Greg Ungerer
     
  • [ Upstream commit ae15a41a641449f536578b0d9ec0e4ade130deb5 ]

    Originally in patch e6d20c55a4 ("openrisc: entry: Fix delay slot
    detection") I fixed delay slot detection, but only for QEMU. We missed
    that hardware delay slot detection using delay slot exception flag (DSX)
    was still broken. This was because QEMU set the DSX flag in both
    pre-exception supervision register (ESR) and supervision register (SR)
    register, but on real hardware the DSX flag is only set on the SR
    register during exceptions.

    Fix this by carrying the DSX flag into the SR register during exception.
    We also update the DSX flag read locations to read the value from the SR
    register not the pt_regs SR register which represents ESR. The ESR
    should never have the DSX flag set.

    In the process I updated/removed a few comments to match the current
    state. Including removing a comment saying that the DSX detection logic
    was inefficient and needed to be rewritten.

    I have tested this on QEMU with a patch ensuring it matches the hardware
    specification.

    Link: https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg00000.html
    Fixes: e6d20c55a4 ("openrisc: entry: Fix delay slot detection")
    Signed-off-by: Stafford Horne
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Stafford Horne
     
  • [ Upstream commit c1985cefd844e26bd19673a6df8d8f0b1918c2db ]

    cmd_rc is passed in by reference to the acpi_nfit_ctl() function and the
    caller expects a value returned. However, when the package is pass through
    via the ND_CMD_CALL command, cmd_rc is not touched. Make sure cmd_rc is
    always set.

    Fixes: aef253382266 ("libnvdimm, nfit: centralize command status translation")

    Signed-off-by: Dave Jiang
    Signed-off-by: Dan Williams
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Dave Jiang
     
  • [ Upstream commit 595e802e53f24642a145cf7f3e4ac9afab4c21ec ]

    The DPAA HW requires that at least 256 bytes from the start of the
    first scatter-gather table entry are allocated and accessible. The
    hardware reads the maximum size the table can have in one access,
    thus requiring that the allocation and mapping to be done for the
    maximum size of 256B even if there is a smaller number of entries
    in the table.

    Signed-off-by: Madalin Bucur
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Madalin Bucur
     
  • [ Upstream commit b95f6fbc8e15803a596ca5e5e21008fba29694c6 ]

    The FMan hardware parser needs to be configured to remove the
    short frame padding from the checksum calculation, otherwise
    short UDP and TCP frames are likely to be marked as having a
    bad checksum.

    Signed-off-by: Madalin Bucur
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Madalin Bucur
     
  • [ Upstream commit 484c016d9392786ce5c74017c206c706f29f823d ]

    Driver performs the internal reload when it receives tx-timeout event from
    the OS. Internal reload might fail in some scenarios e.g., fatal HW issues.
    In such cases OS still see the link, which would result in undesirable
    functionalities such as re-generation of tx-timeouts.
    The patch addresses this issue by indicating the link-down to OS when
    tx-timeout is detected, and keeping the link in down state till the
    internal reload is successful.

    Please consider applying it to 'net' branch.

    Signed-off-by: Sudarsana Reddy Kalluru
    Signed-off-by: Ariel Elior
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Sudarsana Reddy Kalluru
     
  • [ Upstream commit 3dc6ddfedc2818eaaa36842fbb049191e0c5e50f ]

    The call to of_get_next_child() returns a node pointer with refcount
    incremented thus it must be explicitly decremented here in the error
    path and after the last usage.

    Fixes: d3c68e0a7e34 ("PCI: faraday: Add Faraday Technology FTPCI100 PCI Host Bridge driver")
    Signed-off-by: Nicholas Mc Guire
    [lorenzo.pieralisi@arm.com: updated commit log]
    Signed-off-by: Lorenzo Pieralisi
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Linus Walleij
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Nicholas Mc Guire
     
  • [ Upstream commit 342639d996f18bc0a4db2f42a84230c0a966dc94 ]

    The call to of_get_next_child() returns a node pointer with
    refcount incremented thus it must be explicitly decremented
    here after the last usage.

    Fixes: ab597d35ef11 ("PCI: xilinx-nwl: Add support for Xilinx NWL PCIe Host Controller")
    Signed-off-by: Nicholas Mc Guire
    [lorenzo.pieralisi@arm.com: updated commit log]
    Signed-off-by: Lorenzo Pieralisi
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Nicholas Mc Guire
     
  • [ Upstream commit 8c3f9bd851a4d3acf0a0f222d4e9e41c0cd1ea8e ]

    The call to of_get_next_child() returns a node pointer with refcount
    incremented thus it must be explicitly decremented here after the last
    usage.

    Fixes: 8961def56845 ("PCI: xilinx: Add Xilinx AXI PCIe Host Bridge IP driver")
    Signed-off-by: Nicholas Mc Guire
    [lorenzo.pieralisi@arm.com: reworked commit log]
    Signed-off-by: Lorenzo Pieralisi
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Nicholas Mc Guire
     
  • [ Upstream commit f605ce5eb26ac934fb8106d75d46a2c875a2bf23 ]

    If we would ever fail in the bpf_jit_prog() pass that writes the
    actual insns to the image after we got header via bpf_jit_binary_alloc()
    then we also need to make sure to free it through bpf_jit_binary_free()
    again when bailing out. Given we had prior bpf_jit_prog() passes to
    initially probe for clobbered registers, program size and to fill in
    addrs arrray for jump targets, this is more of a theoretical one,
    but at least make sure this doesn't break with future changes.

    Fixes: 054623105728 ("s390/bpf: Add s390x eBPF JIT compiler backend")
    Signed-off-by: Daniel Borkmann
    Cc: Martin Schwidefsky
    Acked-by: Alexei Starovoitov
    Signed-off-by: Alexei Starovoitov
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Daniel Borkmann
     
  • [ Upstream commit fad2d4ef636654e926d374ef038f4cd4286661f6 ]

    Fix the test that verifies whether bio_op(bio) represents a discard
    or write zeroes operation. Compile-tested only.

    Cc: Philipp Reisner
    Cc: Lars Ellenberg
    Fixes: 7435e9018f91 ("drbd: zero-out partial unaligned discards on local backend")
    Signed-off-by: Bart Van Assche
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Jens Axboe
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Bart Van Assche
     
  • [ Upstream commit 7b7aa62c05eac9789c208b946f515983a9255d8d ]

    The only bits that should be preserved in decon_win_set_fmt() is
    WINCONx_ENWIN_F. All other bits depends on the selected pixel formats and
    are set by the mentioned function.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Inki Dae
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Marek Szyprowski
     
  • [ Upstream commit ab337fc274a1957ff0771f19e826c736253f7c39 ]

    Set per-plane global alpha to maximum value to get proper blending of
    XRGB and ARGB planes. This fixes the strange order of overlapping planes.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Inki Dae
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Marek Szyprowski
     
  • [ Upstream commit dd209ef809080ced903e7747ee3ef640c923a1d2 ]

    Fix following issues related to planar YUV pixel format configuration:
    - NV16/61 modes were incorrectly programmed as NV12/21,
    - YVU420 was programmed as YUV420 on source,
    - YVU420 and YUV422 were programmed as YUV420 on output.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Inki Dae
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Marek Szyprowski
     
  • [ Upstream commit 95bca62fb723a121954fc7ae5473bb2c1f0d5986 ]

    At the very least we should check the return value if
    nla_parse_nested() is called with a non-NULL policy.

    Signed-off-by: Johannes Berg
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Johannes Berg
     
  • [ Upstream commit 188f60ab8e787fcbb5ac9d64ede23a0070231f09 ]

    Commit 9757235f451c, "nl80211: correct checks for
    NL80211_MESHCONF_HT_OPMODE value") relaxed the range for the HT
    operation field in meshconf, while also adding checks requiring
    the non-greenfield and non-ht-sta bits to be set in certain
    circumstances. The latter bit is actually reserved for mesh BSSes
    according to Table 9-168 in 802.11-2016, so in fact it should not
    be set.

    wpa_supplicant sets these bits because the mesh and AP code share
    the same implementation, but authsae does not. As a result, some
    meshconf updates from authsae which set only the NONHT_MIXED
    protection bits were being rejected.

    In order to avoid breaking userspace by changing the rules again,
    simply accept the values with or without the bits set, and mask
    off the reserved bit to match the spec.

    While in here, update the 802.11-2012 reference to 802.11-2016.

    Fixes: 9757235f451c ("nl80211: correct checks for NL80211_MESHCONF_HT_OPMODE value")
    Cc: Masashi Honma
    Signed-off-by: Bob Copeland
    Reviewed-by: Masashi Honma
    Reviewed-by: Masashi Honma
    Signed-off-by: Johannes Berg
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Bob Copeland
     
  • [ Upstream commit 5a14e91d559aee5bdb0e002e1153fd9c4338a29e ]

    This is easily triggered from userspace, so let's ratelimit the
    messages.

    Signed-off-by: Jeff Moyer
    Signed-off-by: Dan Williams
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Jeff Moyer
     
  • [ Upstream commit bda3153998f3eb2cafa4a6311971143628eacdbc ]

    During assemble, the spare marked for replacement is not checked.
    conf->fullsync cannot be updated to be 1. As a result, recovery will
    treat it as a clean array. All recovering sectors are skipped. Original
    device is replaced with the not-recovered spare.

    mdadm -C /dev/md0 -l10 -n4 -pn2 /dev/loop[0123]
    mdadm /dev/md0 -a /dev/loop4
    mdadm /dev/md0 --replace /dev/loop0
    mdadm -S /dev/md0 # stop array during recovery

    mdadm -A /dev/md0 /dev/loop[01234]

    After reassemble, you can see recovery go on, but it completes
    immediately. In fact, recovery is not actually processed.

    To solve this problem, we just add the missing logics for replacment
    spares. (In raid1.c or raid5.c, they have already been checked.)

    Reported-by: Alex Chen
    Reviewed-by: Alex Wu
    Reviewed-by: Chung-Chiang Cheng
    Signed-off-by: BingJing Chang
    Signed-off-by: Shaohua Li
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    BingJing Chang
     
  • [ Upstream commit 9191fc2a431bade3dedc9ad17759495a9f82f41b ]

    In the case of Station connects to AP with narrower bandwidth at beginning.
    And later the AP changes the bandwidth to winder bandwidth, the AP will
    beacon with wider bandwidth IE, eg VHT20->VHT40->VHT80 or VHT40->VHT80.

    Since the supported BANDWIDTH will be limited by the PHYMODE, so while
    Station receives the bandwidth change request, it will also need to
    reconfigure the PHYMODE setting to firmware instead of just configuring
    the BANDWIDTH info, otherwise it'll trigger a firmware crash with
    non-support bandwidth.

    The issue was observed in WLAN.RM.4.4.1-00051-QCARMSWP-1, QCA6174 with
    below scenario:

    AP xxx changed bandwidth, new config is 5200 MHz, width 2 (5190/0 MHz)
    disconnect from AP xxx for new auth to yyy
    RX ReassocResp from xxx (capab=0x1111 status=0 aid=102)
    associated

    ....

    AP xxx changed bandwidth, new config is 5200 MHz, width 2 (5190/0 MHz)
    AP xxx changed bandwidth, new config is 5200 MHz, width 3 (5210/0 MHz)

    ....

    firmware register dump:
    [00]: 0x05030000 0x000015B3 0x00987291 0x00955B31
    [04]: 0x00987291 0x00060730 0x00000004 0x00000001
    [08]: 0x004089F0 0x00955A00 0x000A0B00 0x00400000
    [12]: 0x00000009 0x00000000 0x00952CD0 0x00952CE6
    [16]: 0x00952CC4 0x0098E25F 0x00000000 0x0091080D
    [20]: 0x40987291 0x0040E7A8 0x00000000 0x0041EE3C
    [24]: 0x809ABF05 0x0040E808 0x00000000 0xC0987291
    [28]: 0x809A650C 0x0040E948 0x0041FE40 0x004345C4
    [32]: 0x809A5C63 0x0040E988 0x0040E9AC 0x0042D1A8
    [36]: 0x8091D252 0x0040E9A8 0x00000002 0x00000001
    [40]: 0x809FDA9D 0x0040EA58 0x0043D554 0x0042D554
    [44]: 0x809F8B22 0x0040EA78 0x0043D554 0x00000001
    [48]: 0x80911210 0x0040EAC8 0x00000010 0x004041D0
    [52]: 0x80911154 0x0040EB28 0x00400000 0x00000000
    [56]: 0x8091122D 0x0040EB48 0x00000000 0x00400600

    Reported-by: Rouven Czerwinski
    Tested-by: Timur Kristóf
    Signed-off-by: Ryan Hsu
    Signed-off-by: Kalle Valo
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Ryan Hsu
     
  • [ Upstream commit c4c2b7644cc9a41f17a8cc8904efe3f66ae4c7ed ]

    The d->chans[] array has d->dma_requests elements so the > should be
    >= here.

    Fixes: 8e6152bc660e ("dmaengine: Add hisilicon k3 DMA engine driver")
    Signed-off-by: Dan Carpenter
    Signed-off-by: Vinod Koul
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • [ Upstream commit e3f329c600033f011a978a8bc4ddb1e2e94c4f4d ]

    The reported residue is already calculated in BURST unit granularity, so
    advertise this capability properly to other devices in the system.

    Fixes: aee4d1fac887 ("dmaengine: pl330: improve pl330_tx_status() function")
    Signed-off-by: Marek Szyprowski
    Signed-off-by: Vinod Koul
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Marek Szyprowski
     
  • [ Upstream commit 1c38f4afd5d40234b67635b3c608a4093be04b96 ]

    meson-gxl-mali.dtsi is only used on GXL SoCs. Thus it should use the GXL
    specific compatible string instead of the GXBB one.
    For now this is purely cosmetic since the (out-of-tree) lima driver for
    this GPU currently uses the "arm,mali-450" match instead of the SoC
    specific one. However, update the .dts to match the documentation since
    this driver behavior might change in the future.

    Signed-off-by: Martin Blumenstingl
    Acked-by: Neil Armstrong
    Signed-off-by: Kevin Hilman
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Martin Blumenstingl
     
  • [ Upstream commit 3eb1b955cd7ed1e621ace856710006c2a8a7f231 ]

    The intc #interrupt-cells is equal to 1. Currently gpio
    node has 2 cells per IRQ which is wrong. Remove the additional
    cell for each of the interrupts.

    Signed-off-by: Keerthy
    Fixes: 2e38b946dc54 ("ARM: davinci: da850: add GPIO DT node")
    Signed-off-by: Sekhar Nori
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Keerthy
     
  • [ Upstream commit e8a445dea219c32727016af14f847d2e8f7ebec8 ]

    We have short names for the requested and resulting register values.
    Use them instead of spelling out the whole register entry for each
    case.

    Signed-off-by: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/bb3bc1f923a2f6fe7912d22a1068fe29d6033d38.1530076529.git.luto@kernel.org
    Signed-off-by: Ingo Molnar
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Andy Lutomirski
     
  • [ Upstream commit ec348020566009d3da9b99f07c05814d13969c78 ]

    When I wrote the sigreturn test, I didn't realize that AMD's busted
    IRET behavior was different from Intel's busted IRET behavior:

    On AMD CPUs, the CPU leaks the high 32 bits of the kernel stack pointer
    to certain userspace contexts. Gee, thanks. There's very little
    the kernel can do about it. Modify the test so it passes.

    Signed-off-by: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/86e7fd3564497f657de30a36da4505799eebef01.1530076529.git.luto@kernel.org
    Signed-off-by: Ingo Molnar
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Andy Lutomirski
     
  • [ Upstream commit 2d2595719a97c876f35b1e60e5768e58753b268c ]

    sizeof() will return unsigned value so in the error check
    negative error code will be always larger than sizeof().

    Fixes: a0d8e02c35ff ("nfp: add support for reading nffw info")

    Signed-off-by: Chengguang Xu
    Acked-by: Jakub Kicinski
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Chengguang Xu