1. 05 Aug, 2016 11 commits
  2. 04 Aug, 2016 29 commits
    • Linus Torvalds's avatar
      Merge tag 'nfsd-4.8' of git://linux-nfs.org/~bfields/linux · a71e3604
      Linus Torvalds authored
      Pull nfsd updates from Bruce Fields:
       "Highlights:
      
         - Trond made a change to the server's tcp logic that allows a fast
           client to better take advantage of high bandwidth networks, but may
           increase the risk that a single client could starve other clients;
           a new sunrpc.svc_rpc_per_connection_limit parameter should help
           mitigate this in the (hopefully unlikely) event this becomes a
           problem in practice.
      
         - Tom Haynes added a minimal flex-layout pnfs server, which is of no
           use in production for now--don't build it unless you're doing
           client testing or further server development"
      
      * tag 'nfsd-4.8' of git://linux-nfs.org/~bfields/linux: (32 commits)
        nfsd: remove some dead code in nfsd_create_locked()
        nfsd: drop unnecessary MAY_EXEC check from create
        nfsd: clean up bad-type check in nfsd_create_locked
        nfsd: remove unnecessary positive-dentry check
        nfsd: reorganize nfsd_create
        nfsd: check d_can_lookup in fh_verify of directories
        nfsd: remove redundant zero-length check from create
        nfsd: Make creates return EEXIST instead of EACCES
        SUNRPC: Detect immediate closure of accepted sockets
        SUNRPC: accept() may return sockets that are still in SYN_RECV
        nfsd: allow nfsd to advertise multiple layout types
        nfsd: Close race between nfsd4_release_lockowner and nfsd4_lock
        nfsd/blocklayout: Make sure calculate signature/designator length aligned
        xfs: abstract block export operations from nfsd layouts
        SUNRPC: Remove unused callback xpo_adjust_wspace()
        SUNRPC: Change TCP socket space reservation
        SUNRPC: Add a server side per-connection limit
        SUNRPC: Micro optimisation for svc_data_ready
        SUNRPC: Call the default socket callbacks instead of open coding
        SUNRPC: lock the socket while detaching it
        ...
      a71e3604
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · d58b0d98
      Linus Torvalds authored
      Pull more btrfs updates from Chris Mason:
       "This is part two of my btrfs pull, which is some cleanups and a batch
        of fixes.
      
        Most of the code here is from Jeff Mahoney, making the pointers we
        pass around internally more consistent and less confusing overall.  I
        noticed a small problem right before I sent this out yesterday, so I
        fixed it up and re-tested overnight"
      
      * 'for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (40 commits)
        Btrfs: fix __MAX_CSUM_ITEMS
        btrfs: btrfs_abort_transaction, drop root parameter
        btrfs: add btrfs_trans_handle->fs_info pointer
        btrfs: btrfs_relocate_chunk pass extent_root to btrfs_end_transaction
        btrfs: convert nodesize macros to static inlines
        btrfs: introduce BTRFS_MAX_ITEM_SIZE
        btrfs: cleanup, remove prototype for btrfs_find_root_ref
        btrfs: copy_to_sk drop unused root parameter
        btrfs: simpilify btrfs_subvol_inherit_props
        btrfs: tests, use BTRFS_FS_STATE_DUMMY_FS_INFO instead of dummy root
        btrfs: tests, require fs_info for root
        btrfs: tests, move initialization into tests/
        btrfs: btrfs_test_opt and friends should take a btrfs_fs_info
        btrfs: prefix fsid to all trace events
        btrfs: plumb fs_info into btrfs_work
        btrfs: remove obsolete part of comment in statfs
        btrfs: hide test-only member under ifdef
        btrfs: Ratelimit "no csum found" info message
        btrfs: Add ratelimit to btrfs printing
        Btrfs: fix unexpected balance crash due to BUG_ON
        ...
      d58b0d98
    • Linus Torvalds's avatar
      Merge tag 'upstream-4.8-rc1' of git://git.infradead.org/linux-ubifs · 3a303258
      Linus Torvalds authored
      Pull UBI/UBIFS updates from Richard Weinberger:
       "This contains mostly cleanups and minor improvements of UBI and UBIFS"
      
      * tag 'upstream-4.8-rc1' of git://git.infradead.org/linux-ubifs:
        ubi: Use bitmaps in Fastmap self-check code
        ubi: Be more paranoid while seaching for the most recent Fastmap
        ubi: Check whether the Fastmap anchor matches the super block
        ubi: Rework Fastmap attach base code
        ubi: Fix whitespace issue in count_fastmap_pebs()
        ubi: Introduce vol_ignored()
        ubi: Fix scan_fast() comment
        ubifs: switch_gc_head: Remove redondant sync of wbuf
        ubi: Make volume resize power cut aware
        ubi: Fix early logging
        ubi: gluebi: Fix double refcounting
        ubifs: Silence early error messages if MS_SILENT is set
        ubi: Fix race condition between ubi device creation and udev
        ubifs: Update comment for ubifs_errc
        ubi: Only read necessary size when reading the VID header
        ubifs: Make xattr structures static
        ubifs: Silence error output if MS_SILENT is set
      3a303258
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 9e0243db
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
       "Beside of various fixes this also contains patches to enable features
        such was Kcov, kmemleak and TRACE_IRQFLAGS_SUPPORT on UML"
      
      * 'for-linus-4.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common()
        um: Support kcov
        um: Enable TRACE_IRQFLAGS_SUPPORT
        um: Use asm-generic/irqflags.h
        um: Fix possible deadlock in sig_handler_common()
        um: Select HAVE_DEBUG_KMEMLEAK
        um: Setup physical memory in setup_arch()
        um: Eliminate null test after alloc_bootmem
      9e0243db
    • Linus Torvalds's avatar
      Merge branch 'parisc-4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · b067c904
      Linus Torvalds authored
      Pull parisc updates from Helge Deller:
      
       - added an optimized hash implementation for parisc (George Spelvin)
      
       - C99 style cleanups in iomap.c (Amitoj Kaur Chawla)
      
       - added breaks to switch statement in PDC function (noticed by Dan
         Carpenter)
      
      * 'parisc-4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Change structure intialisation to C99 style in iomap.c
        parisc: Add break statements to pdc_pat_io_pci_cfg_read()
        parisc: Add <asm/hash.h>
      b067c904
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 8e7106a6
      Linus Torvalds authored
      Pull m68knommu updates from Greg Ungerer:
       "This series is all about Nicolas flat format support for MMU systems.
      
        Traditional m68k no-MMU flat format binaries can now be run on m68k
        MMU enabled systems too.  The series includes some nice cleanups of
        the binfmt_flat code and converts it to using proper user space
        accessor functions.
      
        With all this in place you can boot and run a complete no-MMU flat
        format based user space on an MMU enabled system"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68k: enable binfmt_flat on systems with an MMU
        binfmt_flat: allow compressed flat binary format to work on MMU systems
        binfmt_flat: add MMU-specific support
        binfmt_flat: update libraries' data segment pointer with userspace accessors
        binfmt_flat: use clear_user() rather than memset() to clear .bss
        binfmt_flat: use proper user space accessors with old relocs code
        binfmt_flat: use proper user space accessors with relocs processing code
        binfmt_flat: clean up create_flat_tables() and stack accesses
        binfmt_flat: use generic transfer_args_to_stack()
        elf_fdpic_transfer_args_to_stack(): make it generic
        binfmt_flat: prevent kernel dammage from corrupted executable headers
        binfmt_flat: convert printk invocations to their modern form
        binfmt_flat: assorted cleanups
        m68k: use same start_thread() on MMU and no-MMU
        m68k: fix file path comment
        m68k: fix bFLT executable running on MMU enabled systems
      8e7106a6
    • Dan Carpenter's avatar
      nfsd: remove some dead code in nfsd_create_locked() · 2b118859
      Dan Carpenter authored
      We changed this around in f135af1041f ('nfsd: reorganize nfsd_create')
      so "dchild" can't be an error pointer any more.  Also, dchild can't be
      NULL here (and dput would already handle this even if it was).
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      2b118859
    • J. Bruce Fields's avatar
      nfsd: drop unnecessary MAY_EXEC check from create · fa08139d
      J. Bruce Fields authored
      We need an fh_verify to make sure we at least have a dentry, but actual
      permission checks happen later.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      fa08139d
    • J. Bruce Fields's avatar
      nfsd: clean up bad-type check in nfsd_create_locked · 71423274
      J. Bruce Fields authored
      Minor cleanup, no change in behavior.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      71423274
    • J. Bruce Fields's avatar
      nfsd: remove unnecessary positive-dentry check · d03d9fe4
      J. Bruce Fields authored
      vfs_{create,mkdir,mknod} each begin with a call to may_create(), which
      returns EEXIST if the object already exists.
      
      This check is therefore unnecessary.
      
      (In the NFSv2 case, nfsd_proc_create also has such a check.  Contrary to
      RFC 1094, our code seems to believe that a CREATE of an existing file
      should succeed.  I'm leaving that behavior alone.)
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      d03d9fe4
    • J. Bruce Fields's avatar
      nfsd: reorganize nfsd_create · b44061d0
      J. Bruce Fields authored
      There's some odd logic in nfsd_create() that allows it to be called with
      the parent directory either locked or unlocked.  The only already-locked
      caller is NFSv2's nfsd_proc_create().  It's less confusing to split out
      the unlocked case into a separate function which the NFSv2 code can call
      directly.
      
      Also fix some comments while we're here.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      b44061d0
    • J. Bruce Fields's avatar
      nfsd: check d_can_lookup in fh_verify of directories · e75b23f9
      J. Bruce Fields authored
      Create and other nfsd ops generally assume we can call lookup_one_len on
      inodes with S_IFDIR set.  Al says that this assumption isn't true in
      general, though it should be for the filesystem objects nfsd sees.
      
      Add a check just to make sure our assumption isn't violated.
      
      Remove a couple checks for i_op->lookup in create code.
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      e75b23f9
    • J. Bruce Fields's avatar
      nfsd: remove redundant zero-length check from create · 12391d07
      J. Bruce Fields authored
      lookup_one_len already has this check.
      
      The only effect of this patch is to return access instead of perm in the
      0-length-filename case.  I actually prefer nfserr_perm (or _inval?), but
      I doubt anyone cares.
      
      The isdotent check seems redundant too, but I worry that some client
      might actually care about that strange nfserr_exist error.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      12391d07
    • Oleg Drokin's avatar
      nfsd: Make creates return EEXIST instead of EACCES · 7eed34f1
      Oleg Drokin authored
      When doing a create (mkdir/mknod) on a name, it's worth
      checking the name exists first before returning EACCES in case
      the directory is not writeable by the user.
      This makes return values on the client more consistent
      regardless of whenever the entry there is cached in the local
      cache or not.
      Another positive side effect is certain programs only expect
      EEXIST in that case even despite POSIX allowing any valid
      error to be returned.
      Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      7eed34f1
    • Doug Ledford's avatar
      7f1d25b4
    • Moni Shoua's avatar
      Soft RoCE driver · 8700e3e7
      Moni Shoua authored
      Soft RoCE (RXE) - The software RoCE driver
      
      ib_rxe implements the RDMA transport and registers to the RDMA core
      device as a kernel verbs provider. It also implements the packet IO
      layer. On the other hand ib_rxe registers to the Linux netdev stack
      as a udp encapsulating protocol, in that case RDMA, for sending and
      receiving packets over any Ethernet device.  This yields a RDMA
      transport over the UDP/Ethernet network layer forming a RoCEv2
      compatible device.
      
      The configuration procedure of the Soft RoCE drivers requires
      binding to any existing Ethernet network device. This is done with
      /sys interface.
      
      A userspace Soft RoCE library (librxe) provides user applications
      the ability to run with Soft RoCE devices.  The use of rxe verbs ins
      user space requires the inclusion of librxe as a device specifics
      plug-in to libibverbs. librxe is packaged separately.
      
      Architecture:
      
           +-----------------------------------------------------------+
           |                          Application                      |
           +-----------------------------------------------------------+
                                  +-----------------------------------+
                                  |             libibverbs            |
      User                        +-----------------------------------+
                                  +----------------+ +----------------+
                                  | librxe         | | HW RoCE lib    |
                                  +----------------+ +----------------+
      +---------------------------------------------------------------+
           +--------------+                           +------------+
           | Sockets      |                           | RDMA ULP   |
           +--------------+                           +------------+
           +--------------+                  +---------------------+
           | TCP/IP       |                  | ib_core             |
           +--------------+                  +---------------------+
                                   +------------+ +----------------+
      Kernel                       | ib_rxe     | | HW RoCE driver |
                                   +------------+ +----------------+
           +------------------------------------+
           | NIC driver                         |
           +------------------------------------+
      
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           +-----------------------------------------------------------+
           |                          Application                      |
           +-----------------------------------------------------------+
                                  +-----------------------------------+
                                  |             libibverbs            |
      User                        +-----------------------------------+
                                  +----------------+ +----------------+
                                  | librxe         | | HW RoCE lib    |
                                  +----------------+ +----------------+
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           +--------------+                           +------------+
           | Sockets      |                           | RDMA ULP   |
           +--------------+                           +------------+
           +--------------+                  +---------------------+
           | TCP/IP       |                  | ib_core             |
           +--------------+                  +---------------------+
                                   +------------+ +----------------+
      Kernel                       | ib_rxe     | | HW RoCE driver |
                                   +------------+ +----------------+
           +------------------------------------+
           | NIC driver                         |
           +------------------------------------+
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Soft RoCE resources:
      
      [1[ https://github.com/SoftRoCE/librxe-dev librxe - source code in
      Github
      [2] https://github.com/SoftRoCE/rxe-dev/wiki/rxe-dev:-Home - Soft RoCE
      Wiki page
      [3] https://github.com/SoftRoCE/librxe-dev - Soft RoCE userspace library
      Signed-off-by: default avatarKamal Heib <kamalh@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarMoni Shoua <monis@mellanox.com>
      Reviewed-by: default avatarHaggai Eran <haggaie@mellanox.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      8700e3e7
    • Linus Torvalds's avatar
      Merge tag 'media/v4.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · c1ece767
      Linus Torvalds authored
      Pull media DocBook removal and some fixups from Mauro Carvalho Chehab:
      
        - removal of the media DocBook (since it's all in Sphinx now)
      
        - videobuf2: Fix an allocation regression
      
        - a few fixes related to the CEC drivers
      
      * tag 'media/v4.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        [media] cec: fix off-by-one memset
        [media] staging: add MEDIA_SUPPORT dependency
        [media] vivid: don't handle CEC_MSG_SET_STREAM_PATH
        [media] media: adv7180: Fix broken interrupt register access
        [media] vb2: Fix allocation size of dma_parms
        [media] vim2m: copy the other colorspace-related fields as well
        [media] adv7511: fix VIC autodetect
        doc-rst: Remove the media docbook
      c1ece767
    • Linus Torvalds's avatar
      Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · fb1b83d3
      Linus Torvalds authored
      Pull module updates from Rusty Russell:
       "The only interesting thing here is Jessica's patch to add
        ro_after_init support to modules.  The rest are all trivia"
      
      * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        extable.h: add stddef.h so "NULL" definition is not implicit
        modules: add ro_after_init support
        jump_label: disable preemption around __module_text_address().
        exceptions: fork exception table content from module.h into extable.h
        modules: Add kernel parameter to blacklist modules
        module: Do a WARN_ON_ONCE() for assert module mutex not held
        Documentation/module-signing.txt: Note need for version info if reusing a key
        module: Invalidate signatures on force-loaded modules
        module: Issue warnings when tainting kernel
        module: fix redundant test.
        module: fix noreturn attribute for __module_put_and_exit()
      fb1b83d3
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · d597690e
      Linus Torvalds authored
      Merge even more updates from Andrew Morton:
      
       - dma-mapping API cleanup
      
       - a few cleanups and misc things
      
       - use jump labels in dynamic-debug
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        dynamic_debug: add jump label support
        jump_label: remove bug.h, atomic.h dependencies for HAVE_JUMP_LABEL
        arm: jump label may reference text in __exit
        tile: support static_key usage in non-module __exit sections
        sparc: support static_key usage in non-module __exit sections
        powerpc: add explicit #include <asm/asm-compat.h> for jump label
        drivers/media/dvb-frontends/cxd2841er.c: avoid misleading gcc warning
        MAINTAINERS: update email and list of Samsung HW driver maintainers
        block: remove BLK_DEV_DAX config option
        samples/kretprobe: fix the wrong type
        samples/kretprobe: convert the printk to pr_info/pr_err
        samples/jprobe: convert the printk to pr_info/pr_err
        samples/kprobe: convert the printk to pr_info/pr_err
        dma-mapping: use unsigned long for dma_attrs
        media: mtk-vcodec: remove unused dma_attrs
        include/linux/bitmap.h: cleanup
        tree-wide: replace config_enabled() with IS_ENABLED()
        drivers/fpga/Kconfig: fix build failure
      d597690e
    • Jason Baron's avatar
      dynamic_debug: add jump label support · 9049fc74
      Jason Baron authored
      Although dynamic debug is often only used for debug builds, sometimes
      its enabled for production builds as well.  Minimize its impact by using
      jump labels.  This reduces the text section by 7000+ bytes in the kernel
      image below.  It does increase data, but this should only be referenced
      when changing the direction of the branches, and hence usually not in
      cache.
      
           text     data     bss       dec     hex  filename
        8194852  4879776  925696  14000324  d5a0c4  vmlinux.pre
        8187337  4960224  925696  14073257  d6bda9  vmlinux.post
      
      Link: http://lkml.kernel.org/r/d165b465e8c89bc582d973758d40be44c33f018b.1467837322.git.jbaron@akamai.comSigned-off-by: default avatarJason Baron <jbaron@akamai.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9049fc74
    • Jason Baron's avatar
      jump_label: remove bug.h, atomic.h dependencies for HAVE_JUMP_LABEL · 1f69bf9c
      Jason Baron authored
      The current jump_label.h includes bug.h for things such as WARN_ON().
      This makes the header problematic for inclusion by kernel.h or any
      headers that kernel.h includes, since bug.h includes kernel.h (circular
      dependency).  The inclusion of atomic.h is similarly problematic.  Thus,
      this should make jump_label.h 'includable' from most places.
      
      Link: http://lkml.kernel.org/r/7060ce35ddd0d20b33bf170685e6b0fab816bdf2.1467837322.git.jbaron@akamai.comSigned-off-by: default avatarJason Baron <jbaron@akamai.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1f69bf9c
    • Jason Baron's avatar
      arm: jump label may reference text in __exit · ddb45306
      Jason Baron authored
      The jump table can reference text found in an __exit section.  Thus,
      instead of discarding it at build time, include EXIT_TEXT as part of
      __init and it will be released when the system boots.
      
      Link: http://lkml.kernel.org/r/60284113bb759121e8ae3e99af1535647e52123f.1467837322.git.jbaron@akamai.comSigned-off-by: default avatarJason Baron <jbaron@akamai.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ddb45306
    • Chris Metcalf's avatar
      tile: support static_key usage in non-module __exit sections · c14b4bcf
      Chris Metcalf authored
      Previously, all the __exit sections were just dropped by the link phase.
      However, if there are static_key (jump label) constructs in __exit
      sections that are not modules, the link fails with the message:
      
         `.exit.text' referenced in section `__jump_table' of xxx.o:
         defined in discarded section `.exit.text' of xxx.o
      
      Support this usage by keeping the .exit.text sections in the final image
      if JUMP_LABEL is defined, then discarding them once initialization is
      complete.
      
      Link: http://lkml.kernel.org/r/bfd7c107c610c30e992868ebfe2a5d796a097464.1467837322.git.jbaron@akamai.comSigned-off-by: default avatarJason Baron <jbaron@akamai.com>
      Signed-off-by: default avatarChris Metcalf <cmetcalf@mellanox.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c14b4bcf
    • Jason Baron's avatar
      sparc: support static_key usage in non-module __exit sections · 10d7227b
      Jason Baron authored
      The jump table can reference text found in an __exit section.  Thus,
      instead of discarding it at build/link time, include EXIT_TEXT as part
      of __init and release it at system boot time.
      
      Without this patch the link fails with:
      
          `.exit.text' referenced in section `__jump_table' of xxx.o:
          defined in discarded section `.exit.text' of xxx.o
      
      Link: http://lkml.kernel.org/r/d822da427ab07a02a394602eca687104ff682f83.1467837322.git.jbaron@akamai.comSigned-off-by: default avatarJason Baron <jbaron@akamai.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      10d7227b
    • Jason Baron's avatar
      powerpc: add explicit #include <asm/asm-compat.h> for jump label · 5411fd7f
      Jason Baron authored
      The stringify_in_c() macro may not be included. Make the dependency
      explicit.
      
      Link: http://lkml.kernel.org/r/564720c5328edd53c9d56db325be7215440eec3e.1467837322.git.jbaron@akamai.comSigned-off-by: default avatarJason Baron <jbaron@akamai.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Joe Perches <joe@perches.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Chris Metcalf <cmetcalf@mellanox.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5411fd7f
    • Arnd Bergmann's avatar
      drivers/media/dvb-frontends/cxd2841er.c: avoid misleading gcc warning · bb9bd878
      Arnd Bergmann authored
      The addition of jump label support in dynamic_debug caused an unexpected
      warning in exactly one file in the kernel:
      
        drivers/media/dvb-frontends/cxd2841er.c: In function 'cxd2841er_tune_tc':
        include/linux/dynamic_debug.h:134:3: error: 'carrier_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           __dynamic_dev_dbg(&descriptor, dev, fmt, \
           ^~~~~~~~~~~~~~~~~
        drivers/media/dvb-frontends/cxd2841er.c:3177:11: note: 'carrier_offset' was declared here
          int ret, carrier_offset;
                   ^~~~~~~~~~~~~~
      
      The problem seems to be that the compiler gets confused by the extra
      conditionals in static_branch_unlikely, to the point where it can no
      longer keep track of which branches have already been taken, and it
      doesn't realize that this variable is now always initialized when it
      gets used.
      
      I have done lots of randconfig kernel builds and could not find any
      other file with this behavior, so I assume it's a rare enough glitch
      that we don't need to change the jump label support but instead just
      work around the warning in the driver.
      
      To achieve that, I'm moving the check for the return value into the
      switch() statement, which is an obvious transformation, but is enough to
      un-confuse the compiler here.  The resulting code is not as nice to
      read, but at least we retain the behavior of warning if it gets changed
      to actually access an uninitialized carrier offset value in the future.
      
      Link: http://lkml.kernel.org/r/20160713204342.1221511-1-arnd@arndb.deSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarAbylay Ospan <aospan@netup.ru>
      Cc: Sergey Kozlov <serjk@netup.ru>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Jason Baron <jbaron@akamai.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bb9bd878
    • Kamil Debski's avatar
      MAINTAINERS: update email and list of Samsung HW driver maintainers · 774e0362
      Kamil Debski authored
      Change my email address in the MAINTAINERS file.
      Add new maintainers of selected Samsung HW drivers.
      
      Link: http://lkml.kernel.org/r/1470060703-20423-1-git-send-email-k.debski@samsung.comSigned-off-by: default avatarKamil Debski <k.debski@samsung.com>
      Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
      Cc: Kamil Debski <kamil@wypas.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      774e0362
    • Ross Zwisler's avatar
      block: remove BLK_DEV_DAX config option · 99a01cdf
      Ross Zwisler authored
      The functionality for block device DAX was already removed with commit
      acc93d30 ("Revert "block: enable dax for raw block devices"")
      
      However, we still had a config option hanging around that was always
      disabled because it depended on CONFIG_BROKEN.  This config option was
      introduced in commit 03cdadb0 ("block: disable block device DAX by
      default")
      
      This change reverts that commit, removing the dead config option.
      
      Link: http://lkml.kernel.org/r/20160729182314.6368-1-ross.zwisler@linux.intel.comSigned-off-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Acked-by: default avatarDan Williams <dan.j.williams@intel.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      99a01cdf
    • Huang Shijie's avatar
      samples/kretprobe: fix the wrong type · 57c24b21
      Huang Shijie authored
      The regs_return_value() returns "unsigned long" or "long" value.  But the
      retval is int type now, it may cause overflow, the log may becomes:
      
          [ 2911.078869] do_brk returned -2003877888 and took 4620 ns to execute
      
      This patch converts the retval to "unsigned long" type, and fixes the
      overflow issue.
      
      Link: http://lkml.kernel.org/r/1464143083-3877-4-git-send-email-shijie.huang@arm.comSigned-off-by: default avatarHuang Shijie <shijie.huang@arm.com>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Steve Capper <steve.capper@arm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      57c24b21