1. 12 May, 2019 7 commits
  2. 11 May, 2019 1 commit
    • Daniel Borkmann's avatar
      bpf: fix out of bounds backwards jmps due to dead code removal · af959b18
      Daniel Borkmann authored
      systemtap folks reported the following splat recently:
      
        [ 7790.862212] WARNING: CPU: 3 PID: 26759 at arch/x86/kernel/kprobes/core.c:1022 kprobe_fault_handler+0xec/0xf0
        [...]
        [ 7790.864113] CPU: 3 PID: 26759 Comm: sshd Not tainted 5.1.0-0.rc7.git1.1.fc31.x86_64 #1
        [ 7790.864198] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS[...]
        [ 7790.864314] RIP: 0010:kprobe_fault_handler+0xec/0xf0
        [ 7790.864375] Code: 48 8b 50 [...]
        [ 7790.864714] RSP: 0018:ffffc06800bdbb48 EFLAGS: 00010082
        [ 7790.864812] RAX: ffff9e2b75a16320 RBX: 0000000000000000 RCX: 0000000000000000
        [ 7790.865306] RDX: ffffffffffffffff RSI: 000000000000000e RDI: ffffc06800bdbbf8
        [ 7790.865514] RBP: ffffc06800bdbbf8 R08: 0000000000000000 R09: 0000000000000000
        [ 7790.865960] R10: 0000000000000000 R11: 0000000000000000 R12: ffffc06800bdbbf8
        [ 7790.866037] R13: ffff9e2ab56a0418 R14: ffff9e2b6d0bb400 R15: ffff9e2b6d268000
        [ 7790.866114] FS:  00007fde49937d80(0000) GS:ffff9e2b75a00000(0000) knlGS:0000000000000000
        [ 7790.866193] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        [ 7790.866318] CR2: 0000000000000000 CR3: 000000012f312000 CR4: 00000000000006e0
        [ 7790.866419] Call Trace:
        [ 7790.866677]  do_user_addr_fault+0x64/0x480
        [ 7790.867513]  do_page_fault+0x33/0x210
        [ 7790.868002]  async_page_fault+0x1e/0x30
        [ 7790.868071] RIP: 0010:          (null)
        [ 7790.868144] Code: Bad RIP value.
        [ 7790.868229] RSP: 0018:ffffc06800bdbca8 EFLAGS: 00010282
        [ 7790.868362] RAX: ffff9e2b598b60f8 RBX: ffffc06800bdbe48 RCX: 0000000000000004
        [ 7790.868629] RDX: 0000000000000004 RSI: ffffc06800bdbc6c RDI: ffff9e2b598b60f0
        [ 7790.868834] RBP: ffffc06800bdbcf8 R08: 0000000000000000 R09: 0000000000000004
        [ 7790.870432] R10: 00000000ff6f7a03 R11: 0000000000000000 R12: 0000000000000001
        [ 7790.871859] R13: ffffc06800bdbcb8 R14: 0000000000000000 R15: ffff9e2acd0a5310
        [ 7790.873455]  ? vfs_read+0x5/0x170
        [ 7790.874639]  ? vfs_read+0x1/0x170
        [ 7790.875834]  ? trace_call_bpf+0xf6/0x260
        [ 7790.877044]  ? vfs_read+0x1/0x170
        [ 7790.878208]  ? vfs_read+0x5/0x170
        [ 7790.879345]  ? kprobe_perf_func+0x233/0x260
        [ 7790.880503]  ? vfs_read+0x1/0x170
        [ 7790.881632]  ? vfs_read+0x5/0x170
        [ 7790.882751]  ? kprobe_ftrace_handler+0x92/0xf0
        [ 7790.883926]  ? __vfs_read+0x30/0x30
        [ 7790.885050]  ? ftrace_ops_assist_func+0x94/0x100
        [ 7790.886183]  ? vfs_read+0x1/0x170
        [ 7790.887283]  ? vfs_read+0x5/0x170
        [ 7790.888348]  ? ksys_read+0x5a/0xe0
        [ 7790.889389]  ? do_syscall_64+0x5c/0xa0
        [ 7790.890401]  ? entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      After some debugging, turns out that the logic in 2cbd95a5
      ("bpf: change parameters of call/branch offset adjustment") has
      a bug that is exposed after 52875a04 ("bpf: verifier: remove
      dead code") in that we miss some of the jump offset adjustments
      after code patching when we remove dead code, more concretely,
      upon backward jump spanning over the area that is being removed.
      
      BPF insns of a case that was hit pre 52875a04:
      
        [...]
        676: (85) call bpf_perf_event_output#-47616
        677: (05) goto pc-636
        678: (62) *(u32 *)(r10 -64) = 0
        679: (bf) r7 = r10
        680: (07) r7 += -64
        681: (05) goto pc-44
        682: (05) goto pc-1
        683: (05) goto pc-1
      
      BPF insns afterwards:
      
        [...]
        618: (85) call bpf_perf_event_output#-47616
        619: (05) goto pc-638
        620: (62) *(u32 *)(r10 -64) = 0
        621: (bf) r7 = r10
        622: (07) r7 += -64
        623: (05) goto pc-44
      
      To illustrate the bug, situation looks as follows:
           ____
        0 |    | <-- foo: [...]
        1 |____|
        2 |____| <-- pos / end_new  ^
        3 |    |                    |
        4 |    |                    |  len
        5 |____|                    |  (remove region)
        6 |    | <-- end_old        v
        7 |    |
        8 |    | <-- curr  (jmp foo)
        9 |____|
      
      The condition curr >= end_new && curr + off + 1 < end_new in the
      branch delta adjustments is never hit because curr + off + 1 <
      end_new is compared as unsigned and therefore curr + off + 1 >
      end_new in unsigned realm as curr + off + 1 becomes negative
      since the insns are memmove()'d before the offset adjustments.
      
      Correct BPF insns after this fix:
      
        [...]
        618: (85) call bpf_perf_event_output#-47216
        619: (05) goto pc-578
        620: (62) *(u32 *)(r10 -64) = 0
        621: (bf) r7 = r10
        622: (07) r7 += -64
        623: (05) goto pc-44
      
      Note that unprivileged case is not affected from this.
      
      Fixes: 52875a04 ("bpf: verifier: remove dead code")
      Fixes: 2cbd95a5 ("bpf: change parameters of call/branch offset adjustment")
      Reported-by: default avatarFrank Ch. Eigler <fche@redhat.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      af959b18
  3. 10 May, 2019 15 commits
    • Heiner Kallweit's avatar
      net: phy: realtek: add missing page operations · daf3ddbe
      Heiner Kallweit authored
      Add missing page operation callbacks to few Realtek drivers.
      This also fixes a NPE after the referenced commit added code to the
      RTL8211E driver that uses phy_select_page().
      
      Fixes: f81dadbc ("net: phy: realtek: Add rtl8211e rx/tx delays config")
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reported-by: default avatarVicente Bergas <vicencb@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      daf3ddbe
    • David S. Miller's avatar
      Merge branch 'of_get_mac_address-fixes' · 9593dc35
      David S. Miller authored
      Petr Štetiar says:
      
      ====================
      of_get_mac_address fixes
      
      this patch series is hopefuly the last series of the fixes which are related
      to the introduction of NVMEM support into of_get_mac_address.
      
      First patch is removing `nvmem-mac-address` property which was wrong idea as
      I've allocated the property with devm_kzalloc and then added it to DT, so then
      2 entities would be refcounting the allocation.  So if the driver unbinds, the
      buffer is freed, but DT code would be still referencing that memory.
      
      Second patch fixes some unwanted references to the Linux API in the DT
      bindings documentation.
      
      Patches 3-5 should hopefully make compilers and thus kbuild test robot happy.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9593dc35
    • Petr Štetiar's avatar
      net: wireless: mt76: fix similar warning reported by kbuild test robot · 1b9705d9
      Petr Štetiar authored
      This patch fixes following (similar) warning reported by kbuild test robot:
      
       In function ‘memcpy’,
        inlined from ‘smsc75xx_init_mac_address’ at drivers/net/usb/smsc75xx.c:778:3,
        inlined from ‘smsc75xx_bind’ at drivers/net/usb/smsc75xx.c:1501:2:
        ./include/linux/string.h:355:9: warning: argument 2 null where non-null expected [-Wnonnull]
        return __builtin_memcpy(p, q, size);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        drivers/net/usb/smsc75xx.c: In function ‘smsc75xx_bind’:
        ./include/linux/string.h:355:9: note: in a call to built-in function ‘__builtin_memcpy’
      
      I've replaced the offending memcpy with ether_addr_copy, because I'm
      100% sure, that of_get_mac_address can't return NULL as it returns valid
      pointer or ERR_PTR encoded value, nothing else.
      
      I'm hesitant to just change IS_ERR into IS_ERR_OR_NULL check, as this
      would make the warning disappear also, but it would be confusing to
      check for impossible return value just to make a compiler happy.
      
      I'm now changing all occurencies of memcpy to ether_addr_copy after the
      of_get_mac_address call, as it's very likely, that we're going to get
      similar reports from kbuild test robot in the future.
      
      Fixes: d31a36b5 ("net: wireless: support of_get_mac_address new ERR_PTR error")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarPetr Štetiar <ynezz@true.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1b9705d9
    • Petr Štetiar's avatar
      net: ethernet: fix similar warning reported by kbuild test robot · 2d2924af
      Petr Štetiar authored
      This patch fixes following (similar) warning reported by kbuild test robot:
      
       In function ‘memcpy’,
        inlined from ‘smsc75xx_init_mac_address’ at drivers/net/usb/smsc75xx.c:778:3,
        inlined from ‘smsc75xx_bind’ at drivers/net/usb/smsc75xx.c:1501:2:
        ./include/linux/string.h:355:9: warning: argument 2 null where non-null expected [-Wnonnull]
        return __builtin_memcpy(p, q, size);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        drivers/net/usb/smsc75xx.c: In function ‘smsc75xx_bind’:
        ./include/linux/string.h:355:9: note: in a call to built-in function ‘__builtin_memcpy’
      
      I've replaced the offending memcpy with ether_addr_copy, because I'm
      100% sure, that of_get_mac_address can't return NULL as it returns valid
      pointer or ERR_PTR encoded value, nothing else.
      
      I'm hesitant to just change IS_ERR into IS_ERR_OR_NULL check, as this
      would make the warning disappear also, but it would be confusing to
      check for impossible return value just to make a compiler happy.
      
      I'm now changing all occurencies of memcpy to ether_addr_copy after the
      of_get_mac_address call, as it's very likely, that we're going to get
      similar reports from kbuild test robot in the future.
      
      Fixes: a51645f7 ("net: ethernet: support of_get_mac_address new ERR_PTR error")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarPetr Štetiar <ynezz@true.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2d2924af
    • Petr Štetiar's avatar
      powerpc: tsi108: fix similar warning reported by kbuild test robot · 1be91314
      Petr Štetiar authored
      This patch fixes following (similar) warning reported by kbuild test robot:
      
       In function ‘memcpy’,
        inlined from ‘smsc75xx_init_mac_address’ at drivers/net/usb/smsc75xx.c:778:3,
        inlined from ‘smsc75xx_bind’ at drivers/net/usb/smsc75xx.c:1501:2:
        ./include/linux/string.h:355:9: warning: argument 2 null where non-null expected [-Wnonnull]
        return __builtin_memcpy(p, q, size);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        drivers/net/usb/smsc75xx.c: In function ‘smsc75xx_bind’:
        ./include/linux/string.h:355:9: note: in a call to built-in function ‘__builtin_memcpy’
      
      I've replaced the offending memcpy with ether_addr_copy, because I'm
      100% sure, that of_get_mac_address can't return NULL as it returns valid
      pointer or ERR_PTR encoded value, nothing else.
      
      I'm hesitant to just change IS_ERR into IS_ERR_OR_NULL check, as this
      would make the warning disappear also, but it would be confusing to
      check for impossible return value just to make a compiler happy.
      
      I'm now changing all occurencies of memcpy to ether_addr_copy after the
      of_get_mac_address call, as it's very likely, that we're going to get
      similar reports from kbuild test robot in the future.
      
      Fixes: ea168cdf ("powerpc: tsi108: support of_get_mac_address new ERR_PTR error")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarPetr Štetiar <ynezz@true.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1be91314
    • Petr Štetiar's avatar
      dt-bindings: doc: net: remove Linux API references · 51828950
      Petr Štetiar authored
      In commit 687e3d55 ("dt-bindings: doc: reflect new NVMEM
      of_get_mac_address behaviour") I've kept or added references to Linux
      of_get_mac_address API which is unwanted so this patch fixes that by
      removing those references.
      
      Fixes: 687e3d55 ("dt-bindings: doc: reflect new NVMEM of_get_mac_address behaviour")
      Suggested-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarPetr Štetiar <ynezz@true.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51828950
    • Petr Štetiar's avatar
      of_net: remove nvmem-mac-address property · 26574986
      Petr Štetiar authored
      In commit d01f449c ("of_net: add NVMEM support to
      of_get_mac_address") I've added `nvmem-mac-address` property which was
      wrong idea as I've allocated the property with devm_kzalloc and then
      added it to DT, so then 2 entities would be refcounting the allocation.
      So if the driver unbinds, the buffer is freed, but DT code would be
      still referencing that memory.
      
      I'm removing this property completely instead of fixing it, as it's not
      needed to have it.
      
      Fixes: d01f449c ("of_net: add NVMEM support to of_get_mac_address")
      Suggested-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarPetr Štetiar <ynezz@true.cz>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      26574986
    • Thomas Falcon's avatar
      net/ibmvnic: Update carrier state after link state change · 0655f994
      Thomas Falcon authored
      Only set the device carrier state to on after receiving an up link
      state indication from the underlying adapter. Likewise, if a down
      link indication is receieved, update the carrier state accordingly.
      This fix ensures that accurate carrier state is reported by the driver
      following a link state update by the underlying adapter.
      Signed-off-by: default avatarThomas Falcon <tlfalcon@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0655f994
    • Thomas Falcon's avatar
      net/ibmvnic: Update MAC address settings after adapter reset · 62740e97
      Thomas Falcon authored
      It was discovered in testing that the underlying hardware MAC
      address will revert to initial settings following a device reset,
      but the driver fails to resend the current OS MAC settings. This
      oversight can result in dropped packets should the scenario occur.
      Fix this by informing hardware of current MAC address settings
      following any adapter initialization or resets.
      Signed-off-by: default avatarThomas Falcon <tlfalcon@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      62740e97
    • YueHaibing's avatar
      dsa: tag_brcm: Fix build error without CONFIG_NET_DSA_TAG_BRCM_PREPEND · b96a5415
      YueHaibing authored
      Fix gcc build error:
      
      net/dsa/tag_brcm.c:211:16: error: brcm_prepend_netdev_ops undeclared here (not in a function); did you mean brcm_netdev_ops?
       DSA_TAG_DRIVER(brcm_prepend_netdev_ops);
                      ^
      ./include/net/dsa.h:708:10: note: in definition of macro DSA_TAG_DRIVER
        .ops = &__ops,       \
                ^~~~~
      ./include/net/dsa.h:701:36: warning: dsa_tag_driver_brcm_prepend_netdev_ops defined but not used [-Wunused-variable]
       #define DSA_TAG_DRIVER_NAME(__ops) dsa_tag_driver ## _ ## __ops
                                          ^
      ./include/net/dsa.h:707:30: note: in expansion of macro DSA_TAG_DRIVER_NAME
       static struct dsa_tag_driver DSA_TAG_DRIVER_NAME(__ops) = {  \
                                    ^~~~~~~~~~~~~~~~~~~
      net/dsa/tag_brcm.c:211:1: note: in expansion of macro DSA_TAG_DRIVER
       DSA_TAG_DRIVER(brcm_prepend_netdev_ops);
      
      Like the CONFIG_NET_DSA_TAG_BRCM case,
      brcm_prepend_netdev_ops and DSA_TAG_PROTO_BRCM_PREPEND
      should be wrappeed by CONFIG_NET_DSA_TAG_BRCM_PREPEND.
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Fixes: b74b70c4 ("net: dsa: Support prepended Broadcom tag")
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b96a5415
    • Tobin C. Harding's avatar
      bridge: Fix error path for kobject_init_and_add() · bdfad5ae
      Tobin C. Harding authored
      Currently error return from kobject_init_and_add() is not followed by a
      call to kobject_put().  This means there is a memory leak.  We currently
      set p to NULL so that kfree() may be called on it as a noop, the code is
      arguably clearer if we move the kfree() up closer to where it is
      called (instead of after goto jump).
      
      Remove a goto label 'err1' and jump to call to kobject_put() in error
      return from kobject_init_and_add() fixing the memory leak.  Re-name goto
      label 'put_back' to 'err1' now that we don't use err1, following current
      nomenclature (err1, err2 ...).  Move call to kfree out of the error
      code at bottom of function up to closer to where memory was allocated.
      Add comment to clarify call to kfree().
      Signed-off-by: default avatarTobin C. Harding <tobin@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bdfad5ae
    • Paolo Abeni's avatar
      Revert "selinux: do not report error on connect(AF_UNSPEC)" · e711ab93
      Paolo Abeni authored
      This reverts commit c7e0d6cc.
      
      It was agreed a slightly different fix via the selinux tree.
      
      v1 -> v2:
       - use the correct reverted commit hash
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e711ab93
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.2-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · b970afcf
      Linus Torvalds authored
      Pull powerpc updates from Michael Ellerman:
       "Slightly delayed due to the issue with printk() calling
        probe_kernel_read() interacting with our new user access prevention
        stuff, but all fixed now.
      
        The only out-of-area changes are the addition of a cpuhp_state, small
        additions to Documentation and MAINTAINERS updates.
      
        Highlights:
      
         - Support for Kernel Userspace Access/Execution Prevention (like
           SMAP/SMEP/PAN/PXN) on some 64-bit and 32-bit CPUs. This prevents
           the kernel from accidentally accessing userspace outside
           copy_to/from_user(), or ever executing userspace.
      
         - KASAN support on 32-bit.
      
         - Rework of where we map the kernel, vmalloc, etc. on 64-bit hash to
           use the same address ranges we use with the Radix MMU.
      
         - A rewrite into C of large parts of our idle handling code for
           64-bit Book3S (ie. power8 & power9).
      
         - A fast path entry for syscalls on 32-bit CPUs, for a 12-17% speedup
           in the null_syscall benchmark.
      
         - On 64-bit bare metal we have support for recovering from errors
           with the time base (our clocksource), however if that fails
           currently we hang in __delay() and never crash. We now have support
           for detecting that case and short circuiting __delay() so we at
           least panic() and reboot.
      
         - Add support for optionally enabling the DAWR on Power9, which had
           to be disabled by default due to a hardware erratum. This has the
           effect of enabling hardware breakpoints for GDB, the downside is a
           badly behaved program could crash the machine by pointing the DAWR
           at cache inhibited memory. This is opt-in obviously.
      
         - xmon, our crash handler, gets support for a read only mode where
           operations that could change memory or otherwise disturb the system
           are disabled.
      
        Plus many clean-ups, reworks and minor fixes etc.
      
        Thanks to: Christophe Leroy, Akshay Adiga, Alastair D'Silva, Alexey
        Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V, Anju T Sudhakar,
        Anton Blanchard, Ben Hutchings, Bo YU, Breno Leitao, Cédric Le Goater,
        Christopher M. Riedl, Christoph Hellwig, Colin Ian King, David Gibson,
        Ganesh Goudar, Gautham R. Shenoy, George Spelvin, Greg Kroah-Hartman,
        Greg Kurz, Horia Geantă, Jagadeesh Pagadala, Joel Stanley, Joe
        Perches, Julia Lawall, Laurentiu Tudor, Laurent Vivier, Lukas Bulwahn,
        Madhavan Srinivasan, Mahesh Salgaonkar, Mathieu Malaterre, Michael
        Neuling, Mukesh Ojha, Nathan Fontenot, Nathan Lynch, Nicholas Piggin,
        Nick Desaulniers, Oliver O'Halloran, Peng Hao, Qian Cai, Ravi
        Bangoria, Rick Lindsley, Russell Currey, Sachin Sant, Stewart Smith,
        Sukadev Bhattiprolu, Thomas Huth, Tobin C. Harding, Tyrel Datwyler,
        Valentin Schneider, Wei Yongjun, Wen Yang, YueHaibing"
      
      * tag 'powerpc-5.2-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (205 commits)
        powerpc/64s: Use early_mmu_has_feature() in set_kuap()
        powerpc/book3s/64: check for NULL pointer in pgd_alloc()
        powerpc/mm: Fix hugetlb page initialization
        ocxl: Fix return value check in afu_ioctl()
        powerpc/mm: fix section mismatch for setup_kup()
        powerpc/mm: fix redundant inclusion of pgtable-frag.o in Makefile
        powerpc/mm: Fix makefile for KASAN
        powerpc/kasan: add missing/lost Makefile
        selftests/powerpc: Add a signal fuzzer selftest
        powerpc/booke64: set RI in default MSR
        ocxl: Provide global MMIO accessors for external drivers
        ocxl: move event_fd handling to frontend
        ocxl: afu_irq only deals with IRQ IDs, not offsets
        ocxl: Allow external drivers to use OpenCAPI contexts
        ocxl: Create a clear delineation between ocxl backend & frontend
        ocxl: Don't pass pci_dev around
        ocxl: Split pci.c
        ocxl: Remove some unused exported symbols
        ocxl: Remove superfluous 'extern' from headers
        ocxl: read_pasid never returns an error, so make it void
        ...
      b970afcf
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 8ea5b2ab
      Linus Torvalds authored
      Pull vfs mount fix from Al Viro:
       "Fix for umount -l/mount --move race caught by syzbot yesterday..."
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        do_move_mount(): fix an unsafe use of is_anon_ns()
      8ea5b2ab
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 601e6bcc
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Several bug fixes, many are quick merge-window regression cures:
      
         - When NLM_F_EXCL is not set, allow same fib rule insertion. From
           Hangbin Liu.
      
         - Several cures in sja1105 DSA driver (while loop exit condition fix,
           return of negative u8, etc.) from Vladimir Oltean.
      
         - Handle tx/rx delays in realtek PHY driver properly, from Serge
           Semin.
      
         - Double free in cls_matchall, from Pieter Jansen van Vuuren.
      
         - Disable SIOCSHWTSTAMP in macvlan/vlan containers, from Hangbin Liu.
      
         - Endainness fixes in aqc111, from Oliver Neukum.
      
         - Handle errors in packet_init properly, from Haibing Yue.
      
         - Various W=1 warning fixes in kTLS, from Jakub Kicinski"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits)
        nfp: add missing kdoc
        net/tls: handle errors from padding_length()
        net/tls: remove set but not used variables
        docs/btf: fix the missing section marks
        nfp: bpf: fix static check error through tightening shift amount adjustment
        selftests: bpf: initialize bpf_object pointers where needed
        packet: Fix error path in packet_init
        net/tcp: use deferred jump label for TCP acked data hook
        net: aquantia: fix undefined devm_hwmon_device_register_with_info reference
        aqc111: fix double endianness swap on BE
        aqc111: fix writing to the phy on BE
        aqc111: fix endianness issue in aqc111_change_mtu
        vlan: disable SIOCSHWTSTAMP in container
        macvlan: disable SIOCSHWTSTAMP in container
        tipc: fix hanging clients using poll with EPOLLOUT flag
        tuntap: synchronize through tfiles array instead of tun->numqueues
        tuntap: fix dividing by zero in ebpf queue selection
        dwmac4_prog_mtl_tx_algorithms() missing write operation
        ptp_qoriq: fix NULL access if ptp dt node missing
        net/sched: avoid double free on matchall reoffload
        ...
      601e6bcc
  4. 09 May, 2019 17 commits
    • Jakub Kicinski's avatar
      nfp: add missing kdoc · 6c9f0544
      Jakub Kicinski authored
      Add missing kdoc for app member.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c9f0544
    • David S. Miller's avatar
      Merge branch 'tls-warnings' · f50c8a01
      David S. Miller authored
      Jakub Kicinski says:
      
      ====================
      net/tls: fix W=1 build warnings
      
      This small series cleans up two outstanding W=1 build
      warnings in tls code.  Both are set but not used variables.
      The first case looks fairly straightforward.  In the second
      I think it's better to propagate the error code, even if
      not doing some does not lead to a crash with current code.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f50c8a01
    • Jakub Kicinski's avatar
      net/tls: handle errors from padding_length() · b53f4976
      Jakub Kicinski authored
      At the time padding_length() is called the record header
      is still part of the message.  If malicious TLS 1.3 peer
      sends an all-zero record padding_length() will stop at
      the record header, and return full length of the data
      including the tail_size.
      
      Subsequent subtraction of prot->overhead_size from rxm->full_len
      will cause rxm->full_len to turn negative.  skb accessors,
      however, will always catch resulting out-of-bounds operation,
      so in practice this fix comes down to returning the correct
      error code.  It also fixes a set but not used warning.
      
      This code was added by commit 130b392c ("net: tls: Add tls 1.3 support").
      
      CC: Dave Watson <davejwatson@fb.com>
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b53f4976
    • Jakub Kicinski's avatar
      net/tls: remove set but not used variables · 88c80bee
      Jakub Kicinski authored
      Commit 4504ab0e ("net/tls: Inform user space about send buffer availability")
      made us report write_space regardless whether partial record
      push was successful or not.  Remove the now unused return value
      to clean up the following W=1 warning:
      
      net/tls/tls_device.c: In function ‘tls_device_write_space’:
      net/tls/tls_device.c:546:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
        int rc = 0;
            ^~
      
      CC: Vakul Garg <vakul.garg@nxp.com>
      CC: Boris Pismenny <borisp@mellanox.com>
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      88c80bee
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 15192f25
      David S. Miller authored
      Alexei Starovoitov says:
      
      ====================
      pull-request: bpf 2019-05-09
      
      The following pull-request contains BPF updates for your *net* tree.
      
      The main changes are:
      
      1) three small fixes from Gary, Jiong and Lorenz.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      15192f25
    • Gary Lin's avatar
      docs/btf: fix the missing section marks · 3ef4641f
      Gary Lin authored
      The section titles of 3.4 and 3.5 are not marked correctly.
      Signed-off-by: default avatarGary Lin <glin@suse.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      3ef4641f
    • Jiong Wang's avatar
      nfp: bpf: fix static check error through tightening shift amount adjustment · 69e168eb
      Jiong Wang authored
      NFP shift instruction has something special. If shift direction is left
      then shift amount of 1 to 31 is specified as 32 minus the amount to shift.
      
      But no need to do this for indirect shift which has shift amount be 0. Even
      after we do this subtraction, shift amount 0 will be turned into 32 which
      will eventually be encoded the same as 0 because only low 5 bits are
      encoded, but shift amount be 32 will fail the FIELD_PREP check done later
      on shift mask (0x1f), due to 32 is out of mask range. Such error has been
      observed when compiling nfp/bpf/jit.c using gcc 8.3 + O3.
      
      This issue has started when indirect shift support added after which the
      incoming shift amount to __emit_shf could be 0, therefore it is at that
      time shift amount adjustment inside __emit_shf should have been tightened.
      
      Fixes: 991f5b36 ("nfp: bpf: support logic indirect shifts (BPF_[L|R]SH | BPF_X)")
      Reported-by: default avatarOleksandr Natalenko <oleksandr@natalenko.name>
      Reported-by: Pablo Cascón <pablo.cascon@netronome.com
      Reviewed-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarJiong Wang <jiong.wang@netronome.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      69e168eb
    • Lorenz Bauer's avatar
      selftests: bpf: initialize bpf_object pointers where needed · 07b61991
      Lorenz Bauer authored
      There are a few tests which call bpf_object__close on uninitialized
      bpf_object*, which may segfault. Explicitly zero-initialise these pointers
      to avoid this.
      Signed-off-by: default avatarLorenz Bauer <lmb@cloudflare.com>
      Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      07b61991
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 9b6c9e96
      Linus Torvalds authored
      Pull sparc updates from David Miller:
       "Here we go:
      
         - Fix various long standing issues in the sparc 32-bit IOMMU support
           code, from Christoph Hellwig.
      
         - Various other code cleanups and simplifications all over. From
           Gustavo A. R. Silva, Jagadeesh Pagadala, Masahiro Yamada, Mauro
           Carvalho Chehab, Mike Rapoport"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: simplify reduce_memory() function
        sparc: use struct_size() in kzalloc()
        docs: sparc: convert to ReST
        sparc/iommu: merge iommu_get_one and __sbus_iommu_map_page
        sparc/iommu: use __sbus_iommu_map_page to implement the map_sg path
        sparc/iommu: fix __sbus_iommu_map_page for highmem pages
        sparc/iommu: move per-page flushing into __sbus_iommu_map_page
        sparc/iommu: pass a physical address to iommu_get_one
        sparc/iommu: create a common helper for map_sg
        sparc/iommu: merge iommu_release_one and sbus_iommu_unmap_page
        sparc/iommu: use sbus_iommu_unmap_page in sbus_iommu_unmap_sg
        sparc/iommu: use !PageHighMem to check if a page has a kernel mapping
        sparc: vdso: add FORCE to the build rule of %.so
        arch:sparc:kernel/uprobes.c : Remove duplicate header
      9b6c9e96
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · ea5aee6d
      Linus Torvalds authored
      Pull clk framework updates from Stephen Boyd:
       "We have a couple new features and changes in the core clk framework
        this time around because we've finally gotten around to fixing some
        long standing issues. There's still work to do though, so this pull
        request is largely laying down the foundation for all the driver
        changes to come in the next merge window.
      
        The first problem we're alleviating is how parents of clks are
        specified. With the new method, we should see lots of drivers migrate
        away from the current design of string comparisons on the entire clk
        tree to a more direct method where they can use clk_hw pointers or
        more localized names specified in DT or via clkdev. This should reduce
        our reliance on string comparisons for all the topology description
        logic that we've been using for years and hopefully speed some things
        up while avoiding problems we have with generating clk names.
      
        Beyond that we also got rid of the CLK_IS_BASIC flag because it wasn't
        really helping anyone and we introduced big-endian versions of the
        basic clk types so that we can get rid of clk_{readl,writel}(). Both
        of these are things that driver developers have tried to use over the
        years that I typically bat away during code reviews because they're
        not useful. It's great to see these two things go away so maintainers
        can save time not worrying about these things.
      
        On the driver side we got the usual collection of new SoC support and
        non-critical fixes and updates to existing code. The big topics that
        stand out are the new driver support for Mediatek MT8183 and MT8516
        SoCs, Amlogic Meson8b and G12a SoCs, and the SiFive FU540 SoC. The
        other patches in the driver pile are mostly fixes for things that are
        being used for the first time or additions for clks that couldn't be
        tested before because there wasn't a consumer driver that exercised
        them. Details are below and also in the sub-maintainer tags.
      
        Core:
         - Remove clk_readl() and introduce BE versions of basic clk types
         - Rewrite how clk parents can be specified to allow DT/clkdev lookups
         - Removal of the CLK_IS_BASIC clk flag
         - Framework documentation updates and fixes
      
        New Drivers:
         - Support for STM32F769
         - AT91 sam9x60 PMC support
         - SiFive FU540 PRCI and PLL support
         - Qualcomm QCS404 CDSP clk support
         - Qualcomm QCS404 Turing clk support
         - Mediatek MT8183 clock support
         - Mediatek MT8516 clock support
         - Milbeaut M10V clk controller support
         - Support for Cirrus Logic Lochnagar clks
      
        Updates:
         - Rework AT91 sckc DT bindings
         - Fix slow RC oscillator issue on sama5d3
         - Mark UFS clk as critical on Hi-Silicon hi3660 SoCs
         - Various static analysis fixes/finds and const markings
         - Video Engine (ECLK) support on Aspeed SoCs
         - Xilinx ZynqMP Versal platform support
         - Convert Xilinx ZynqMP driver to be struct oriented
         - Fixes for Rockchip rk3328 and rk3288 SoCs
         - Sub-type for Rockchip SoCs where mux and divider aren't a single register
         - Remove SNVS clock from i.MX7UPL clock driver and bindings
         - Improve i.MX5 clock driver for i.MX50 support
         - Addition of ADC clock definition for Exynos 5410 SoC (Odroid XU)
         - Export a new clock for the MBUS controller on the A13
         - Allwinner H6 fixes to support a finer clocking of the video and VPU engines
         - Add g12a support in the Amlogic axg audio clock controller
         - Add missing PCI USB clock on Rensas RZ/N1
         - Add Z2 (Cortex-A53) clocks on Rensas R-Car E3 and RZ/G2E
         - A new helper DIV64_U64_ROUND_CLOSEST() in <linux/math64.h>
         - VPU and Video Decoder clocks on Amlogic Meson8b
         - Finally remove the wrong ABP Meson8b clock id
         - Add Video Decoder, PCIe PLL, and CPU Clocks on Amlogic G12A
         - Re-expose SAR_ADC_SEL and CTS_OSCIN on Amlogic G12A AO clock controller
         - Un-expose some Amlogic AXG-Audio input clocks IDs"
      
      * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (172 commits)
        clk: Cache core in clk_fetch_parent_index() without names
        clk: imx: correct pfdv2 gate_bit/vld_bit operations
        clk: sifive: add a driver for the SiFive FU540 PRCI IP block
        clk: analogbits: add Wide-Range PLL library
        clk: imx: clk-pllv3: mark expected switch fall-throughs
        clk: imx8mq: Add dsi_ipg_div
        clk: imx: pllv4: add fractional-N pll support
        clk: sunxi-ng: Use the correct style for SPDX License Identifier
        clk: sprd: Use the correct style for SPDX License Identifier
        clk: renesas: Use the correct style for SPDX License Identifier
        clk: qcom: Use the correct style for SPDX License Identifier
        clk: davinci: Use the correct style for SPDX License Identifier
        clk: actions: Use the correct style for SPDX License Identifier
        clk: imx: keep uart clock on during system boot
        clk: imx: correct i.MX7D AV PLL num/denom offset
        dt-bindings: clk: add documentation for the SiFive PRCI driver
        clk: stm32mp1: Add ddrperfm clock
        clk: Remove CLK_IS_BASIC clk flag
        clock: milbeaut: Add Milbeaut M10V clock controller
        dt-bindings: clock: milbeaut: add Milbeaut clock description
        ...
      ea5aee6d
    • Linus Torvalds's avatar
      Merge tag 'rtc-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · 8e4ff713
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "A huge series from me this cycle. I went through many drivers to set
        the date and time range supported by the RTC which helps solving HW
        limitation when the time comes (as early as next year for some). This
        time, I focused on drivers using .set_mms and .set_mmss64, allowing me
        to remove those callbacks. About a third of the patches got reviews, I
        actually own the RTCs and I tested another third and the remaining one
        are unlikely to cause any issues.
      
        Other than that, a single new driver and the usual fixes here and there.
      
        Summary:
      
        Subsystem:
      
         - set_mmss and set_mmss64 rtc_ops removal
      
         - Fix timestamp value for RTC_TIMESTAMP_BEGIN_1900
      
         - Use SPDX identifier for the core
      
         - validate upper bound of tm->tm_year
      
        New driver:
      
         - Aspeed BMC SoC RTC
      
        Drivers:
      
         - abx80x: use rtc_add_group
      
         - ds3232: nvram support
      
         - pcf85063: add alarm, nvram, offset correction and microcrystal
           rv8263 support
      
         - x1205: add of_match_table
      
         - Use set_time instead of set_mms/set_mmss64 for: ab3100, coh901331,
           digicolor, ds1672, ds2404, ep93xx, imxdi, jz4740, lpc32xx, mc13xxx,
           mxc, pcap, stmp3xxx, test, wm831x, xgene.
      
         - Set RTC range for: ab3100, at91sam9, coh901331, da9063, digicolor,
           dm355evm, ds1672, ds2404, ep39xx, goldfish, imxdi, jz4740, lpc32xx,
           mc13xxx, mv, mxc, omap, pcap, pcf85063, pcf85363, ps3, sh,
           stmp3xxx, sun4v, tegra, wm831x, xgene.
      
         - Switch to rtc_time64_to_tm/rtc_tm_to_time64 for the driver that
           properly set the RTC range.
      
         - Use dev_get_drvdata instead of multiple indirections"
      
      * tag 'rtc-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (177 commits)
        rtc: snvs: Use __maybe_unused instead of #if CONFIG_PM_SLEEP
        rtc: imxdi: remove unused variable
        rtc: drop set_mms and set_mmss64
        rtc: pcap: convert to SPDX identifier
        rtc: pcap: use .set_time
        rtc: pcap: switch to rtc_time64_to_tm/rtc_tm_to_time64
        rtc: pcap: set range
        rtc: digicolor: convert to SPDX identifier
        rtc: digicolor: use .set_time
        rtc: digicolor: set range
        rtc: digicolor: fix possible race condition
        rtc: jz4740: convert to SPDX identifier
        rtc: jz4740: rework invalid time detection
        rtc: jz4740: use dev_pm_set_wake_irq() to simplify code
        rtc: jz4740: use .set_time
        rtc: jz4740: remove useless check
        rtc: jz4740: switch to rtc_time64_to_tm/rtc_tm_to_time64
        rtc: jz4740: set range
        rtc: 88pm860x: prevent use-after-free on device remove
        rtc: Use dev_get_drvdata()
        ...
      8e4ff713
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 45182e4e
      Linus Torvalds authored
      Pull i2c updates from Wolfram Sang:
      
       - API for late atomic transfers (e.g. to shut down via PMIC). We have a
         seperate callback now which is called under clearly defined
         conditions. In-kernel users are converted, too.
      
       - new driver for the AMD PCIe MP2 I2C controller
      
       - large refactoring for at91 and bcm-iproc (both gain slave support due
         to this)
      
       - and a good share of various driver improvements anf fixes
      
      * 'i2c/for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (57 commits)
        dt-bindings: i2c: riic: document r7s9210 support
        i2c: imx-lpi2c: Use __maybe_unused instead of #if CONFIG_PM_SLEEP
        i2c-piix4: Add Hygon Dhyana SMBus support
        i2c: core: apply 'is_suspended' check for SMBus, too
        i2c: core: ratelimit 'transfer when suspended' errors
        i2c: iproc: Change driver to use 'BIT' macro
        i2c: riic: Add Runtime PM support
        i2c: mux: demux-pinctrl: use struct_size() in devm_kzalloc()
        i2c: mux: pca954x: allow management of device idle state via sysfs
        i2c: mux: pca9541: remove support for unused platform data
        i2c: mux: pca954x: remove support for unused platform data
        dt-bindings: i2c: i2c-mtk: add support for MT8516
        i2c: axxia: use auto cmd for last message
        i2c: gpio: flag atomic capability if possible
        i2c: algo: bit: add flag to whitelist atomic transfers
        i2c: stu300: use xfer_atomic callback to bail out early
        i2c: ocores: enable atomic xfers
        i2c: ocores: refactor setup for polling
        i2c: tegra-bpmp: convert to use new atomic callbacks
        i2c: omap: Add the master_xfer_atomic hook
        ...
      45182e4e
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.2-1' of git://git.linux-nfs.org/projects/anna/linux-nfs · 06cbd26d
      Linus Torvalds authored
      Pull NFS client updates from Anna Schumaker:
       "Highlights include:
      
        Stable bugfixes:
         - Fall back to MDS if no deviceid is found rather than aborting   # v4.11+
         - NFS4: Fix v4.0 client state corruption when mount
      
        Features:
         - Much improved handling of soft mounts with NFS v4.0:
             - Reduce risk of false positive timeouts
             - Faster failover of reads and writes after a timeout
             - Added a "softerr" mount option to return ETIMEDOUT instead of
               EIO to the application after a timeout
         - Increase number of xprtrdma backchannel requests
         - Add additional xprtrdma tracepoints
         - Improved send completion batching for xprtrdma
      
        Other bugfixes and cleanups:
         - Return -EINVAL when NFS v4.2 is passed an invalid dedup mode
         - Reduce usage of GFP_ATOMIC pages in SUNRPC
         - Various minor NFS over RDMA cleanups and bugfixes
         - Use the correct container namespace for upcalls
         - Don't share superblocks between user namespaces
         - Various other container fixes
         - Make nfs_match_client() killable to prevent soft lockups
         - Don't mark all open state for recovery when handling recallable
           state revoked flag"
      
      * tag 'nfs-for-5.2-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (69 commits)
        SUNRPC: Rebalance a kref in auth_gss.c
        NFS: Fix a double unlock from nfs_match,get_client
        nfs: pass the correct prototype to read_cache_page
        NFSv4: don't mark all open state for recovery when handling recallable state revoked flag
        SUNRPC: Fix an error code in gss_alloc_msg()
        SUNRPC: task should be exit if encode return EKEYEXPIRED more times
        NFS4: Fix v4.0 client state corruption when mount
        PNFS fallback to MDS if no deviceid found
        NFS: make nfs_match_client killable
        lockd: Store the lockd client credential in struct nlm_host
        NFS: When mounting, don't share filesystems between different user namespaces
        NFS: Convert NFSv2 to use the container user namespace
        NFSv4: Convert the NFS client idmapper to use the container user namespace
        NFS: Convert NFSv3 to use the container user namespace
        SUNRPC: Use namespace of listening daemon in the client AUTH_GSS upcall
        SUNRPC: Use the client user namespace when encoding creds
        NFS: Store the credential of the mount process in the nfs_server
        SUNRPC: Cache cred of process creating the rpc_client
        xprtrdma: Remove stale comment
        xprtrdma: Update comments that reference ib_drain_qp
        ...
      06cbd26d
    • Mike Rapoport's avatar
      sparc64: simplify reduce_memory() function · f4d9a23d
      Mike Rapoport authored
      The reduce_memory() function clampls the available memory to a limit
      defined by the "mem=" command line parameter. It takes into account the
      amount of already reserved memory and excludes it from the limit
      calculations.
      
      Rather than traverse memblocks and remove them by hand, use
      memblock_reserved_size() to account the reserved memory and
      memblock_enforce_memory_limit() to clamp the available memory.
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f4d9a23d
    • Gustavo A. R. Silva's avatar
      sparc: use struct_size() in kzalloc() · bc0025b6
      Gustavo A. R. Silva authored
      One of the more common cases of allocation size calculations is finding the
      size of a structure that has a zero-sized array at the end, along with memory
      for some number of elements for that array. For example:
      
      struct foo {
          int stuff;
          void *entry[];
      };
      
      instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL);
      
      Instead of leaving these open-coded and prone to type mistakes, we can now
      use the new struct_size() helper:
      
      instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL);
      
      This code was detected with the help of Coccinelle.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc0025b6
    • Linus Torvalds's avatar
      Merge branch 'for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · abde77eb
      Linus Torvalds authored
      Pull cgroup updates from Tejun Heo:
       "This includes Roman's cgroup2 freezer implementation.
      
        It's a separate machanism from cgroup1 freezer. Instead of blocking
        user tasks in arbitrary uninterruptible sleeps, the new implementation
        extends jobctl stop - frozen tasks are trapped in jobctl stop until
        thawed and can be killed and ptraced. Lots of thanks to Oleg for
        sheperding the effort.
      
        Other than that, there are a few trivial changes"
      
      * 'for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cgroup: never call do_group_exit() with task->frozen bit set
        kernel: cgroup: fix misuse of %x
        cgroup: get rid of cgroup_freezer_frozen_exit()
        cgroup: prevent spurious transition into non-frozen state
        cgroup: Remove unused cgrp variable
        cgroup: document cgroup v2 freezer interface
        cgroup: add tracing points for cgroup v2 freezer
        cgroup: make TRACE_CGROUP_PATH irq-safe
        kselftests: cgroup: add freezer controller self-tests
        kselftests: cgroup: don't fail on cg_kill_all() error in cg_destroy()
        cgroup: cgroup v2 freezer
        cgroup: protect cgroup->nr_(dying_)descendants by css_set_lock
        cgroup: implement __cgroup_task_count() helper
        cgroup: rename freezer.c into legacy_freezer.c
        cgroup: remove extra cgroup_migrate_finish() call
      abde77eb
    • Linus Torvalds's avatar
      Merge branch 'for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq · 23c97060
      Linus Torvalds authored
      Pull workqueue updates from Tejun Heo:
       "Only three commits, of which two are trivial.
      
        The non-trivial chagne is Thomas's patch to switch workqueue from
        sched RCU to regular one. The use of sched RCU is mostly historic and
        doesn't really buy us anything noticeable"
      
      * 'for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
        workqueue: Use normal rcu
        kernel/workqueue: Document wq_worker_last_func() argument
        kernel/workqueue: Use __printf markup to silence compiler in function 'alloc_workqueue'
      23c97060