1. 30 Apr, 2016 2 commits
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · b9cc335f
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "A few fixes all over the place:
      
        radeon is probably the biggest standout, it's a fix for screen
        corruption or hung black outputs so I thought it was worth pulling in.
      
        Otherwise some amdgpu power control fixes, some misc vmwgfx fixes, one
        etnaviv fix, one virtio-gpu fix, two DP MST fixes, and a single TTM
        fix"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/vmwgfx: Fix order of operation
        drm/vmwgfx: use vmw_cmd_dx_cid_check for query commands.
        drm/vmwgfx: Enable SVGA_3D_CMD_DX_SET_PREDICATION
        drm/amdgpu: disable vm interrupts with vm_fault_stop=2
        drm/amdgpu: print a message if ATPX dGPU power control is missing
        Revert "drm/amdgpu: disable runtime pm on PX laptops without dGPU power control"
        drm/radeon: fix vertical bars appear on monitor (v2)
        drm/ttm: fix kref count mess in ttm_bo_move_to_lru_tail
        drm/virtio: send vblank event after crtc updates
        drm/dp/mst: Restore primary hub guid on resume
        drm/dp/mst: Get validated port ref in drm_dp_update_payload_part1()
        drm/etnaviv: don't move linear memory window on 3D cores without MC2.0
      b9cc335f
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · 925d96a0
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "Final set of -rc fixes for 4.6.
      
        I've collected up a number of patches that are all pretty small with
        the exception of only a couple.  The hfi1 driver has a number of
        important patches, and it is what really drives the line count of this
        pull request up.  These are all small and I've got this kernel built
        and running in the test lab (I have most of the hardware, I think nes
        is the only thing in this patch set that I can't say I've personally
        tested and have up and running).
      
        Summary:
      
         - A number of collected fixes for oopses, memory corruptions,
           deadlocks, etc.  All of these fixes are small (many only 5-10
           lines), obvious, and tested.
      
         - Fix for the security issue related to the use of write for
           bi-directional communications"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        RDMA/nes: don't leak skb if carrier down
        IB/security: Restrict use of the write() interface
        IB/hfi1: Use kernel default llseek for ui device
        IB/hfi1: Don't attempt to free resources if initialization failed
        IB/hfi1: Fix missing lock/unlock in verbs drain callback
        IB/rdmavt: Fix send scheduling
        IB/hfi1: Prevent unpinning of wrong pages
        IB/hfi1: Fix deadlock caused by locking with wrong scope
        IB/hfi1: Prevent NULL pointer deferences in caching code
        MAINTAINERS: Update iser/isert maintainer contact info
        IB/mlx5: Expose correct max_sge_rd limit
        RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips
        iw_cxgb4: handle draining an idle qp
        iw_cxgb3: initialize ibdev.iwcm->ifname for port mapping
        iw_cxgb4: initialize ibdev.iwcm->ifname for port mapping
        IB/core: Don't drain non-existent rq queue-pair
        IB/core: Fix oops in ib_cache_gid_set_default_gid
      925d96a0
  2. 29 Apr, 2016 32 commits
  3. 28 Apr, 2016 6 commits
    • Sinclair Yeh's avatar
      drm/vmwgfx: Fix order of operation · 7851496a
      Sinclair Yeh authored
      mode->hdisplay * (var->bits_per_pixel + 7) gets evaluated before
      the division, potentially making the pitch larger than it should
      be.
      
      Since the original intention is to do a div-round-up, just use
      the macro instead.
      Signed-off-by: default avatarSinclair Yeh <syeh@vmware.com>
      Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      7851496a
    • Charmaine Lee's avatar
      drm/vmwgfx: use vmw_cmd_dx_cid_check for query commands. · e02e5884
      Charmaine Lee authored
      Instead of calling vmw_cmd_ok, call vmw_cmd_dx_cid_check to
      validate the context id for query commands.
      Signed-off-by: default avatarCharmaine Lee <charmainel@vmware.com>
      Reviewed-by: default avatarSinclair Yeh <syeh@vmware.com>
      e02e5884
    • Charmaine Lee's avatar
      drm/vmwgfx: Enable SVGA_3D_CMD_DX_SET_PREDICATION · 1883598d
      Charmaine Lee authored
      Fixes piglit tests nv_conditional_render-* crashes.
      Signed-off-by: default avatarCharmaine Lee <charmainel@vmware.com>
      Reviewed-by: default avatarBrian Paul <brianp@vmware.com>
      Reviewed-by: default avatarSinclair Yeh <syeh@vmware.com>
      1883598d
    • Jason Gunthorpe's avatar
      IB/security: Restrict use of the write() interface · e6bd18f5
      Jason Gunthorpe authored
      The drivers/infiniband stack uses write() as a replacement for
      bi-directional ioctl().  This is not safe. There are ways to
      trigger write calls that result in the return structure that
      is normally written to user space being shunted off to user
      specified kernel memory instead.
      
      For the immediate repair, detect and deny suspicious accesses to
      the write API.
      
      For long term, update the user space libraries and the kernel API
      to something that doesn't present the same security vulnerabilities
      (likely a structured ioctl() interface).
      
      The impacted uAPI interfaces are generally only available if
      hardware from drivers/infiniband is installed in the system.
      Reported-by: default avatarJann Horn <jann@thejh.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      [ Expanded check to all known write() entry points ]
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      e6bd18f5
    • Dean Luick's avatar
      IB/hfi1: Use kernel default llseek for ui device · 7723d8c2
      Dean Luick authored
      The ui device llseek had a mistake with SEEK_END and did
      not fully follow seek semantics.  Correct all this by
      using a kernel supplied function for fixed size devices.
      
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarDean Luick <dean.luick@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      7723d8c2
    • Mitko Haralanov's avatar
      IB/hfi1: Don't attempt to free resources if initialization failed · 94158442
      Mitko Haralanov authored
      Attempting to free resources which have not been allocated and
      initialized properly led to the following kernel backtrace:
      
          BUG: unable to handle kernel NULL pointer dereference at           (null)
          IP: [<ffffffffa09658fe>] unlock_exp_tids.isra.8+0x2e/0x120 [hfi1]
          PGD 852a43067 PUD 85d4a6067 PMD 0
          Oops: 0000 [#1] SMP
          CPU: 0 PID: 2831 Comm: osu_bw Tainted: G          IO 3.12.18-wfr+ #1
          task: ffff88085b15b540 ti: ffff8808588fe000 task.ti: ffff8808588fe000
          RIP: 0010:[<ffffffffa09658fe>]  [<ffffffffa09658fe>] unlock_exp_tids.isra.8+0x2e/0x120 [hfi1]
          RSP: 0018:ffff8808588ffde0  EFLAGS: 00010282
          RAX: 0000000000000000 RBX: ffff880858a31800 RCX: 0000000000000000
          RDX: ffff88085d971bc0 RSI: ffff880858a318f8 RDI: ffff880858a318c0
          RBP: ffff8808588ffe20 R08: 0000000000000000 R09: 0000000000000000
          R10: ffff88087ffd6f40 R11: 0000000001100348 R12: ffff880852900000
          R13: ffff880858a318c0 R14: 0000000000000000 R15: ffff88085d971be8
          FS:  00007f4674e83740(0000) GS:ffff88087f400000(0000) knlGS:0000000000000000
          CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
          CR2: 0000000000000000 CR3: 000000085c377000 CR4: 00000000001407f0
          Stack:
           ffffffffa0941a71 ffff880858a318f8 ffff88085d971bc0 ffff880858a31800
           ffff880852900000 ffff880858a31800 00000000003ffff7 ffff88085d971bc0
           ffff8808588ffe60 ffffffffa09663fc ffff8808588ffe60 ffff880858a31800
          Call Trace:
           [<ffffffffa0941a71>] ? find_mmu_handler+0x51/0x70 [hfi1]
           [<ffffffffa09663fc>] hfi1_user_exp_rcv_free+0x6c/0x120 [hfi1]
           [<ffffffffa0932809>] hfi1_file_close+0x1a9/0x340 [hfi1]
           [<ffffffff8116c189>] __fput+0xe9/0x270
           [<ffffffff8116c35e>] ____fput+0xe/0x10
           [<ffffffff81065707>] task_work_run+0xa7/0xe0
           [<ffffffff81002969>] do_notify_resume+0x59/0x80
           [<ffffffff814ffc1a>] int_signal+0x12/0x17
      
      This commit re-arranges the context initialization code in a way that
      would allow for context event flags to be used to determine whether
      the context has been successfully initialized.
      
      In turn, this can be used to skip the resource de-allocation if they
      were never allocated in the first place.
      
      Fixes: 3abb33ac ("staging/hfi1: Add TID cache receive init and free funcs")
      Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Signed-off-by: default avatarMitko Haralanov <mitko.haralanov@intel.com>
      Reviewed-by: Leon Romanovsky <leonro@mellanox.com.
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      94158442