1. 30 5月, 2015 8 次提交
    • L
      Merge tag 'dm-4.1-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm · 0f1e5b5d
      Linus Torvalds 提交于
      Pull device-mapper fixes from Mike Snitzer:
       "Quite a few fixes for DM's blk-mq support thanks to extra DM multipath
        testing from Junichi Nomura and Bart Van Assche.
      
        Also fix a casting bug in dm_merge_bvec() that could cause only a
        single page to be added to a bio (Joe identified this while testing
        dm-cache writeback)"
      
      * tag 'dm-4.1-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm: fix casting bug in dm_merge_bvec()
        dm: fix reload failure of 0 path multipath mapping on blk-mq devices
        dm: fix false warning in free_rq_clone() for unmapped requests
        dm: requeue from blk-mq dm_mq_queue_rq() using BLK_MQ_RQ_QUEUE_BUSY
        dm mpath: fix leak of dm_mpath_io structure in blk-mq .queue_rq error path
        dm: fix NULL pointer when clone_and_map_rq returns !DM_MAPIO_REMAPPED
        dm: run queue on re-queue
      0f1e5b5d
    • L
      Merge branch 'akpm' (patches from Andrew) · c2102f3d
      Linus Torvalds 提交于
      Merge misc fixes from Andrew Morton:
       "10 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        scripts/gdb: fix lx-lsmod refcnt
        omfs: fix potential integer overflow in allocator
        omfs: fix sign confusion for bitmap loop counter
        omfs: set error return when d_make_root() fails
        fs, omfs: add NULL terminator in the end up the token list
        MAINTAINERS: update CAPABILITIES pattern
        fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings
        tracing/mm: don't trace mm_page_pcpu_drain on offline cpus
        tracing/mm: don't trace mm_page_free on offline cpus
        tracing/mm: don't trace kmem_cache_free on offline cpus
      c2102f3d
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · 6e49ba1b
      Linus Torvalds 提交于
      Pull fixes for cpumask and modules from Rusty Russell:
       "** NOW WITH TESTING! **
      
        Two fixes which got lost in my recent distraction.  One is a weird
        cpumask function which needed to be rewritten, the other is a module
        bug which is cc:stable"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        cpumask_set_cpu_local_first => cpumask_local_spread, lament
        module: Call module notifier on failure after complete_formation()
      6e49ba1b
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · d0af6988
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "This is made up 4 groups of fixes detailed below.
      
        vgem:
            Due to some misgivings about possible bad use cases this allow,
            backout a chunk of the interface to stop those use cases for now.
      
        radeon:
            Fix for an oops regression in the audio code, and a partial revert
            for a fix that was cauing problems.
      
        nouveau:
            regression fix for Fermi, and display-less Maxwell boot fixes.
      
        drm core:
            a fix for i915 cursor vblank waiting in the atomic helpers"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/nouveau/gr/gm204: remove a stray printk
        drm/nouveau/devinit/gm100-: force devinit table execution on boards without PDISP
        drm/nouveau/devinit/gf100: make the force-post condition more obvious
        drm/nouveau/gr/gf100-: fix wrong constant definition
        drm/radeon: partially revert "fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling"
        drm/radeon/audio: make sure connector is valid in hotplug case
        Revert "drm/radeon: only mark audio as connected if the monitor supports it (v3)"
        drm/radeon: don't share plls if monitors differ in audio support
        drm/vgem: drop DRIVER_PRIME (v2)
        drm/plane-helper: Adapt cursor hack to transitional helpers
      d0af6988
    • L
      Merge tag 'sound-4.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 70946b5d
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "No big surprise here, just a bunch of small fixes for HD-audio and
        USB-audio:
      
         - partial revert of widget power-saving for IDT codecs
         - revert mute-LED enum ctl for Thinkpads due to confusion
         - a quirk for a new Radeon HDMI controller
         - Realtek codec name fix for Dell
         - a workaround for headphone mic boost on some laptops
         - stream_pm ops setup (and its fix for regression)
         - another quirk for MS LifeCam USB-audio"
      
      * tag 'sound-4.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Fix lost sound due to stream_pm ops cleanup
        ALSA: hda - Disable Headphone Mic boost for ALC662
        ALSA: hda - Disable power_save_node for IDT92HD71bxx
        ALSA: hda - Fix noise on AMD radeon 290x controller
        ALSA: hda - Set stream_pm ops automatically by generic parser
        ALSA: hda/realtek - Add ALC256 alias name for Dell
        Revert "ALSA: hda - Add mute-LED mode control to Thinkpad"
        ALSA: usb-audio: Add quirk for MS LifeCam HD-3000
      70946b5d
    • J
      dm: fix casting bug in dm_merge_bvec() · 1c220c69
      Joe Thornber 提交于
      dm_merge_bvec() was originally added in f6fccb ("dm: introduce
      merge_bvec_fn").  In that commit a value in sectors is converted to
      bytes using << 9, and then assigned to an int.  This code made
      assumptions about the value of BIO_MAX_SECTORS.
      
      A later commit 148e51 ("dm: improve documentation and code clarity in
      dm_merge_bvec") was meant to have no functional change but it removed
      the use of BIO_MAX_SECTORS in favor of using queue_max_sectors().  At
      this point the cast from sector_t to int resulted in a zero value.  The
      fallout being dm_merge_bvec() would only allow a single page to be added
      to a bio.
      
      This interim fix is minimal for the benefit of stable@ because the more
      comprehensive cleanup of passing a sector_t to all DM targets' merge
      function will impact quite a few DM targets.
      Signed-off-by: NJoe Thornber <ejt@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org # 3.19+
      1c220c69
    • J
      dm: fix reload failure of 0 path multipath mapping on blk-mq devices · 15b94a69
      Junichi Nomura 提交于
      dm-multipath accepts 0 path mapping.
      
        # echo '0 2097152 multipath 0 0 0 0' | dmsetup create newdev
      
      Such a mapping can be used to release underlying devices while still
      holding requests in its queue until working paths come back.
      
      However, once the multipath device is created over blk-mq devices,
      it rejects reloading of 0 path mapping:
      
        # echo '0 2097152 multipath 0 0 1 1 queue-length 0 1 1 /dev/sda 1' \
            | dmsetup create mpath1
        # echo '0 2097152 multipath 0 0 0 0' | dmsetup load mpath1
        device-mapper: reload ioctl on mpath1 failed: Invalid argument
        Command failed
      
      With following kernel message:
        device-mapper: ioctl: can't change device type after initial table load.
      
      DM tries to inherit the current table type using dm_table_set_type()
      but it doesn't work as expected because of unnecessary check about
      whether the target type is hybrid or not.
      
      Hybrid type is for targets that work as either request-based or bio-based
      and not required for blk-mq or non blk-mq checking.
      
      Fixes: 65803c20 ("dm table: train hybrid target type detection to select blk-mq if appropriate")
      Signed-off-by: NJun'ichi Nomura <j-nomura@ce.jp.nec.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      15b94a69
    • L
      Merge tag 'md/4.1-rc5-fixes' of git://neil.brown.name/md · c492e2d4
      Linus Torvalds 提交于
      Pull m,ore md bugfixes gfrom Neil Brown:
       "Assorted fixes for new RAID5 stripe-batching functionality.
      
        Unfortunately this functionality was merged a little prematurely.  The
        necessary testing and code review is now complete (or as complete as
        it can be) and to code passes a variety of tests and looks quite
        sensible.
      
        Also a fix for some recent locking changes - a race was introduced
        which causes a reshape request to sometimes fail.  No data safety
        issues"
      
      * tag 'md/4.1-rc5-fixes' of git://neil.brown.name/md:
        md: fix race when unfreezing sync_action
        md/raid5: break stripe-batches when the array has failed.
        md/raid5: call break_stripe_batch_list from handle_stripe_clean_event
        md/raid5: be more selective about distributing flags across batch.
        md/raid5: add handle_flags arg to break_stripe_batch_list.
        md/raid5: duplicate some more handle_stripe_clean_event code in break_stripe_batch_list
        md/raid5: remove condition test from check_break_stripe_batch_list.
        md/raid5: Ensure a batch member is not handled prematurely.
        md/raid5: close race between STRIPE_BIT_DELAY and batching.
        md/raid5: ensure whole batch is delayed for all required bitmap updates.
      c492e2d4
  2. 29 5月, 2015 20 次提交
  3. 28 5月, 2015 12 次提交
    • C
      drm/radeon: partially revert "fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling" · 7c0411d2
      Christian König 提交于
      We have that bug for years and some users report side effects when fixing it on older hardware.
      
      So revert it for VM_CONTEXT0_PAGE_TABLE_END_ADDR, but keep it for VM 1-15.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      CC: stable@vger.kernel.org
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      7c0411d2
    • D
      ALSA: hda - Disable Headphone Mic boost for ALC662 · b40eda64
      David Henningsson 提交于
      When headphone mic boost is above zero, some 10 - 20 second delay
      might occur before the headphone mic is operational.
      Therefore disable the headphone mic boost control (recording gain is
      sufficient even without it).
      
      (Note: this patch is not about the headset mic, it's about the less
      common mic-in only mode.)
      
      BugLink: https://bugs.launchpad.net/bugs/1454235Suggested-by: NKailang Yang <kailang@realtek.com>
      Signed-off-by: NDavid Henningsson <david.henningsson@canonical.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b40eda64
    • N
      md: fix race when unfreezing sync_action · 56ccc112
      NeilBrown 提交于
      A recent change removed the need for locking around writing
      to "sync_action" (and various other places), but introduced a
      subtle race.
      When e.g. setting 'reshape' on a 'frozen' array, the 'frozen'
      flag is cleared before 'reshape' is set, so the md thread can
      get in and start trying recovery - which isn't wanted.
      
      So instead of clearing MD_RECOVERY_FROZEN for any command
      except 'frozen', only clear it when each specific command
      is parsed.  This allows the handling of 'reshape' to clear
      the bit while a lock is held.
      
      Also remove some places where we set MD_RECOVERY_NEEDED,
      as it is always set on non-error exit of the function.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Fixes: 6791875e ("md: make reconfig_mutex optional for writes to md sysfs files.")
      56ccc112
    • N
      md/raid5: break stripe-batches when the array has failed. · 626f2092
      NeilBrown 提交于
      Once the array has too much failure, we need to break
      stripe-batches up so they can all be dealt with.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      626f2092
    • N
      md/raid5: call break_stripe_batch_list from handle_stripe_clean_event · 787b76fa
      NeilBrown 提交于
      Now that the code in break_stripe_batch_list() is nearly identical
      to the end of handle_stripe_clean_event, replace the later
      with a function call.
      
      The only remaining difference of any interest is the masking that is
      applieds to dev[i].flags copied from head_sh.
      R5_WriteError certainly isn't wanted as it is set per-stripe, not
      per-patch.  R5_Overlap isn't wanted as it is explicitly handled.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      787b76fa
    • N
      md/raid5: be more selective about distributing flags across batch. · 1b956f7a
      NeilBrown 提交于
      When a batch of stripes is broken up, we keep some of the flags
      that were per-stripe, and copy other flags from the head to all
      others.
      
      This only happens while a stripe is being handled, so many of the
      flags are irrelevant.
      
      The "SYNC_FLAGS" (which I've renamed to make it clear there are
      several) and STRIPE_DEGRADED are set per-stripe and so need to be
      preserved.  STRIPE_INSYNC is the only flag that is set on the head
      that needs to be propagated to all others.
      
      For safety, add a WARN_ON if others are set, except:
       STRIPE_HANDLE - this is safe and per-stripe and we are going to set
            in several cases anyway
       STRIPE_INSYNC
       STRIPE_IO_STARTED - this is just a hint and doesn't hurt.
       STRIPE_ON_PLUG_LIST
       STRIPE_ON_RELEASE_LIST - It is a point pointless for a batched
                 stripe to be on one of these lists, but it can happen
                 as can be safely ignored.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      1b956f7a
    • N
      md/raid5: add handle_flags arg to break_stripe_batch_list. · 3960ce79
      NeilBrown 提交于
      When we break a stripe_batch_list we sometimes want to set
      STRIPE_HANDLE on the individual stripes, and sometimes not.
      
      So pass a 'handle_flags' arg.  If it is zero, always set STRIPE_HANDLE
      (on non-head stripes).  If not zero, only set it if any of the given
      flags are present.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      3960ce79
    • N
      md/raid5: duplicate some more handle_stripe_clean_event code in break_stripe_batch_list · fb642b92
      NeilBrown 提交于
      break_stripe_batch list didn't clear head_sh->batch_head.
      This was probably a bug.
      
      Also clear all R5_Overlap flags and if any were cleared, wake up
      'wait_for_overlap'.
      This isn't always necessary but the worst effect is a little
      extra checking for code that is waiting on wait_for_overlap.
      
      Also, don't use wake_up_nr() because that does the wrong thing
      if 'nr' is zero, and it number of flags cleared doesn't
      strongly correlate with the number of threads to wake.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      fb642b92
    • N
      md/raid5: remove condition test from check_break_stripe_batch_list. · 4e3d62ff
      NeilBrown 提交于
      handle_stripe_clean_event() contains a chunk of code very
      similar to check_break_stripe_batch_list().
      If we make the latter more like the former, we can end up
      with just one copy of this code.
      
      This  first step removed the condition (and the 'check_') part
      of the name.  This has the added advantage of making it clear
      what check is being performed at the point where the function is
      called.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      4e3d62ff
    • N
      md/raid5: Ensure a batch member is not handled prematurely. · b15a9dbd
      NeilBrown 提交于
      If a stripe is a member of a batch, but not the head, it must
      not be handled separately from the rest of the batch.
      
      'clear_batch_ready()' handles this requirement to some
      extent but not completely.  If a member is passed to handle_stripe()
      a second time it returns '0' indicating the stripe can be handled,
      which is wrong.
      So add an extra test.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      b15a9dbd
    • R
      cpumask_set_cpu_local_first => cpumask_local_spread, lament · f36963c9
      Rusty Russell 提交于
      da91309e (cpumask: Utility function to set n'th cpu...) created a
      genuinely weird function.  I never saw it before, it went through DaveM.
      (He only does this to make us other maintainers feel better about our own
      mistakes.)
      
      cpumask_set_cpu_local_first's purpose is say "I need to spread things
      across N online cpus, choose the ones on this numa node first"; you call
      it in a loop.
      
      It can fail.  One of the two callers ignores this, the other aborts and
      fails the device open.
      
      It can fail in two ways: allocating the off-stack cpumask, or through a
      convoluted codepath which AFAICT can only occur if cpu_online_mask
      changes.  Which shouldn't happen, because if cpu_online_mask can change
      while you call this, it could return a now-offline cpu anyway.
      
      It contains a nonsensical test "!cpumask_of_node(numa_node)".  This was
      drawn to my attention by Geert, who said this causes a warning on Sparc.
      It sets a single bit in a cpumask instead of returning a cpu number,
      because that's what the callers want.
      
      It could be made more efficient by passing the previous cpu rather than
      an index, but that would be more invasive to the callers.
      
      Fixes: da91309e
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (then rebased)
      Tested-by: NAmir Vadai <amirv@mellanox.com>
      Acked-by: NAmir Vadai <amirv@mellanox.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      f36963c9
    • N
      md/raid5: close race between STRIPE_BIT_DELAY and batching. · d0852df5
      NeilBrown 提交于
      When we add a write to a stripe we need to make sure the bitmap
      bit is set.  While doing that the stripe is not locked so it could
      be added to a batch after which further changes to STRIPE_BIT_DELAY
      and ->bm_seq are ineffective.
      
      So we need to hold off adding to a stripe until bitmap_startwrite has
      completed at least once, and we need to avoid further changes to
      STRIPE_BIT_DELAY once the stripe has been added to a batch.
      
      If a bitmap_startwrite() completes after the stripe was added to a
      batch, it will not have set the bit, only incremented a counter, so no
      extra delay of the stripe is needed.
      Reported-by: NShaohua Li <shli@kernel.org>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      d0852df5