1. 12 Oct, 2019 18 commits
  2. 11 Oct, 2019 14 commits
  3. 10 Oct, 2019 8 commits
    • Benjamin Coddington's avatar
      SUNRPC: fix race to sk_err after xs_error_report · af84537d
      Benjamin Coddington authored
      Since commit 4f8943f8 ("SUNRPC: Replace direct task wakeups from
      softirq context") there has been a race to the value of the sk_err if both
      XPRT_SOCK_WAKE_ERROR and XPRT_SOCK_WAKE_DISCONNECT are set.  In that case,
      we may end up losing the sk_err value that existed when xs_error_report was
      called.
      
      Fix this by reverting to the previous behavior: instead of using SO_ERROR
      to retrieve the value at a later time (which might also return sk_err_soft),
      copy the sk_err value onto struct sock_xprt, and use that value to wake
      pending tasks.
      Signed-off-by: default avatarBenjamin Coddington <bcodding@redhat.com>
      Fixes: 4f8943f8 ("SUNRPC: Replace direct task wakeups from softirq context")
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      af84537d
    • Chuck Lever's avatar
      NFSv4: Fix leak of clp->cl_acceptor string · 1047ec86
      Chuck Lever authored
      Our client can issue multiple SETCLIENTID operations to the same
      server in some circumstances. Ensure that calls to
      nfs4_proc_setclientid() after the first one do not overwrite the
      previously allocated cl_acceptor string.
      
      unreferenced object 0xffff888461031800 (size 32):
        comm "mount.nfs", pid 2227, jiffies 4294822467 (age 1407.749s)
        hex dump (first 32 bytes):
          6e 66 73 40 6b 6c 69 6d 74 2e 69 62 2e 31 30 31  nfs@klimt.ib.101
          35 67 72 61 6e 67 65 72 2e 6e 65 74 00 00 00 00  5granger.net....
        backtrace:
          [<00000000ab820188>] __kmalloc+0x128/0x176
          [<00000000eeaf4ec8>] gss_stringify_acceptor+0xbd/0x1a7 [auth_rpcgss]
          [<00000000e85e3382>] nfs4_proc_setclientid+0x34e/0x46c [nfsv4]
          [<000000003d9cf1fa>] nfs40_discover_server_trunking+0x7a/0xed [nfsv4]
          [<00000000b81c3787>] nfs4_discover_server_trunking+0x81/0x244 [nfsv4]
          [<000000000801b55f>] nfs4_init_client+0x1b0/0x238 [nfsv4]
          [<00000000977daf7f>] nfs4_set_client+0xfe/0x14d [nfsv4]
          [<0000000053a68a2a>] nfs4_create_server+0x107/0x1db [nfsv4]
          [<0000000088262019>] nfs4_remote_mount+0x2c/0x59 [nfsv4]
          [<00000000e84a2fd0>] legacy_get_tree+0x2d/0x4c
          [<00000000797e947c>] vfs_get_tree+0x20/0xc7
          [<00000000ecabaaa8>] fc_mount+0xe/0x36
          [<00000000f15fafc2>] vfs_kern_mount+0x74/0x8d
          [<00000000a3ff4e26>] nfs_do_root_mount+0x8a/0xa3 [nfsv4]
          [<00000000d1c2b337>] nfs4_try_mount+0x58/0xad [nfsv4]
          [<000000004c9bddee>] nfs_fs_mount+0x820/0x869 [nfs]
      
      Fixes: f11b2a1c ("nfs4: copy acceptor name from context ... ")
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      1047ec86
    • Paul Burton's avatar
      MIPS: Disable Loongson MMI instructions for kernel build · 2f2b4fd6
      Paul Burton authored
      GCC 9.x automatically enables support for Loongson MMI instructions when
      using some -march= flags, and then errors out when -msoft-float is
      specified with:
      
        cc1: error: ‘-mloongson-mmi’ must be used with ‘-mhard-float’
      
      The kernel shouldn't be using these MMI instructions anyway, just as it
      doesn't use floating point instructions. Explicitly disable them in
      order to fix the build with GCC 9.x.
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Fixes: 3702bba5 ("MIPS: Loongson: Add GCC 4.4 support for Loongson2E")
      Fixes: 6f7a251a ("MIPS: Loongson: Add basic Loongson 2F support")
      Fixes: 5188129b ("MIPS: Loongson-3: Improve -march option and move it to Platform")
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
      Cc: stable@vger.kernel.org # v2.6.32+
      Cc: linux-mips@vger.kernel.org
      2f2b4fd6
    • Jiaxun Yang's avatar
      MIPS: elf_hwcap: Export userspace ASEs · 38dffe1e
      Jiaxun Yang authored
      A Golang developer reported MIPS hwcap isn't reflecting instructions
      that the processor actually supported so programs can't apply optimized
      code at runtime.
      
      Thus we export the ASEs that can be used in userspace programs.
      Reported-by: default avatarMeng Zhuo <mengzhuo1203@gmail.com>
      Signed-off-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
      Cc: linux-mips@vger.kernel.org
      Cc: Paul Burton <paul.burton@mips.com>
      Cc: <stable@vger.kernel.org> # 4.14+
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      38dffe1e
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.4-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 9e208aa0
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
       "A couple of small code cleanups and bug fixes for rounding errors,
        metadata logging errors, and an extra layer of safeguards against
        leaking memory contents.
      
         - Fix a rounding error in the fallocate code
      
         - Minor code cleanups
      
         - Make sure to zero memory buffers before formatting metadata blocks
      
         - Fix a few places where we forgot to log an inode metadata update
      
         - Remove broken error handling that tried to clean up after a failure
           but still got it wrong"
      
      * tag 'xfs-5.4-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: move local to extent inode logging into bmap helper
        xfs: remove broken error handling on failed attr sf to leaf change
        xfs: log the inode on directory sf to block format change
        xfs: assure zeroed memory buffers for certain kmem allocations
        xfs: removed unused error variable from xchk_refcountbt_rec
        xfs: remove unused flags arg from xfs_get_aghdr_buf()
        xfs: Fix tail rounding in xfs_alloc_file_space()
      9e208aa0
    • Xiubo Li's avatar
      nbd: fix possible sysfs duplicate warning · 86248810
      Xiubo Li authored
      1. nbd_put takes the mutex and drops nbd->ref to 0. It then does
      idr_remove and drops the mutex.
      
      2. nbd_genl_connect takes the mutex. idr_find/idr_for_each fails
      to find an existing device, so it does nbd_dev_add.
      
      3. just before the nbd_put could call nbd_dev_remove or not finished
      totally, but if nbd_dev_add try to add_disk, we can hit:
      
      debugfs: Directory 'nbd1' with parent 'block' already present!
      
      This patch will make sure all the disk add/remove stuff are done
      by holding the nbd_index_mutex lock.
      Reported-by: default avatarMike Christie <mchristi@redhat.com>
      Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
      Signed-off-by: default avatarXiubo Li <xiubli@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      86248810
    • Rob Herring's avatar
      xen: Stop abusing DT of_dma_configure API · ee7f5225
      Rob Herring authored
      As the removed comments say, these aren't DT based devices.
      of_dma_configure() is going to stop allowing a NULL DT node and calling
      it will no longer work.
      
      The comment is also now out of date as of commit 9ab91e7c ("arm64:
      default to the direct mapping in get_arch_dma_ops"). Direct mapping
      is now the default rather than dma_dummy_ops.
      
      According to Stefano and Oleksandr, the only other part needed is
      setting the DMA masks and there's no reason to restrict the masks to
      32-bits. So set the masks to 64 bits.
      
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: Julien Grall <julien.grall@arm.com>
      Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
      Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Stefano Stabellini <sstabellini@kernel.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: xen-devel@lists.xenproject.org
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      ee7f5225
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · fb20da6a
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "Fix build issues in arm/aes-ce"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: arm/aes-ce - add dependency on AES library
        crypto: arm/aes-ce - build for v8 architecture explicitly
      fb20da6a