1. 23 Dec, 2016 14 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · a307d0a0
      Linus Torvalds authored
      Pull final vfs updates from Al Viro:
       "Assorted cleanups and fixes all over the place"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        sg_write()/bsg_write() is not fit to be called under KERNEL_DS
        ufs: fix function declaration for ufs_truncate_blocks
        fs: exec: apply CLOEXEC before changing dumpable task flags
        seq_file: reset iterator to first record for zero offset
        vfs: fix isize/pos/len checks for reflink & dedupe
        [iov_iter] fix iterate_all_kinds() on empty iterators
        move aio compat to fs/aio.c
        reorganize do_make_slave()
        clone_private_mount() doesn't need to touch namespace_sem
        remove a bogus claim about namespace_sem being held by callers of mnt_alloc_id()
      a307d0a0
    • Linus Torvalds's avatar
      Merge tag 'befs-v4.10-rc1' of git://github.com/luisbg/linux-befs · fc26901b
      Linus Torvalds authored
      Pull befs updates from Luis de Bethencourt:
       "A series of small fixes and adding NFS export support"
      
      * tag 'befs-v4.10-rc1' of git://github.com/luisbg/linux-befs:
        befs: add NFS export support
        befs: remove trailing whitespaces
        befs: remove signatures from comments
        befs: fix style issues in header files
        befs: fix style issues in linuxvfs.c
        befs: fix typos in linuxvfs.c
        befs: fix style issues in io.c
        befs: fix style issues in inode.c
        befs: fix style issues in debug.c
      fc26901b
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-4.10-rc1' of git://people.freedesktop.org/~airlied/linux · 01302aac
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Some fixes came in while I was out, mostly intel and amdgpu ones, with
        one ast fix"
      
      Daniel Vetter says:
       "This should also shut up the WARN_ON(!intel_dp->lane_count) noise"
      
      * tag 'drm-fixes-for-4.10-rc1' of git://people.freedesktop.org/~airlied/linux: (35 commits)
        drm/amdgpu: update tile table for oland/hainan
        drm/amdgpu: update tile table for verde
        drm/amdgpu: update rev id for verde
        drm/amdgpu: update golden setting for verde
        drm/amdgpu: update rev id for oland
        drm/amdgpu: update golden setting for oland
        drm/amdgpu: update rev id for hainan
        drm/amdgpu: update golden setting for hainan
        drm/amdgpu: update rev id for pitcairn
        drm/amdgpu: update golden setting for pitcairn
        drm/amdgpu: update golden setting/tiling table of tahiti
        drm/i915: skip the first 4k of stolen memory on everything >= gen8
        drm/i915: Fallback to single PAGE_SIZE segments for DMA remapping
        drm/i915: Fix use after free in logical_render_ring_init
        drm/i915: disable PSR by default on HSW/BDW
        drm/i915: Fix setting of boost freq tunable
        drm/i915: tune down the fast link training vs boot fail
        drm/i915: Reorder phys backing storage release
        drm/i915/gen9: Fix PCODE polling during SAGV disabling
        drm/i915/gen9: Fix PCODE polling during CDCLK change notification
        ...
      01302aac
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · 29691591
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "First round of -rc fixes for 4.10 kernel:
      
         - a series of qedr fixes
         - a series of rxe fixes
         - one i40iw fix
         - one cma fix
         - one cxgb4 fix"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        IB/rxe: Don't check for null ptr in send()
        IB/rxe: Drop future atomic/read packets rather than retrying
        IB/rxe: Use BTH_PSN_MASK when ACKing duplicate sends
        qedr: Always notify the verb consumer of flushed CQEs
        qedr: clear the vendor error field in the work completion
        qedr: post_send/recv according to QP state
        qedr: ignore inline flag in read verbs
        qedr: modify QP state to error when destroying it
        qedr: return correct value on modify qp
        qedr: return error if destroy CQ failed
        qedr: configure the number of CQEs on CQ creation
        i40iw: Set 128B as the only supported RQ WQE size
        IB/cma: Fix a race condition in iboe_addr_get_sgid()
        IB/rxe: Fix a memory leak in rxe_qp_cleanup()
        iw_cxgb4: set correct FetchBurstMax for QPs
      29691591
    • Linus Torvalds's avatar
      Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · f290cbac
      Linus Torvalds authored
      Pull late SCSI updates from James Bottomley:
       "This is mostly stuff which missed the initial pull.
      
        There's a new driver: qedi, and some ufs, ibmvscsis and ncr5380
        updates plus some assorted driver fixes and also a fix for the bug
        where if a device goes into a blocked state between configuration and
        sysfs device add (which can be a long time under async probing) it
        would become permanently blocked"
      
      * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (30 commits)
        scsi: avoid a permanent stop of the scsi device's request queue
        scsi: mpt3sas: Recognize and act on iopriority info
        scsi: qla2xxx: Fix Target mode handling with Multiqueue changes.
        scsi: qla2xxx: Add Block Multi Queue functionality.
        scsi: qla2xxx: Add multiple queue pair functionality.
        scsi: qla2xxx: Utilize pci_alloc_irq_vectors/pci_free_irq_vectors calls.
        scsi: qla2xxx: Only allow operational MBX to proceed during RESET.
        scsi: hpsa: remove memory allocate failure message
        scsi: Update 3ware driver email addresses
        scsi: zfcp: fix rport unblock race with LUN recovery
        scsi: zfcp: do not trace pure benign residual HBA responses at default level
        scsi: zfcp: fix use-after-"free" in FC ingress path after TMF
        scsi: libcxgbi: return error if interface is not up
        scsi: cxgb4i: libcxgbi: add missing module_put()
        scsi: cxgb4i: libcxgbi: cxgb4: add T6 iSCSI completion feature
        scsi: cxgb4i: libcxgbi: add active open cmd for T6 adapters
        scsi: cxgb4i: use cxgb4_tp_smt_idx() to get smt_idx
        scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.
        scsi: aacraid: remove wildcard for series 9 controllers
        scsi: ibmvscsi: add write memory barrier to CRQ processing
        ...
      f290cbac
    • Linus Torvalds's avatar
      Merge tag 'arc-4.10-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · 42e0372c
      Linus Torvalds authored
      Pull more ARC updates from Vineet Gupta:
      
       - Fix for aliasing VIPT dcache in old ARC700 cores
      
       - micro-optimization in ARC700 ProtV handler
      
       - Enable SG_CHAIN  [Vladimir]
      
       - ARC HS38 core intc default to prio 1
      
      * tag 'arc-4.10-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: mm: arc700: Don't assume 2 colours for aliasing VIPT dcache
        ARC: mm: No need to save cache version in @cpuinfo
        ARC: enable SG chaining
        ARCv2: intc: default all interrupts to priority 1
        ARCv2: entry: document intr disable in hard isr
        ARC: ARCompact entry: elide re-reading ECR in ProtV handler
      42e0372c
    • Al Viro's avatar
      Merge branch 'work.namespace' into for-linus · faf0dceb
      Al Viro authored
      faf0dceb
    • Al Viro's avatar
      sg_write()/bsg_write() is not fit to be called under KERNEL_DS · 128394ef
      Al Viro authored
      Both damn things interpret userland pointers embedded into the payload;
      worse, they are actually traversing those.  Leaving aside the bad
      API design, this is very much _not_ safe to call with KERNEL_DS.
      Bail out early if that happens.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      128394ef
    • Jeff Layton's avatar
      ufs: fix function declaration for ufs_truncate_blocks · f698cccb
      Jeff Layton authored
      sparse says:
      
          fs/ufs/inode.c:1195:6: warning: symbol 'ufs_truncate_blocks' was not declared. Should it be static?
      
      Note that the forward declaration in the file is already marked static.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      f698cccb
    • Aleksa Sarai's avatar
      fs: exec: apply CLOEXEC before changing dumpable task flags · 613cc2b6
      Aleksa Sarai authored
      If you have a process that has set itself to be non-dumpable, and it
      then undergoes exec(2), any CLOEXEC file descriptors it has open are
      "exposed" during a race window between the dumpable flags of the process
      being reset for exec(2) and CLOEXEC being applied to the file
      descriptors. This can be exploited by a process by attempting to access
      /proc/<pid>/fd/... during this window, without requiring CAP_SYS_PTRACE.
      
      The race in question is after set_dumpable has been (for get_link,
      though the trace is basically the same for readlink):
      
      [vfs]
      -> proc_pid_link_inode_operations.get_link
         -> proc_pid_get_link
            -> proc_fd_access_allowed
               -> ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS);
      
      Which will return 0, during the race window and CLOEXEC file descriptors
      will still be open during this window because do_close_on_exec has not
      been called yet. As a result, the ordering of these calls should be
      reversed to avoid this race window.
      
      This is of particular concern to container runtimes, where joining a
      PID namespace with file descriptors referring to the host filesystem
      can result in security issues (since PRCTL_SET_DUMPABLE doesn't protect
      against access of CLOEXEC file descriptors -- file descriptors which may
      reference filesystem objects the container shouldn't have access to).
      
      Cc: dev@opencontainers.org
      Cc: <stable@vger.kernel.org> # v3.2+
      Reported-by: default avatarMichael Crosby <crosbymichael@gmail.com>
      Signed-off-by: default avatarAleksa Sarai <asarai@suse.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      613cc2b6
    • Tomasz Majchrzak's avatar
      seq_file: reset iterator to first record for zero offset · e522751d
      Tomasz Majchrzak authored
      If kernfs file is empty on a first read, successive read operations
      using the same file descriptor will return no data, even when data is
      available. Default kernfs 'seq_next' implementation advances iterator
      position even when next object is not there. Kernfs 'seq_start' for
      following requests will not return iterator as position is already on
      the second object.
      
      This defect doesn't allow to monitor badblocks sysfs files from MD raid.
      They are initially empty but if data appears at some stage, userspace is
      not able to read it.
      Signed-off-by: default avatarTomasz Majchrzak <tomasz.majchrzak@intel.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      e522751d
    • Darrick J. Wong's avatar
      vfs: fix isize/pos/len checks for reflink & dedupe · 22725ce4
      Darrick J. Wong authored
      Strengthen the checking of pos/len vs. i_size, clarify the return values
      for the clone prep function, and remove pointless code.
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      22725ce4
    • Al Viro's avatar
      [iov_iter] fix iterate_all_kinds() on empty iterators · 33844e66
      Al Viro authored
      Problem similar to ones dealt with in "fold checks into iterate_and_advance()"
      and followups, except that in this case we really want to do nothing when
      asked for zero-length operation - unlike zero-length iterate_and_advance(),
      zero-length iterate_all_kinds() has no side effects, and callers are simpler
      that way.
      
      That got exposed when copy_from_iter_full() had been used by tipc, which
      builds an msghdr with zero payload and (now) feeds it to a primitive
      based on iterate_all_kinds() instead of iterate_and_advance().
      Reported-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Tested-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      33844e66
    • Al Viro's avatar
      move aio compat to fs/aio.c · c00d2c7e
      Al Viro authored
      ... and fix the minor buglet in compat io_submit() - native one
      kills ioctx as cleanup when put_user() fails.  Get rid of
      bogus compat_... in !CONFIG_AIO case, while we are at it - they
      should simply fail with ENOSYS, same as for native counterparts.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      c00d2c7e
  2. 22 Dec, 2016 26 commits