1. 27 Apr, 2018 25 commits
  2. 23 Apr, 2018 5 commits
    • Parav Pandit's avatar
      IB/core: Fix deleting default GIDs when changing mac adddress · dc5640f2
      Parav Pandit authored
      Before [1], When MAC address of the netdevice is changed, default GID is
      supposed to get deleted and added back which affects the node and/or port
      GUID in below sequence.
      
      netdevice_event()
      -> NETDEV_CHANGEADDR
         default_del_cmd()
            del_netdev_default_ips()
                bond_delete_netdev_default_gids()
                    ib_cache_gid_set_default_gid()
                        ib_cache_gid_del()
         add_cmd()
         [..]
      
      However, ib_cache_gid_del() was not getting invoked in non bonding
      scenarios because event_ndev and rdma_ndev are same.
      Therefore, fix such condition to ignore checking upper device when event
      ndev and rdma_dev are same; similar to bond_set_netdev_default_gids().
      
      Which this fix ib_cache_gid_del() is invoked correctly; however
      ib_cache_gid_del() doesn't find the default GID for deletion because
      find_gid() was given default_gid = false with
      GID_ATTR_FIND_MASK_DEFAULT set.
      But it was getting overwritten by ib_cache_gid_set_default_gid() later
      on as part of add_cmd().
      Therefore, mac address change used to work for default GID.
      
      With refactor series [1], this incorrect behavior is detected.
      
      Therefore,
      when deleting default GID, set default_gid and set MASK flag.
      when deleting IP based GID, clear default_gid and set MASK flag.
      
      [1] https://patchwork.kernel.org/patch/10319151/
      
      Fixes: 238fdf48 ("IB/core: Add RoCE table bonding support")
      Fixes: 598ff6ba ("IB/core: Refactor GID modify code for RoCE")
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      dc5640f2
    • Parav Pandit's avatar
      IB/core: Fix to avoid deleting IPv6 look alike default GIDs · 22c01ee4
      Parav Pandit authored
      When IPv6 link local address is removed, if it matches with the default
      GID, default GID(s)s gets removed which may not be a desired behavior.
      This behavior is introduced by refactor work in Fixes tag.
      
      When IPv6 link address is removed, removing its equivalent RoCEv2 GID
      which exactly matches with default RoCEv2 GID, is right thing to do.
      However achieving it correctly requires lot more changes, likely in
      roce_gid_mgmt.c and core/cache.c. This should be done as independent
      patch.
      
      Therefore, this patch preserves behavior of not deleteing default GIDs.
      This is done by providing explicit hint to consider default GID property
      using mask and default_gid; similar to add_gid().
      
      Fixes: 598ff6ba ("IB/core: Refactor GID modify code for RoCE")
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      22c01ee4
    • Parav Pandit's avatar
      IB/core: Don't allow default GID addition at non reseved slots · a66ed149
      Parav Pandit authored
      Default GIDs are marked reserved at the start of the GID table at index
      0 and 1 by gid_table_reserve_default().  Currently when default GID is
      requested, it can still allocates an empty slot which was not marked as
      RESERVED for default GID, which is incorrect.
      
      At least in current code flow of roce_gid_mgmt.c, in theory we can
      still request to allocate more than one/two default GIDs depending
      on how upper devices are setup.
      
      Therefore, it is better for cache layer to only allow our reserved slots
      to be used by default GID allocation requests.
      
      Fixes: 598ff6ba ("IB/core: Refactor GID modify code for RoCE")
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      a66ed149
    • Jason Gunthorpe's avatar
      uapi: Fix SPDX tags for files referring to the 'OpenIB.org' license · d50e14ab
      Jason Gunthorpe authored
      Based on discussion with Kate Stewart this license is not a
      BSD-2-Clause, but is now formally identified as Linux-OpenIB
      by SPDX.
      
      The key difference between the licenses is in the 'warranty'
      paragraph.
      
      if_infiniband.h refers to the 'OpenIB.org' license, but
      does not include the text, instead it links to an obsolete
      web site that contains a license that matches the BSD-2-Clause
      SPX. There is no 'three clause' version of the OpenIB.org
      license.
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      d50e14ab
    • Roland Dreier's avatar
      RDMA/ucma: Allow resolving address w/o specifying source address · 09abfe7b
      Roland Dreier authored
      The RDMA CM will select a source device and address by consulting
      the routing table if no source address is passed into
      rdma_resolve_address().  Userspace will ask for this by passing an
      all-zero source address in the RESOLVE_IP command.  Unfortunately
      the new check for non-zero address size rejects this with EINVAL,
      which breaks valid userspace applications.
      
      Fix this by explicitly allowing a zero address family for the source.
      
      Fixes: 2975d5de ("RDMA/ucma: Check AF family prior resolving address")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      09abfe7b
  3. 20 Apr, 2018 1 commit
  4. 18 Apr, 2018 2 commits
    • Geert Uytterhoeven's avatar
      IB/uverbs: Add missing braces in anonymous union initializers · e33514f2
      Geert Uytterhoeven authored
      With gcc-4.1.2:
      
          drivers/infiniband/core/uverbs_std_types_flow_action.c:366: error: unknown field ‘ptr’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:367: error: unknown field ‘type’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:367: warning: missing braces around initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:367: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].<anonymous>.<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: error: unknown field ‘min_len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: error: unknown field ‘len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:368: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:369: error: unknown field ‘flags’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:369: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:369: warning: (near initialization for ‘uverbs_flow_action_esp_keymat[0].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:376: error: unknown field ‘ptr’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:377: error: unknown field ‘type’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:377: warning: missing braces around initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:377: warning: (near initialization for ‘uverbs_flow_action_esp_replay[0].<anonymous>.<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:379: error: unknown field ‘len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:379: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:379: warning: (near initialization for ‘uverbs_flow_action_esp_replay[0].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:383: error: unknown field ‘ptr’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:384: error: unknown field ‘type’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: error: unknown field ‘min_len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: (near initialization for ‘uverbs_flow_action_esp_replay[1].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: error: unknown field ‘len’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:385: warning: (near initialization for ‘uverbs_flow_action_esp_replay[1].<anonymous>’)
          drivers/infiniband/core/uverbs_std_types_flow_action.c:386: error: unknown field ‘flags’ specified in initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:386: warning: excess elements in union initializer
          drivers/infiniband/core/uverbs_std_types_flow_action.c:386: warning: (near initialization for ‘uverbs_flow_action_esp_replay[1].<anonymous>’)
      
      Add the missing braces to fix this.
      
      Fixes: 2eb9beae ("IB/uverbs: Add flow_action create and destroy verbs")
      Fixes: 7d12f8d5 ("IB/uverbs: Add modify ESP flow_action")
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      e33514f2
    • Randy Dunlap's avatar
      infiniband: mlx5: fix build errors when INFINIBAND_USER_ACCESS=m · b3fe6c62
      Randy Dunlap authored
      Fix build errors when INFINIBAND_USER_ACCESS=m and MLX5_INFINIBAND=y.
      The build error occurs when the mlx5 driver code attempts to use
      USER_ACCESS interfaces, which are built as a loadable module.
      
      Fixes these build errors:
      
      drivers/infiniband/hw/mlx5/main.o: In function `populate_specs_root':
      ../drivers/infiniband/hw/mlx5/main.c:4982: undefined reference to `uverbs_default_get_objects'
      ../drivers/infiniband/hw/mlx5/main.c:4994: undefined reference to `uverbs_alloc_spec_tree'
      drivers/infiniband/hw/mlx5/main.o: In function `depopulate_specs_root':
      ../drivers/infiniband/hw/mlx5/main.c:5001: undefined reference to `uverbs_free_spec_tree'
      
      Build-tested with multiple config combinations.
      
      Fixes: 8c84660b ("IB/mlx5: Initialize the parsing tree root without the help of uverbs")
      Cc: stable@vger.kernel.org # reported against 4.16
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      b3fe6c62
  5. 16 Apr, 2018 7 commits
    • Zhu Yanjun's avatar
      IB/mlx5: remove duplicate header file · 25d0e2db
      Zhu Yanjun authored
      The header file fs_helpers.h is included twice. So it should be removed.
      
      Fixes: 802c2125 ("IB/mlx5: Add IPsec support for egress and ingress")
      CC: Srinivas Eeda <srinivas.eeda@oracle.com>
      CC: Junxiao Bi <junxiao.bi@oracle.com>
      Signed-off-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      Acked-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      25d0e2db
    • Shamir Rabinovitch's avatar
      RDMA/ucma: ucma_context reference leak in error path · ef95a90a
      Shamir Rabinovitch authored
      Validating input parameters should be done before getting the cm_id
      otherwise it can leak a cm_id reference.
      
      Fixes: 6a21dfc0 ("RDMA/ucma: Limit possible option size")
      Signed-off-by: default avatarShamir Rabinovitch <shamir.rabinovitch@oracle.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      ef95a90a
    • Linus Torvalds's avatar
      Linux 4.17-rc1 · 60cc43fc
      Linus Torvalds authored
      60cc43fc
    • Linus Torvalds's avatar
      Merge tag 'for-4.17-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · e37563bb
      Linus Torvalds authored
      Pull more btrfs updates from David Sterba:
       "We have queued a few more fixes (error handling, log replay,
        softlockup) and the rest is SPDX updates that touche almost all files
        so the diffstat is long"
      
      * tag 'for-4.17-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: Only check first key for committed tree blocks
        btrfs: add SPDX header to Kconfig
        btrfs: replace GPL boilerplate by SPDX -- sources
        btrfs: replace GPL boilerplate by SPDX -- headers
        Btrfs: fix loss of prealloc extents past i_size after fsync log replay
        Btrfs: clean up resources during umount after trans is aborted
        btrfs: Fix possible softlock on single core machines
        Btrfs: bail out on error during replay_dir_deletes
        Btrfs: fix NULL pointer dereference in log_dir_items
      e37563bb
    • Linus Torvalds's avatar
      Merge tag '4.17-rc1SMB3-Fixes' of git://git.samba.org/sfrench/cifs-2.6 · 09c9b0ea
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "SMB3 fixes, a few for stable, and some important cleanup work from
        Ronnie of the smb3 transport code"
      
      * tag '4.17-rc1SMB3-Fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: change validate_buf to validate_iov
        cifs: remove rfc1002 hardcoded constants from cifs_discard_remaining_data()
        cifs: Change SMB2_open to return an iov for the error parameter
        cifs: add resp_buf_size to the mid_q_entry structure
        smb3.11: replace a 4 with server->vals->header_preamble_size
        cifs: replace a 4 with server->vals->header_preamble_size
        cifs: add pdu_size to the TCP_Server_Info structure
        SMB311: Improve checking of negotiate security contexts
        SMB3: Fix length checking of SMB3.11 negotiate request
        CIFS: add ONCE flag for cifs_dbg type
        cifs: Use ULL suffix for 64-bit constant
        SMB3: Log at least once if tree connect fails during reconnect
        cifs: smb2pdu: Fix potential NULL pointer dereference
      09c9b0ea
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · f0d98d85
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a set of minor (and safe changes) that didn't make the initial
        pull request plus some bug fixes.
      
        The status handling code is actually a running regression from the
        previous merge window which had an incomplete fix (now reverted) and
        most of the remaining bug fixes are for problems older than the
        current merge window"
      
      [ Side note: this merge also takes the base kernel git repository to 6+
        million objects for the first time. Technically we hit it a couple of
        merges ago already if you count all the tag objects, but now it
        reaches 6M+ objects reachable from HEAD.
      
        I was joking around that that's when I should switch to 5.0, because
        3.0 happened at the 2M mark, and 4.0 happened at 4M objects. But
        probably not, even if numerology is about as good a reason as any.
      
                                                                    - Linus ]
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: devinfo: Add Microsoft iSCSI target to 1024 sector blacklist
        scsi: cxgb4i: silence overflow warning in t4_uld_rx_handler()
        scsi: dpt_i2o: Use after free in I2ORESETCMD ioctl
        scsi: core: Make scsi_result_to_blk_status() recognize CONDITION MET
        scsi: core: Rename __scsi_error_from_host_byte() into scsi_result_to_blk_status()
        Revert "scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()"
        scsi: aacraid: Insure command thread is not recursively stopped
        scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION
        scsi: qla2xxx: correctly shift host byte
        scsi: qla2xxx: Fix race condition between iocb timeout and initialisation
        scsi: qla2xxx: Avoid double completion of abort command
        scsi: qla2xxx: Fix small memory leak in qla2x00_probe_one on probe failure
        scsi: scsi_dh: Don't look for NULL devices handlers by name
        scsi: core: remove redundant assignment to shost->use_blk_mq
      f0d98d85
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · ca71b3ba
      Linus Torvalds authored
      Pull more Kbuild updates from Masahiro Yamada:
      
       - pass HOSTLDFLAGS when compiling single .c host programs
      
       - build genksyms lexer and parser files instead of using shipped
         versions
      
       - rename *-asn1.[ch] to *.asn1.[ch] for suffix consistency
      
       - let the top .gitignore globally ignore artifacts generated by flex,
         bison, and asn1_compiler
      
       - let the top Makefile globally clean artifacts generated by flex,
         bison, and asn1_compiler
      
       - use safer .SECONDARY marker instead of .PRECIOUS to prevent
         intermediate files from being removed
      
       - support -fmacro-prefix-map option to make __FILE__ a relative path
      
       - fix # escaping to prepare for the future GNU Make release
      
       - clean up deb-pkg by using debian tools instead of handrolled
         source/changes generation
      
       - improve rpm-pkg portability by supporting kernel-install as a
         fallback of new-kernel-pkg
      
       - extend Kconfig listnewconfig target to provide more information
      
      * tag 'kbuild-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kconfig: extend output of 'listnewconfig'
        kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg
        Kbuild: fix # escaping in .cmd files for future Make
        kbuild: deb-pkg: split generating packaging and build
        kbuild: use -fmacro-prefix-map to make __FILE__ a relative path
        kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers
        kbuild: rename *-asn1.[ch] to *.asn1.[ch]
        kbuild: clean up *-asn1.[ch] patterns from top-level Makefile
        .gitignore: move *-asn1.[ch] patterns to the top-level .gitignore
        kbuild: add %.dtb.S and %.dtb to 'targets' automatically
        kbuild: add %.lex.c and %.tab.[ch] to 'targets' automatically
        genksyms: generate lexer and parser during build instead of shipping
        kbuild: clean up *.lex.c and *.tab.[ch] patterns from top-level Makefile
        .gitignore: move *.lex.c *.tab.[ch] patterns to the top-level .gitignore
        kbuild: use HOSTLDFLAGS for single .c executables
      ca71b3ba