1. 31 Jul, 2015 2 commits
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · fd56d1d6
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This has a bunch of nouveau fixes, as Ben has been hibernating and has
        lots of small fixes for lots of bugs across nouveau.
      
        Radeon has one major fix for hdmi/dp audio regression that is larger
        than Alex would like, but seems to fix up a fair few bugs, along with
        some misc fixes.
      
        And a few msm fixes, one of which is also a bit large.
      
        But nothing in here seems insane or crazy for this stage, just more
        than I'd like"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (33 commits)
        drm/msm/mdp5: release SMB (shared memory blocks) in various cases
        drm/msm: change to uninterruptible wait in atomic commit
        drm/msm: mdp4: Fix drm_framebuffer dereference crash
        drm/msm: fix msm_gem_prime_get_sg_table()
        drm/amdgpu: add new parameter to seperate map and unmap
        drm/amdgpu: hdp_flush is not needed for inside IB
        drm/amdgpu: different emit_ib for gfx and compute
        drm/amdgpu: information leak in amdgpu_info_ioctl()
        drm/amdgpu: clean up init sequence for failures
        drm/radeon/combios: add some validation of lvds values
        drm/radeon: rework audio modeset to handle non-audio hdmi features
        drm/radeon: rework audio detect (v4)
        drm/amdgpu: Drop drm/ prefix for including drm.h in amdgpu_drm.h
        drm/radeon: Drop drm/ prefix for including drm.h in radeon_drm.h
        drm/nouveau/nouveau/ttm: fix tiled system memory with Maxwell
        drm/nouveau/kms/nv50-: guard against enabling cursor on disabled heads
        drm/nouveau/fbcon/g80: reduce PUSH_SPACE alloc, fire ring on accel init
        drm/nouveau/fbcon/gf100-: reduce RING_SPACE allocation
        drm/nouveau/fbcon/nv11-: correctly account for ring space usage
        drm/nouveau/bios: add proper support for opcode 0x59
        ...
      fd56d1d6
    • Linus Torvalds's avatar
      Merge tag 'xfs-for-linus-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs · 84009357
      Linus Torvalds authored
      Pull xfs fixes from Dave Chinner:
       "There are a couple of recently found, long standing remote attribute
        corruption fixes caused by log recovery getting confused after a
        crash, and the new DAX code in XFS (merged in 4.2-rc1) needs to
        actually use the DAX fault path on read faults.
      
        Summary:
      
         - remote attribute log recovery corruption fixes
      
         - DAX page faults need to use direct mappings, not a page cache
           mapping"
      
      * tag 'xfs-for-linus-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs:
        xfs: remote attributes need to be considered data
        xfs: remote attribute headers contain an invalid LSN
        xfs: call dax_fault on read page faults for DAX
      84009357
  2. 30 Jul, 2015 8 commits
  3. 29 Jul, 2015 24 commits
    • Wentao Xu's avatar
      drm/msm/mdp5: release SMB (shared memory blocks) in various cases · b4cba04f
      Wentao Xu authored
      Release all blocks after the pipe is disabled, even when vsync
      didn't happen in some error cases. Allow requesting SMB multiple
      times before configuring to hardware, by releasing blocks not
      programmed to hardware yet for shrinking case.
      
      This fixes a potential leak of shared memory pool blocks.
      Signed-off-by: default avatarWentao Xu <wentaox@codeaurora.org>
      Tested-by: default avatarArchit Taneja <architt@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      b4cba04f
    • Wentao Xu's avatar
      drm/msm: change to uninterruptible wait in atomic commit · 99fc1bc4
      Wentao Xu authored
      The atomic commit cannot easily undo and return an error once the
      state is swapped. Change to uninterruptible wait, and ignore the
      timeout error.
      Signed-off-by: default avatarWentao Xu <wentaox@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      99fc1bc4
    • Archit Taneja's avatar
      drm/msm: mdp4: Fix drm_framebuffer dereference crash · a1c3e3e0
      Archit Taneja authored
      mdp4_get_frame_format() can dereference a drm_framebuffer when it's NULL.
      Call it in mdp4_plane_mode_set only when we know fb is non-NULL.
      Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      a1c3e3e0
    • Rob Clark's avatar
      drm/msm: fix msm_gem_prime_get_sg_table() · ac451467
      Rob Clark authored
      We need to return a new sgt, since the caller takes ownership of it.
      Reported-by: default avatarStanimir Varbanov <svarbanov@mm-sol.com>
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      ac451467
    • monk.liu's avatar
    • monk.liu's avatar
      drm/amdgpu: hdp_flush is not needed for inside IB · e722b71a
      monk.liu authored
      hdp flush is not needed for IBs that dispatched from kernel inside
      because there is no video memory host access
      Signed-off-by: default avatarmonk.liu <monk.liu@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      e722b71a
    • monk.liu's avatar
      drm/amdgpu: different emit_ib for gfx and compute · 93323131
      monk.liu authored
      compute ring didn't use const engine byfar, so ignore CE things in
      compute routine
      Signed-off-by: default avatarmonk.liu <monk.liu@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      93323131
    • Dan Carpenter's avatar
      drm/amdgpu: information leak in amdgpu_info_ioctl() · c193fa91
      Dan Carpenter authored
      We recently changed the drm_amdgpu_info_device struct so now there is
      a 4 byte hole at the end.  We need to initialize it so we don't disclose
      secret information from the stack.
      
      Fixes: fa92754e ('drm/amdgpu: add VCE harvesting instance query')
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      c193fa91
    • Alex Deucher's avatar
      drm/amdgpu: clean up init sequence for failures · 8faf0e08
      Alex Deucher authored
      If we fail during device init, record what state each
      block is in so that we can tear down clearly.
      
      Fixes various problems on device init failure.
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      8faf0e08
    • Alex Deucher's avatar
      drm/radeon/combios: add some validation of lvds values · 0a90a0cf
      Alex Deucher authored
      Fixes a broken hsync start value uncovered by:
      abc0b144
      (drm: Perform basic sanity checks on probed modes)
      
      The driver handled the bad hsync start elsewhere, but
      the above commit prevented it from getting added.
      
      bug:
      https://bugs.freedesktop.org/show_bug.cgi?id=91401Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      0a90a0cf
    • Alex Deucher's avatar
      drm/radeon: rework audio modeset to handle non-audio hdmi features · 7726e72b
      Alex Deucher authored
      Need to setup the deep color and avi packets regardless of
      audio setup.
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      7726e72b
    • Alex Deucher's avatar
      drm/radeon: rework audio detect (v4) · d0ea397e
      Alex Deucher authored
      1. Always assign audio function pointers even if the display does
      not support audio.  We need to properly disable the audio stream
      when when using a non-audio capable monitor.  Fixes purple line
      on some hdmi monitors.
      
      2. Check if a pin is in use by another encoder before disabling
      it.
      
      v2: make sure we've fetched the edid before checking audio and
          look up the encoder before calling audio_detect since
          connector->encoder may not be assigned yet.  Separate
          pin and afmt.  They are allocated at different times and
          have no dependency on eachother.
      v3: fix connector fetching in encoder functions
      v4: fix missed dig->pin check in dce6_afmt_write_latency_fields
      
      bugs:
      https://bugzilla.kernel.org/show_bug.cgi?id=93701
      https://bugzilla.redhat.com/show_bug.cgi?id=1236337
      https://bugs.freedesktop.org/show_bug.cgi?id=91041Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      d0ea397e
    • Michel Dänzer's avatar
      drm/amdgpu: Drop drm/ prefix for including drm.h in amdgpu_drm.h · b3fcf36a
      Michel Dänzer authored
      This allows amdgpu_drm.h to be reused verbatim in libdrm.
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
      b3fcf36a
    • Michel Dänzer's avatar
      drm/radeon: Drop drm/ prefix for including drm.h in radeon_drm.h · e13af53e
      Michel Dänzer authored
      This allows radeon_drm.h to be reused verbatim in libdrm.
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
      e13af53e
    • Mike Snitzer's avatar
      dm cache: fix device destroy hang due to improper prealloc_used accounting · 795e633a
      Mike Snitzer authored
      Commit 665022d7 ("dm cache: avoid calls to prealloc_free_structs() if
      possible") introduced a regression that caused the removal of a DM cache
      device to hang in cache_postsuspend()'s call to wait_for_migrations()
      with the following stack trace:
      
        [<ffffffff81651457>] schedule+0x37/0x80
        [<ffffffffa041e21b>] cache_postsuspend+0xbb/0x470 [dm_cache]
        [<ffffffff810ba970>] ? prepare_to_wait_event+0xf0/0xf0
        [<ffffffffa0006f77>] dm_table_postsuspend_targets+0x47/0x60 [dm_mod]
        [<ffffffffa0001eb5>] __dm_destroy+0x215/0x250 [dm_mod]
        [<ffffffffa0004113>] dm_destroy+0x13/0x20 [dm_mod]
        [<ffffffffa00098cd>] dev_remove+0x10d/0x170 [dm_mod]
        [<ffffffffa00097c0>] ? dev_suspend+0x240/0x240 [dm_mod]
        [<ffffffffa0009f85>] ctl_ioctl+0x255/0x4d0 [dm_mod]
        [<ffffffff8127ac00>] ? SYSC_semtimedop+0x280/0xe10
        [<ffffffffa000a213>] dm_ctl_ioctl+0x13/0x20 [dm_mod]
        [<ffffffff811fd432>] do_vfs_ioctl+0x2d2/0x4b0
        [<ffffffff81117d5f>] ? __audit_syscall_entry+0xaf/0x100
        [<ffffffff81022636>] ? do_audit_syscall_entry+0x66/0x70
        [<ffffffff811fd689>] SyS_ioctl+0x79/0x90
        [<ffffffff81023e58>] ? syscall_trace_leave+0xb8/0x110
        [<ffffffff81654f6e>] entry_SYSCALL_64_fastpath+0x12/0x71
      
      Fix this by accounting for the call to prealloc_data_structs()
      immediately _before_ the call as opposed to after.  This is needed
      because it is possible to break out of the control loop after the call
      to prealloc_data_structs() but before prealloc_used was set to true.
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      795e633a
    • Mike Snitzer's avatar
      Revert "dm cache: do not wake_worker() in free_migration()" · 3508e659
      Mike Snitzer authored
      This reverts commit 386cb7cd.
      
      Taking the wake_worker() out of free_migration() will slow writeback
      dramatically, and hence adaptability.
      
      Say we have 10k blocks that need writing back, but are only able to
      issue 5 concurrently due to the migration bandwidth: it's imperative
      that we wake_worker() immediately after migration completion; waiting
      for the next 1 second wake up (via do_waker) means it'll take a long
      time to write that all back.
      Reported-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      3508e659
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 86ea07ca
      Linus Torvalds authored
      Pull s390 fixes from Martin Schwidefsky:
       "Two bug fixes:
      
         - fix a crash on pre-z10 hardware due to cache-info
      
         - fix an issue with classic BPF programs in the eBPF JIT"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/cachinfo: add missing facility check to init_cache_level()
        s390/bpf: clear correct BPF accumulator register
      86ea07ca
    • Linus Torvalds's avatar
      Merge tag 'vfio-v4.2-rc5' of git://github.com/awilliam/linux-vfio · d9065f44
      Linus Torvalds authored
      Pull VFIO fix from Alex Williamson:
       "Fix a lockdep reported deadlock in device open error path"
      
      * tag 'vfio-v4.2-rc5' of git://github.com/awilliam/linux-vfio:
        vfio: Fix lockdep issue
      d9065f44
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · 733db573
      Linus Torvalds authored
      Pull SCSI target fixes from Nicholas Bellinger:
       "This series is larger than what I'd normally be conformable with
        sending for a -rc5 PULL request..
      
        However, the bulk of the series is localized to qla2xxx target
        specific fixes that address a number of real-world correctness issues,
        that have been outstanding on the list for ~6 weeks now.  They where
        submitted + verified + acked by the HW LLD vendor, contributed by a
        major production customer of the code, and are marked for v3.18.y
        stable code.
      
        That said, I don't see a good reason to wait another month to get
        these fixes into mainline.
      
        Beyond the qla2xx specific fixes, this series also includes:
      
         - bugfix for a long standing use-after-free in iscsi-target during
           TPG shutdown + demo-mode sessions.
      
         - bugfix for a >= v4.0 regression OOPs in iscsi-target during a
           iscsi_start_kthreads() failure.
      
         - bugfix for a >= v4.0 regression hang in iscsi-target for iser
           explicit session/connection logout.
      
         - bugfix for a iser-target bug where a early CMA REJECTED status
           during login triggers a NULL pointer dereference OOPs.
      
         - bugfixes for a handful of v4.2-rc1 specific regressions related to
           the larger set of recent backend configfs attribute changes.
      
        A big thanks to QLogic + Pure Storage for the qla2xxx target bugfixes"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (28 commits)
        Documentation/target: Fix tcm_mod_builder.py build breakage
        iser-target: Fix REJECT CM event use-after-free OOPs
        iscsi-target: Fix iser explicit logout TX kthread leak
        iscsi-target: Fix iscsit_start_kthreads failure OOPs
        iscsi-target: Fix use-after-free during TPG session shutdown
        qla2xxx: terminate exchange when command is aborted by LIO
        qla2xxx: drop cmds/tmrs arrived while session is being deleted
        qla2xxx: disable scsi_transport_fc registration in target mode
        qla2xxx: added sess generations to detect RSCN update races
        qla2xxx: Abort stale cmds on qla_tgt_wq when plogi arrives
        qla2xxx: delay plogi/prli ack until existing sessions are deleted
        qla2xxx: cleanup cmd in qla workqueue before processing TMR
        qla2xxx: kill sessions/log out initiator on RSCN and port down events
        qla2xxx: fix command initialization in target mode.
        qla2xxx: Remove msleep in qlt_send_term_exchange
        qla2xxx: adjust debug flags
        qla2xxx: release request queue reservation.
        qla2xxx: Add flush after updating ATIOQ consumer index.
        qla2xxx: Enable target mode for ISP27XX
        qla2xxx: Fix hardware lock/unlock issue causing kernel panic.
        ...
      733db573
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpufreq' and 'acpi-pm' · d29809b8
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: Avoid attempts to create duplicate symbolic links
        intel_pstate: Add get_scaling cpu_defaults param to Knights Landing
      
      * acpi-pm:
        ACPI / PM: Use target_state to set the device power state
      d29809b8
    • Dave Airlie's avatar
      Merge branch 'linux-4.2' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes · 520e8bfc
      Dave Airlie authored
      Two more nouveau fixes.
      
      * 'linux-4.2' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
        drm/nouveau/nouveau/ttm: fix tiled system memory with Maxwell
        drm/nouveau/kms/nv50-: guard against enabling cursor on disabled heads
      520e8bfc
    • Dave Chinner's avatar
      xfs: remote attributes need to be considered data · df150ed1
      Dave Chinner authored
      We don't log remote attribute contents, and instead write them
      synchronously before we commit the block allocation and attribute
      tree update transaction. As a result we are writing to the allocated
      space before the allcoation has been made permanent.
      
      As a result, we cannot consider this allocation to be a metadata
      allocation. Metadata allocation can take blocks from the free list
      and so reuse them before the transaction that freed the block is
      committed to disk. This behaviour is perfectly fine for journalled
      metadata changes as log recovery will ensure the free operation is
      replayed before the overwrite, but for remote attribute writes this
      is not the case.
      
      Hence we have to consider the remote attribute blocks to contain
      data and allocate accordingly. We do this by dropping the
      XFS_BMAPI_METADATA flag from the block allocation. This means the
      allocation will not use blocks that are on the busy list without
      first ensuring that the freeing transaction has been committed to
      disk and the blocks removed from the busy list. This ensures we will
      never overwrite a freed block without first ensuring that it is
      really free.
      
      cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      
      df150ed1
    • Dave Chinner's avatar
      xfs: remote attribute headers contain an invalid LSN · e3c32ee9
      Dave Chinner authored
      In recent testing, a system that crashed failed log recovery on
      restart with a bad symlink buffer magic number:
      
      XFS (vda): Starting recovery (logdev: internal)
      XFS (vda): Bad symlink block magic!
      XFS: Assertion failed: 0, file: fs/xfs/xfs_log_recover.c, line: 2060
      
      On examination of the log via xfs_logprint, none of the symlink
      buffers in the log had a bad magic number, nor were any other types
      of buffer log format headers mis-identified as symlink buffers.
      Tracing was used to find the buffer the kernel was tripping over,
      and xfs_db identified it's contents as:
      
      000: 5841524d 00000000 00000346 64d82b48 8983e692 d71e4680 a5f49e2c b317576e
      020: 00000000 00602038 00000000 006034ce d0020000 00000000 4d4d4d4d 4d4d4d4d
      040: 4d4d4d4d 4d4d4d4d 4d4d4d4d 4d4d4d4d 4d4d4d4d 4d4d4d4d 4d4d4d4d 4d4d4d4d
      060: 4d4d4d4d 4d4d4d4d 4d4d4d4d 4d4d4d4d 4d4d4d4d 4d4d4d4d 4d4d4d4d 4d4d4d4d
      .....
      
      This is a remote attribute buffer, which are notable in that they
      are not logged but are instead written synchronously by the remote
      attribute code so that they exist on disk before the attribute
      transactions are committed to the journal.
      
      The above remote attribute block has an invalid LSN in it - cycle
      0xd002000, block 0 - which means when log recovery comes along to
      determine if the transaction that writes to the underlying block
      should be replayed, it sees a block that has a future LSN and so
      does not replay the buffer data in the transaction. Instead, it
      validates the buffer magic number and attaches the buffer verifier
      to it.  It is this buffer magic number check that is failing in the
      above assert, indicating that we skipped replay due to the LSN of
      the underlying buffer.
      
      The problem here is that the remote attribute buffers cannot have a
      valid LSN placed into them, because the transaction that contains 
      the attribute tree pointer changes and the block allocation that the
      attribute data is being written to hasn't yet been committed. Hence
      the LSN field in the attribute block is completely unwritten,
      thereby leaving the underlying contents of the block in the LSN
      field. It could have any value, and hence a future overwrite of the
      block by log recovery may or may not work correctly.
      
      Fix this by always writing an invalid LSN to the remote attribute
      block, as any buffer in log recovery that needs to write over the
      remote attribute should occur. We are protected from having old data
      written over the attribute by the fact that freeing the block before
      the remote attribute is written will result in the buffer being
      marked stale in the log and so all changes prior to the buffer stale
      transaction will be cancelled by log recovery.
      
      Hence it is safe to ignore the LSN in the case or synchronously
      written, unlogged metadata such as remote attribute blocks, and to
      ensure we do that correctly, we need to write an invalid LSN to all
      remote attribute blocks to trigger immediate recovery of metadata
      that is written over the top.
      
      As a further protection for filesystems that may already have remote
      attribute blocks with bad LSNs on disk, change the log recovery code
      to always trigger immediate recovery of metadata over remote
      attribute blocks.
      
      cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      e3c32ee9
    • Dave Chinner's avatar
      xfs: call dax_fault on read page faults for DAX · b2442c5a
      Dave Chinner authored
      When modifying the patch series to handle the XFS MMAP_LOCK nesting
      of page faults, I botched the conversion of the read page fault
      path, and so it is only every calling through the page cache. Re-add
      the necessary __dax_fault() call for such files.
      
      Because the get_blocks callback on read faults may not set up the
      mapping buffer correctly to allow unwritten extent completion to be
      run, we need to allow callers of __dax_fault() to pass a null
      complete_unwritten() callback. The DAX code always zeros the
      unwritten page when it is read faulted so there are no stale data
      exposure issues with not doing the conversion. The only downside
      will be the potential for increased CPU overhead on repeated read
      faults of the same page. If this proves to be a problem, then the
      filesystem needs to fix it's get_block callback and provide a
      convert_unwritten() callback to the read fault path.
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarMatthew Wilcox <willy@linux.intel.com>
      Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
      Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
      b2442c5a
  4. 28 Jul, 2015 6 commits