1. 13 Sep, 2017 8 commits
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · cc4238bd
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "A tiny update: one patch corrects a Kconfig problem with the shift of
        the SAS SMP code to BSG and the other removes a vestige of user space
        target mode"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: scsi_transport_sas: select BLK_DEV_BSGLIB
        scsi: Remove Scsi_Host.uspace_req_q
      cc4238bd
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 80a0d644
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Small collection of fixes that would be nice to have in -rc1. This
        contains:
      
         - NVMe pull request form Christoph, mostly with fixes for nvme-pci,
           host memory buffer in particular.
      
         - Error handling fixup for cgwb_create(), in case allocation of 'wb'
           fails. From Christophe Jaillet.
      
         - Ensure that trace_block_getrq() gets the 'dev' in an appropriate
           fashion, to avoid a potential NULL deref. From Greg Thelen.
      
         - Regression fix for dm-mq with blk-mq, fixing a problem with
           stacking IO schedulers. From me.
      
         - string.h fixup, fixing an issue with memcpy_and_pad(). This
           original change came in through an NVMe dependency, which is why
           I'm including it here. From Martin Wilck.
      
         - Fix potential int overflow in __blkdev_sectors_to_bio_pages(), from
           Mikulas.
      
         - MBR enable fix for sed-opal, from Scott"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        block: directly insert blk-mq request from blk_insert_cloned_request()
        mm/backing-dev.c: fix an error handling path in 'cgwb_create()'
        string.h: un-fortify memcpy_and_pad
        nvme-pci: implement the HMB entry number and size limitations
        nvme-pci: propagate (some) errors from host memory buffer setup
        nvme-pci: use appropriate initial chunk size for HMB allocation
        nvme-pci: fix host memory buffer allocation fallback
        nvme: fix lightnvm check
        block: fix integer overflow in __blkdev_sectors_to_bio_pages()
        block: sed-opal: Set MBRDone on S3 resume path if TPER is MBREnabled
        block: tolerate tracing of NULL bio
      80a0d644
    • Linus Torvalds's avatar
      Merge tag 'docs-4.14' of git://git.lwn.net/linux · 20e52ee5
      Linus Torvalds authored
      Pull documentation fixes from Jonathan Corbet:
       "A cleanup from Mauro that needed to wait for the media pull, plus a
        handful of other fixes that wandered in"
      
      * tag 'docs-4.14' of git://git.lwn.net/linux:
        kokr/memory-barriers.txt: Apply atomic_t.txt change
        kokr/doc: Update memory-barriers.txt for read-to-write dependencies
        docs-rst: don't require adjustbox anymore
        docs-rst: conf.py: only setup notice box colors if Sphinx < 1.6
        docs-rst: conf.py: remove lscape from LaTeX preamble
      20e52ee5
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · e7989f97
      Linus Torvalds authored
      Pull fuse updates from Miklos Szeredi:
       "This fixes a regression (spotted by the Sandstorm.io folks) in the pid
        namespace handling introduced in 4.12.
      
        There's also a fix for honoring sync/dsync flags for pwritev2()"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: getattr cleanup
        fuse: honor iocb sync flags on write
        fuse: allow server to run in different pid_ns
      e7989f97
    • Linus Torvalds's avatar
      Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · c353f88f
      Linus Torvalds authored
      Pull overlayfs updates from Miklos Szeredi:
       "This fixes d_ino correctness in readdir, which brings overlayfs on par
        with normal filesystems regarding inode number semantics, as long as
        all layers are on the same filesystem.
      
        There are also some bug fixes, one in particular (random ioctl's
        shouldn't be able to modify lower layers) that touches some vfs code,
        but of course no-op for non-overlay fs"
      
      * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
        ovl: fix false positive ESTALE on lookup
        ovl: don't allow writing ioctl on lower layer
        ovl: fix relatime for directories
        vfs: add flags to d_real()
        ovl: cleanup d_real for negative
        ovl: constant d_ino for non-merge dirs
        ovl: constant d_ino across copy up
        ovl: fix readdir error value
        ovl: check snprintf return
      c353f88f
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 6d8ef53e
      Linus Torvalds authored
      Pull f2fs updates from Jaegeuk Kim:
       "In this round, we've mostly tuned f2fs to provide better user
        experience for Android. Especially, we've worked on atomic write
        feature again with SQLite community in order to support it officially.
        And we added or modified several facilities to analyze and enhance IO
        behaviors.
      
        Major changes include:
         - add app/fs io stat
         - add inode checksum feature
         - support project/journalled quota
         - enhance atomic write with new ioctl() which exposes feature set
         - enhance background gc/discard/fstrim flows with new gc_urgent mode
         - add F2FS_IOC_FS{GET,SET}XATTR
         - fix some quota flows"
      
      * tag 'f2fs-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (63 commits)
        f2fs: hurry up to issue discard after io interruption
        f2fs: fix to show correct discard_granularity in sysfs
        f2fs: detect dirty inode in evict_inode
        f2fs: clear radix tree dirty tag of pages whose dirty flag is cleared
        f2fs: speed up gc_urgent mode with SSR
        f2fs: better to wait for fstrim completion
        f2fs: avoid race in between read xattr & write xattr
        f2fs: make get_lock_data_page to handle encrypted inode
        f2fs: use generic terms used for encrypted block management
        f2fs: introduce f2fs_encrypted_file for clean-up
        Revert "f2fs: add a new function get_ssr_cost"
        f2fs: constify super_operations
        f2fs: fix to wake up all sleeping flusher
        f2fs: avoid race in between atomic_read & atomic_inc
        f2fs: remove unneeded parameter of change_curseg
        f2fs: update i_flags correctly
        f2fs: don't check inode's checksum if it was dirtied or writebacked
        f2fs: don't need to update inode checksum for recovery
        f2fs: trigger fdatasync for non-atomic_write file
        f2fs: fix to avoid race in between aio and gc
        ...
      6d8ef53e
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-4.14-rc1' of git://github.com/ceph/ceph-client · cdb897e3
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "The highlights include:
      
         - a large series of fixes and improvements to the snapshot-handling
           code (Zheng Yan)
      
         - individual read/write OSD requests passed down to libceph are now
           limited to 16M in size to avoid hitting OSD-side limits (Zheng Yan)
      
         - encode MStatfs v2 message to allow for more accurate space usage
           reporting (Douglas Fuller)
      
         - switch to the new writeback error tracking infrastructure (Jeff
           Layton)"
      
      * tag 'ceph-for-4.14-rc1' of git://github.com/ceph/ceph-client: (35 commits)
        ceph: stop on-going cached readdir if mds revokes FILE_SHARED cap
        ceph: wait on writeback after writing snapshot data
        ceph: fix capsnap dirty pages accounting
        ceph: ignore wbc->range_{start,end} when write back snapshot data
        ceph: fix "range cyclic" mode writepages
        ceph: cleanup local variables in ceph_writepages_start()
        ceph: optimize pagevec iterating in ceph_writepages_start()
        ceph: make writepage_nounlock() invalidate page that beyonds EOF
        ceph: properly get capsnap's size in get_oldest_context()
        ceph: remove stale check in ceph_invalidatepage()
        ceph: queue cap snap only when snap realm's context changes
        ceph: handle race between vmtruncate and queuing cap snap
        ceph: fix message order check in handle_cap_export()
        ceph: fix NULL pointer dereference in ceph_flush_snaps()
        ceph: adjust 36 checks for NULL pointers
        ceph: delete an unnecessary return statement in update_dentry_lease()
        ceph: ENOMEM pr_err in __get_or_create_frag() is redundant
        ceph: check negative offsets in ceph_llseek()
        ceph: more accurate statfs
        ceph: properly set snap follows for cap reconnect
        ...
      cdb897e3
    • Richard Wareing's avatar
      xfs: XFS_IS_REALTIME_INODE() should be false if no rt device present · b31ff3cd
      Richard Wareing authored
      If using a kernel with CONFIG_XFS_RT=y and we set the RHINHERIT flag on
      a directory in a filesystem that does not have a realtime device and
      create a new file in that directory, it gets marked as a real time file.
      When data is written and a fsync is issued, the filesystem attempts to
      flush a non-existent rt device during the fsync process.
      
      This results in a crash dereferencing a null buftarg pointer in
      xfs_blkdev_issue_flush():
      
        BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
        IP: xfs_blkdev_issue_flush+0xd/0x20
        .....
        Call Trace:
          xfs_file_fsync+0x188/0x1c0
          vfs_fsync_range+0x3b/0xa0
          do_fsync+0x3d/0x70
          SyS_fsync+0x10/0x20
          do_syscall_64+0x4d/0xb0
          entry_SYSCALL64_slow_path+0x25/0x25
      
      Setting RT inode flags does not require special privileges so any
      unprivileged user can cause this oops to occur.  To reproduce, confirm
      kernel is compiled with CONFIG_XFS_RT=y and run:
      
        # mkfs.xfs -f /dev/pmem0
        # mount /dev/pmem0 /mnt/test
        # mkdir /mnt/test/foo
        # xfs_io -c 'chattr +t' /mnt/test/foo
        # xfs_io -f -c 'pwrite 0 5m' -c fsync /mnt/test/foo/bar
      
      Or just run xfstests with MKFS_OPTIONS="-d rtinherit=1" and wait.
      
      Kernels built with CONFIG_XFS_RT=n are not exposed to this bug.
      
      Fixes: f538d4da ("[XFS] write barrier support")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarRichard Wareing <rwareing@fb.com>
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b31ff3cd
  2. 12 Sep, 2017 22 commits
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-4.14' of git://git.infradead.org/users/hch/dma-mapping · 52269718
      Linus Torvalds authored
      Pull dma-mapping updates from Christoph Hellwig:
      
       - removal of the old dma_alloc_noncoherent interface
      
       - remove unused flags to dma_declare_coherent_memory
      
       - restrict OF DMA configuration to specific physical busses
      
       - use the iommu mailing list for dma-mapping questions and patches
      
      * tag 'dma-mapping-4.14' of git://git.infradead.org/users/hch/dma-mapping:
        dma-coherent: fix dma_declare_coherent_memory() logic error
        ARM: imx: mx31moboard: Remove unused 'dma' variable
        dma-coherent: remove an unused variable
        MAINTAINERS: use the iommu list for the dma-mapping subsystem
        dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags
        dma-coherent: remove the DMA_MEMORY_INCLUDES_CHILDREN flag
        of: restrict DMA configuration
        dma-mapping: remove dma_alloc_noncoherent and dma_free_noncoherent
        i825xx: switch to switch to dma_alloc_attrs
        au1000_eth: switch to dma_alloc_attrs
        sgiseeq: switch to dma_alloc_attrs
        dma-mapping: reduce dma_mapping_error inline bloat
      52269718
    • Linus Torvalds's avatar
      Merge tag 'uuid-for-4.14' of git://git.infradead.org/users/hch/uuid · ae71948f
      Linus Torvalds authored
      Pull uuid updates from Christoph Hellwig:
       "Just a single conversion to the new UUID API for this merge window"
      
      * tag 'uuid-for-4.14' of git://git.infradead.org/users/hch/uuid:
        efi: switch to use new generic UUID API
      ae71948f
    • Linus Torvalds's avatar
      Merge tag 'selinux-pr-20170831' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux · 7f85565a
      Linus Torvalds authored
      Pull selinux updates from Paul Moore:
       "A relatively quiet period for SELinux, 11 patches with only two/three
        having any substantive changes.
      
        These noteworthy changes include another tweak to the NNP/nosuid
        handling, per-file labeling for cgroups, and an object class fix for
        AF_UNIX/SOCK_RAW sockets; the rest of the changes are minor tweaks or
        administrative updates (Stephen's email update explains the file
        explosion in the diffstat).
      
        Everything passes the selinux-testsuite"
      
      [ Also a couple of small patches from the security tree from Tetsuo
        Handa for Tomoyo and LSM cleanup. The separation of security policy
        updates wasn't all that clean - Linus ]
      
      * tag 'selinux-pr-20170831' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
        selinux: constify nf_hook_ops
        selinux: allow per-file labeling for cgroupfs
        lsm_audit: update my email address
        selinux: update my email address
        MAINTAINERS: update the NetLabel and Labeled Networking information
        selinux: use GFP_NOWAIT in the AVC kmem_caches
        selinux: Generalize support for NNP/nosuid SELinux domain transitions
        selinux: genheaders should fail if too many permissions are defined
        selinux: update the selinux info in MAINTAINERS
        credits: update Paul Moore's info
        selinux: Assign proper class to PF_UNIX/SOCK_RAW sockets
        tomoyo: Update URLs in Documentation/admin-guide/LSM/tomoyo.rst
        LSM: Remove security_task_create() hook.
      7f85565a
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 680352bd
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Two fixes: dead code removal, plus a SME memory encryption fix on
        32-bit kernels that crashed Xen guests"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Remove unused and undefined __generic_processor_info() declaration
        x86/mm: Make the SME mask a u64
      680352bd
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 040b9d7c
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "Three fixes:
      
         - fix a suspend/resume cpusets bug
      
         - fix a !CONFIG_NUMA_BALANCING bug
      
         - fix a kerneldoc warning"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Fix nuisance kernel-doc warning
        sched/cpuset/pm: Fix cpuset vs. suspend-resume bugs
        sched/fair: Fix wake_affine_llc() balancing rules
      040b9d7c
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e6328a7a
      Linus Torvalds authored
      Pull perf tooling updates from Ingo Molnar:
       "Perf tooling updates and fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf annotate browser: Help for cycling thru hottest instructions with TAB/shift+TAB
        perf stat: Only auto-merge events that are PMU aliases
        perf test: Add test case for PERF_SAMPLE_PHYS_ADDR
        perf script: Support physical address
        perf mem: Support physical address
        perf sort: Add sort option for physical address
        perf tools: Support new sample type for physical address
        perf vendor events powerpc: Remove duplicate events
        perf intel-pt: Fix syntax in documentation of config option
        perf test powerpc: Fix 'Object code reading' test
        perf trace: Support syscall name globbing
        perf syscalltbl: Support glob matching on syscall names
        perf report: Calculate the average cycles of iterations
      e6328a7a
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 33f82bda
      Linus Torvalds authored
      Pull irq fixes from Ingo Molnar:
       "A sparse irq race/locking fix, and a MSI irq domains population fix"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq: Make sparse_irq_lock protect what it should protect
        genirq/msi: Fix populating multiple interrupts
      33f82bda
    • Chao Yu's avatar
      f2fs: hurry up to issue discard after io interruption · e6c6de18
      Chao Yu authored
      Once we encounter I/O interruption during issuing discards, we will delay
      long time before next round, but if system status is I/O idle during the
      time, it may loses opportunity to issue discards. So this patch changes
      to hurry up to issue discard after io interruption.
      
      Besides, this patch also fixes to issue discards accurately with assigned
      rate.
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      e6c6de18
    • Chao Yu's avatar
      f2fs: fix to show correct discard_granularity in sysfs · 80647e5f
      Chao Yu authored
      Fix below incorrect display when reading discard_granularity sysfs node.
      
      $ cat /sys/fs/f2fs/<device>/discard_granularity
      $ 16
      $ echo 32 > /sys/fs/f2fs/<device>/discard_granularity
      $ cat /sys/fs/f2fs/<device>/discard_granularity
      $ 16
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      80647e5f
    • Chao Yu's avatar
      f2fs: detect dirty inode in evict_inode · ca7d802a
      Chao Yu authored
      Add a bugon in f2fs_evict_inode to detect inconsistent status between
      inode cache and related node page cache.
      Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      ca7d802a
    • Amir Goldstein's avatar
      ovl: fix false positive ESTALE on lookup · 939ae4ef
      Amir Goldstein authored
      Commit b9ac5c27 ("ovl: hash overlay non-dir inodes by copy up origin")
      verifies that the origin lower inode stored in the overlayfs inode matched
      the inode of a copy up origin dentry found by lookup.
      
      There is a false positive result in that check when lower fs does not
      support file handles and copy up origin cannot be followed by file handle
      at lookup time.
      
      The false negative happens when finding an overlay inode in cache on a
      copied up overlay dentry lookup. The overlay inode still 'remembers' the
      copy up origin inode, but the copy up origin dentry is not available for
      verification.
      
      Relax the check in case copy up origin dentry is not available.
      
      Fixes: b9ac5c27 ("ovl: hash overlay non-dir inodes by copy up...")
      Cc: <stable@vger.kernel.org> # v4.13
      Reported-by: default avatarJordi Pujol <jordipujolp@gmail.com>
      Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      939ae4ef
    • Miklos Szeredi's avatar
      fuse: getattr cleanup · 5b97eeac
      Miklos Szeredi authored
      The refreshed argument isn't used by any caller, get rid of it.
      
      Use a helper for just updating the inode (no need to fill in a kstat).
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      5b97eeac
    • Miklos Szeredi's avatar
      fuse: honor iocb sync flags on write · e1c0eecb
      Miklos Szeredi authored
      If the IOCB_DSYNC flag is set a sync is not being performed by
      fuse_file_write_iter.
      
      Honor IOCB_DSYNC/IOCB_SYNC by setting O_DYSNC/O_SYNC respectively in the
      flags filed of the write request.
      
      We don't need to sync data or metadata, since fuse_perform_write() does
      write-through and the filesystem is responsible for updating file times.
      
      Original patch by Vitaly Zolotusky.
      Reported-by: default avatarNate Clark <nate@neworld.us>
      Cc: Vitaly Zolotusky <vitaly@unitc.com>.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      e1c0eecb
    • Miklos Szeredi's avatar
      fuse: allow server to run in different pid_ns · 5d6d3a30
      Miklos Szeredi authored
      Commit 0b6e9ea0 ("fuse: Add support for pid namespaces") broke
      Sandstorm.io development tools, which have been sending FUSE file
      descriptors across PID namespace boundaries since early 2014.
      
      The above patch added a check that prevented I/O on the fuse device file
      descriptor if the pid namespace of the reader/writer was different from the
      pid namespace of the mounter.  With this change passing the device file
      descriptor to a different pid namespace simply doesn't work.  The check was
      added because pids are transferred to/from the fuse userspace server in the
      namespace registered at mount time.
      
      To fix this regression, remove the checks and do the following:
      
      1) the pid in the request header (the pid of the task that initiated the
      filesystem operation) is translated to the reader's pid namespace.  If a
      mapping doesn't exist for this pid, then a zero pid is used.  Note: even if
      a mapping would exist between the initiator task's pid namespace and the
      reader's pid namespace the pid will be zero if either mapping from
      initator's to mounter's namespace or mapping from mounter's to reader's
      namespace doesn't exist.
      
      2) The lk.pid value in setlk/setlkw requests and getlk reply is left alone.
      Userspace should not interpret this value anyway.  Also allow the
      setlk/setlkw operations if the pid of the task cannot be represented in the
      mounter's namespace (pid being zero in that case).
      Reported-by: default avatarKenton Varda <kenton@sandstorm.io>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      Fixes: 0b6e9ea0 ("fuse: Add support for pid namespaces")
      Cc: <stable@vger.kernel.org> # v4.12+
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Seth Forshee <seth.forshee@canonical.com>
      5d6d3a30
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · 8fac2f96
      Linus Torvalds authored
      Pull ARM updates from Russell King:
       "Low priority fixes and updates for ARM:
      
         - add some missing includes
      
         - efficiency improvements in system call entry code when tracing is
           enabled
      
         - ensure ARMv6+ is always built as EABI
      
         - export save_stack_trace_tsk()
      
         - fix fatal signal handling during mm fault
      
         - build translation table base address register from scratch
      
         - appropriately align the .data section to a word boundary where we
           rely on that data being word aligned"
      
      * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 8691/1: Export save_stack_trace_tsk()
        ARM: 8692/1: mm: abort uaccess retries upon fatal signal
        ARM: 8690/1: lpae: build TTB control register value from scratch in v7_ttb_setup
        ARM: align .data section
        ARM: always enable AEABI for ARMv6+
        ARM: avoid saving and restoring registers unnecessarily
        ARM: move PC value into r9
        ARM: obtain thread info structure later
        ARM: use aliases for registers in entry-common
        ARM: 8689/1: scu: add missing errno include
        ARM: 8688/1: pm: add missing types include
      8fac2f96
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 260d1658
      Linus Torvalds authored
      Pull more s390 updates from Martin Schwidefsky:
       "The second patch set for the 4.14 merge window:
      
         - Convert the dasd device driver to the blk-mq interface.
      
         - Provide three zcrypt interfaces for vfio_ap. These will be required
           for KVM guest access to the crypto cards attached via the AP bus.
      
         - A couple of memory management bug fixes."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/dasd: blk-mq conversion
        s390/mm: use a single lock for the fields in mm_context_t
        s390/mm: fix race on mm->context.flush_mm
        s390/mm: fix local TLB flushing vs. detach of an mm address space
        s390/zcrypt: externalize AP queue interrupt control
        s390/zcrypt: externalize AP config info query
        s390/zcrypt: externalize test AP queue
        s390/mm: use VM_BUG_ON in crst_table_[upgrade|downgrade]
      260d1658
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · c971aa36
      Linus Torvalds authored
      Pull thermal updates from Zhang Rui:
      
       - fix resources release in error paths when registering thermal zone.
         (Christophe Jaillet)
      
       - introduce a new thermal driver for on-chip PVT (Process, Voltage and
         Temperature) monitoring unit implemented on UniPhier SoCs. This
         driver supports temperature monitoring and alert function. (Kunihiko
         Hayashi)
      
       - Add support for mt2712 chip in the mtk_thermal driver. (Louis Yu)
      
       - Add support for RK3328 SOC in rockchip_thermal driver. (Rocky Hao)
      
       - cleanup a couple of platform thermal drivers to constify
         thermal_zone_of_device_ops structures. (Julia Lawall)
      
       - a couple of fixes in int340x and intel_pch_thermal thermal driver.
         (Arvind Yadav, Sumeet Pawnikar, Brian Bian, Ed Swierk, Zhang Rui)
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (27 commits)
        Thermal: int3406_thermal: fix thermal sysfs I/F
        thermal: mediatek: minor mtk_thermal.c cleanups
        thermal: mediatek: extend calibration data for mt2712 chip
        thermal: mediatek: add Mediatek thermal driver for mt2712
        dt-bindings: thermal: Add binding document for Mediatek thermal controller
        thermal: intel_pch_thermal: Fix enable check on Broadwell-DE
        thermal: rockchip: Support the RK3328 SOC in thermal driver
        dt-bindings: rockchip-thermal: Support the RK3328 SoC compatible
        thermal: bcm2835: constify thermal_zone_of_device_ops structures
        thermal: exynos: constify thermal_zone_of_device_ops structures
        thermal: zx2967: constify thermal_zone_of_device_ops structures
        thermal: rcar_gen3_thermal: constify thermal_zone_of_device_ops structures
        thermal: qoriq: constify thermal_zone_of_device_ops structures
        thermal: hisilicon: constify thermal_zone_of_device_ops structures
        thermal: core: Fix resources release in error paths in thermal_zone_device_register()
        thermal: core: Use the new 'thermal_zone_destroy_device_groups()' helper function
        thermal: core: Add some new helper functions to free resources
        thermal: int3400_thermal: process "thermal table changed" event
        thermal: uniphier: add UniPhier thermal driver
        dt-bindings: thermal: add binding documentation for UniPhier thermal monitor
        ...
      c971aa36
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.14-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 8e7757d8
      Linus Torvalds authored
      Pull NFS client updates from Trond Myklebust:
       "Hightlights include:
      
        Stable bugfixes:
         - Fix mirror allocation in the writeback code to avoid a use after
           free
         - Fix the O_DSYNC writes to use the correct byte range
         - Fix 2 use after free issues in the I/O code
      
        Features:
         - Writeback fixes to split up the inode->i_lock in order to reduce
           contention
         - RPC client receive fixes to reduce the amount of time the
           xprt->transport_lock is held when receiving data from a socket into
           am XDR buffer.
         - Ditto fixes to reduce contention between call side users of the
           rdma rb_lock, and its use in rpcrdma_reply_handler.
         - Re-arrange rdma stats to reduce false cacheline sharing.
         - Various rdma cleanups and optimisations.
         - Refactor the NFSv4.1 exchange id code and clean up the code.
         - Const-ify all instances of struct rpc_xprt_ops
      
        Bugfixes:
         - Fix the NFSv2 'sec=' mount option.
         - NFSv4.1: don't use machine credentials for CLOSE when using
           'sec=sys'
         - Fix the NFSv3 GRANT callback when the port changes on the server.
         - Fix livelock issues with COMMIT
         - NFSv4: Use correct inode in _nfs4_opendata_to_nfs4_state() when
           doing and NFSv4.1 open by filehandle"
      
      * tag 'nfs-for-4.14-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (69 commits)
        NFS: Count the bytes of skipped subrequests in nfs_lock_and_join_requests()
        NFS: Don't hold the group lock when calling nfs_release_request()
        NFS: Remove pnfs_generic_transfer_commit_list()
        NFS: nfs_lock_and_join_requests and nfs_scan_commit_list can deadlock
        NFS: Fix 2 use after free issues in the I/O code
        NFS: Sync the correct byte range during synchronous writes
        lockd: Delete an error message for a failed memory allocation in reclaimer()
        NFS: remove jiffies field from access cache
        NFS: flush data when locking a file to ensure cache coherence for mmap.
        SUNRPC: remove some dead code.
        NFS: don't expect errors from mempool_alloc().
        xprtrdma: Use xprt_pin_rqst in rpcrdma_reply_handler
        xprtrdma: Re-arrange struct rx_stats
        NFS: Fix NFSv2 security settings
        NFSv4.1: don't use machine credentials for CLOSE when using 'sec=sys'
        SUNRPC: ECONNREFUSED should cause a rebind.
        NFS: Remove unused parameter gfp_flags from nfs_pageio_init()
        NFSv4: Fix up mirror allocation
        SUNRPC: Add a separate spinlock to protect the RPC request receive list
        SUNRPC: Cleanup xs_tcp_read_common()
        ...
      8e7757d8
    • Daeho Jeong's avatar
      f2fs: clear radix tree dirty tag of pages whose dirty flag is cleared · 0abd8e70
      Daeho Jeong authored
      On a senario like writing out the first dirty page of the inode
      as the inline data, we only cleared dirty flags of the pages, but
      didn't clear the dirty tags of those pages in the radix tree.
      
      If we don't clear the dirty tags of the pages in the radix tree, the
      inodes which contain the pages will be marked with I_DIRTY_PAGES again
      and again, and writepages() for the inodes will be invoked in every
      writeback period. As a result, nothing will be done in every
      writepages() for the inodes and it will just consume CPU time
      meaninglessly.
      Signed-off-by: default avatarDaeho Jeong <daeho.jeong@samsung.com>
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      0abd8e70
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace · dd198ce7
      Linus Torvalds authored
      Pull namespace updates from Eric Biederman:
       "Life has been busy and I have not gotten half as much done this round
        as I would have liked. I delayed it so that a minor conflict
        resolution with the mips tree could spend a little time in linux-next
        before I sent this pull request.
      
        This includes two long delayed user namespace changes from Kirill
        Tkhai. It also includes a very useful change from Serge Hallyn that
        allows the security capability attribute to be used inside of user
        namespaces. The practical effect of this is people can now untar
        tarballs and install rpms in user namespaces. It had been suggested to
        generalize this and encode some of the namespace information
        information in the xattr name. Upon close inspection that makes the
        things that should be hard easy and the things that should be easy
        more expensive.
      
        Then there is my bugfix/cleanup for signal injection that removes the
        magic encoding of the siginfo union member from the kernel internal
        si_code. The mips folks reported the case where I had used FPE_FIXME
        me is impossible so I have remove FPE_FIXME from mips, while at the
        same time including a return statement in that case to keep gcc from
        complaining about unitialized variables.
      
        I almost finished the work to get make copy_siginfo_to_user a trivial
        copy to user. The code is available at:
      
           git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git neuter-copy_siginfo_to_user-v3
      
        But I did not have time/energy to get the code posted and reviewed
        before the merge window opened.
      
        I was able to see that the security excuse for just copying fields
        that we know are initialized doesn't work in practice there are buggy
        initializations that don't initialize the proper fields in siginfo. So
        we still sometimes copy unitialized data to userspace"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        Introduce v3 namespaced file capabilities
        mips/signal: In force_fcr31_sig return in the impossible case
        signal: Remove kernel interal si_code magic
        fcntl: Don't use ambiguous SIG_POLL si_codes
        prctl: Allow local CAP_SYS_ADMIN changing exe_file
        security: Use user_namespace::level to avoid redundant iterations in cap_capable()
        userns,pidns: Verify the userns for new pid namespaces
        signal/testing: Don't look for __SI_FAULT in userspace
        signal/mips: Document a conflict with SI_USER with SIGFPE
        signal/sparc: Document a conflict with SI_USER with SIGFPE
        signal/ia64: Document a conflict with SI_USER with SIGFPE
        signal/alpha: Document a conflict with SI_USER for SIGTRAP
      dd198ce7
    • Jaegeuk Kim's avatar
      f2fs: speed up gc_urgent mode with SSR · b3a97a2a
      Jaegeuk Kim authored
      This patch activates SSR in gc_urgent mode.
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      b3a97a2a
    • Jaegeuk Kim's avatar
      f2fs: better to wait for fstrim completion · 1eb1ef4a
      Jaegeuk Kim authored
      In android, we'd better wait for fstrim completion instead of issuing the
      discard commands asynchronous.
      Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
      Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
      1eb1ef4a
  3. 11 Sep, 2017 10 commits
    • Jens Axboe's avatar
      block: directly insert blk-mq request from blk_insert_cloned_request() · 157f377b
      Jens Axboe authored
      A NULL pointer crash was reported for the case of having the BFQ IO
      scheduler attached to the underlying blk-mq paths of a DM multipath
      device.  The crash occured in blk_mq_sched_insert_request()'s call to
      e->type->ops.mq.insert_requests().
      
      Paolo Valente correctly summarized why the crash occured with:
      "the call chain (dm_mq_queue_rq -> map_request -> setup_clone ->
      blk_rq_prep_clone) creates a cloned request without invoking
      e->type->ops.mq.prepare_request for the target elevator e.  The cloned
      request is therefore not initialized for the scheduler, but it is
      however inserted into the scheduler by blk_mq_sched_insert_request."
      
      All said, a request-based DM multipath device's IO scheduler should be
      the only one used -- when the original requests are issued to the
      underlying paths as cloned requests they are inserted directly in the
      underlying dispatch queue(s) rather than through an additional elevator.
      
      But commit bd166ef1 ("blk-mq-sched: add framework for MQ capable IO
      schedulers") switched blk_insert_cloned_request() from using
      blk_mq_insert_request() to blk_mq_sched_insert_request().  Which
      incorrectly added elevator machinery into a call chain that isn't
      supposed to have any.
      
      To fix this introduce a blk-mq private blk_mq_request_bypass_insert()
      that blk_insert_cloned_request() calls to insert the request without
      involving any elevator that may be attached to the cloned request's
      request_queue.
      
      Fixes: bd166ef1 ("blk-mq-sched: add framework for MQ capable IO schedulers")
      Cc: stable@vger.kernel.org
      Reported-by: default avatarBart Van Assche <Bart.VanAssche@wdc.com>
      Tested-by: default avatarMike Snitzer <snitzer@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      157f377b
    • Jens Axboe's avatar
      Merge branch 'nvme-4.14' of git://git.infradead.org/nvme into for-linus · be1c7043
      Jens Axboe authored
      Pull NVMe fixes from Christoph:
      
      "Below are a few small fixes for the current merge window:
      
       - fix string.h compilation failures with the new memcpy_and_pad
         helper (Martin Wilck)
       - fix incorrect dereference of a PCI data structure in the lightnvm
         support code (me)
       - HMB fixes (Akinobu Mita and me)"
      be1c7043
    • Christophe JAILLET's avatar
      mm/backing-dev.c: fix an error handling path in 'cgwb_create()' · 0b045bd1
      Christophe JAILLET authored
      If the 'kmalloc' fails, we must go through the existing error handling
      path.
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Fixes: 52ebea74 ("writeback: make backing_dev_info host cgroup-specific bdi_writebacks")
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      0b045bd1
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 89fd915c
      Linus Torvalds authored
      Pull libnvdimm from Dan Williams:
       "A rework of media error handling in the BTT driver and other updates.
        It has appeared in a few -next releases and collected some late-
        breaking build-error and warning fixups as a result.
      
        Summary:
      
         - Media error handling support in the Block Translation Table (BTT)
           driver is reworked to address sleeping-while-atomic locking and
           memory-allocation-context conflicts.
      
         - The dax_device lookup overhead for xfs and ext4 is moved out of the
           iomap hot-path to a mount-time lookup.
      
         - A new 'ecc_unit_size' sysfs attribute is added to advertise the
           read-modify-write boundary property of a persistent memory range.
      
         - Preparatory fix-ups for arm and powerpc pmem support are included
           along with other miscellaneous fixes"
      
      * tag 'libnvdimm-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (26 commits)
        libnvdimm, btt: fix format string warnings
        libnvdimm, btt: clean up warning and error messages
        ext4: fix null pointer dereference on sbi
        libnvdimm, nfit: move the check on nd_reserved2 to the endpoint
        dax: fix FS_DAX=n BLOCK=y compilation
        libnvdimm: fix integer overflow static analysis warning
        libnvdimm, nd_blk: remove mmio_flush_range()
        libnvdimm, btt: rework error clearing
        libnvdimm: fix potential deadlock while clearing errors
        libnvdimm, btt: cache sector_size in arena_info
        libnvdimm, btt: ensure that flags were also unchanged during a map_read
        libnvdimm, btt: refactor map entry operations with macros
        libnvdimm, btt: fix a missed NVDIMM_IO_ATOMIC case in the write path
        libnvdimm, nfit: export an 'ecc_unit_size' sysfs attribute
        ext4: perform dax_device lookup at mount
        ext2: perform dax_device lookup at mount
        xfs: perform dax_device lookup at mount
        dax: introduce a fs_dax_get_by_bdev() helper
        libnvdimm, btt: check memory allocation failure
        libnvdimm, label: fix index block size calculation
        ...
      89fd915c
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-4.14-rc1' of... · 66c9457d
      Linus Torvalds authored
      Merge tag 'pwm/for-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "The changes for this release include a new driver for the PWM
        controller found on SoCs of the ZTX ZX family. Support for an old
        SH-Mobile SoC has been dropped and the Rockchip and MediaTek drivers
        gain support for more generations.
      
        Other than that there are a bunch of coding style fixes, minor bug
        fixes and cleanup as well as documentation patches"
      
      * tag 'pwm/for-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (32 commits)
        pwm: pwm-samsung: fix suspend/resume support
        pwm: samsung: Remove redundant checks from pwm_samsung_config()
        pwm: mediatek: Disable clock on PWM configuration failure
        dt-bindings: pwm: Add MT2712/MT7622 information
        pwm: mediatek: Fix clock control issue
        pwm: mediatek: Fix PWM source clock selection
        pwm: mediatek: Fix Kconfig description
        pwm: tegra: Explicitly request exclusive reset control
        pwm: hibvt: Explicitly request exclusive reset control
        pwm: tiehrpwm: Set driver data before runtime PM enable
        pwm: tiehrpwm: Miscellaneous coding style fixups
        pwm: tiecap: Set driver data before runtime PM enable
        pwm: tiecap: Miscellaneous coding style fixups
        dt-bindings: pwm: tiecap: Add TI 66AK2G SoC specific compatible
        pwm: tiehrpwm: fix clock imbalance in probe error path
        pwm: tiehrpwm: Fix runtime PM imbalance at unbind
        pwm: Kconfig: Enable pwm-tiecap to be built for Keystone
        pwm: Add ZTE ZX PWM device driver
        dt-bindings: pwm: Add bindings doc for ZTE ZX PWM controller
        pwm: bcm2835: Support for polarity setting via DT
        ...
      66c9457d
    • Linus Torvalds's avatar
      Merge branch 'bt-fix' (bluetooth fixes from Marcel) · 669bf77a
      Linus Torvalds authored
      Pull bluetooth fix from Marcel Holtmann:
       "All of our mgmt-tester, l2cap-test and rfcomm-tester unit tests are
        passing with this patch"
      
      * emailed patch from Marcel Holtmann <marcel@holtmann.org>:
        Bluetooth: Properly check L2CAP config option output buffer length
      669bf77a
    • Martin Wilck's avatar
      string.h: un-fortify memcpy_and_pad · 1359798f
      Martin Wilck authored
      The way I'd implemented the new helper memcpy_and_pad  with
      __FORTIFY_INLINE caused compiler warnings for certain kernel
      configurations.
      
      This helper is only used in a single place at this time, and thus
      doesn't benefit much from fortification. So simplify the code
      by dropping fortification support for now.
      
      Fixes: 01f33c33 "string.h: add memcpy_and_pad()"
      Signed-off-by: default avatarMartin Wilck <mwilck@suse.com>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      1359798f
    • Christoph Hellwig's avatar
      nvme-pci: implement the HMB entry number and size limitations · 044a9df1
      Christoph Hellwig authored
      Adds support for the new Host Memory Buffer Minimum Descriptor Entry Size
      and Host Memory Maximum Descriptors Entries field that were added in
      TP 4002 HMB Enhancements.  These allow the controller to advertise
      limits for the usual number of segments in the host memory buffer, as
      well as a minimum usable per-segment size.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarKeith Busch <keith.busch@intel.com>
      044a9df1
    • Christoph Hellwig's avatar
      nvme-pci: propagate (some) errors from host memory buffer setup · 9620cfba
      Christoph Hellwig authored
      We want to catch command execution errors when resetting the device, so
      propagate errors from the Set Features when setting up the host memory
      buffer.  We keep ignoring memory allocation failures, as the spec
      clearly says that the controller must work without a host memory buffer.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarKeith Busch <keith.busch@intel.com>
      Cc: stable@vger.kernel.org
      9620cfba
    • Akinobu Mita's avatar
      nvme-pci: use appropriate initial chunk size for HMB allocation · 30f92d62
      Akinobu Mita authored
      The initial chunk size for host memory buffer allocation is currently
      PAGE_SIZE << MAX_ORDER.  MAX_ORDER order allocation is usually failed
      without CONFIG_DMA_CMA.  So the HMB allocation is retried with chunk size
      PAGE_SIZE << (MAX_ORDER - 1) in general, but there is no problem if the
      retry allocation works correctly.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      [hch: rebased]
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarKeith Busch <keith.busch@intel.com>
      Cc: stable@vger.kernel.org
      30f92d62