1. 26 Jul, 2013 6 commits
    • Linus Torvalds's avatar
      Merge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 8f074a55
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Just a handful of regression and small fixes in ASoC, HD-audio and
        USB-audio drivers.
      
         - Sigmetal HD-audio codec regression fixes
         - A copule of XRUN indication fixes for usb-audio devices
         - ASoC: ep93xx build fix, sgtl5000 fix for probe order changes,
           max98088 register access fix, etc"
      
      * tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hiface: return correct XRUN indication
        ASoC: tegra: correct playback_dma_data setup
        ASoC: core: double free in snd_soc_add_platform()
        ALSA: usb-audio: 6fire: return correct XRUN indication
        ASoC: ep93xx: fix build of ep93xx-ac97.c
        ALSA: hda - Remove NO_PRESENCE bit override for Dell 1420n Laptop
        ALSA: hda - Fix EAPD GPIO control for Sigmatel codecs
        ASoC: atmel-ssc: remove clk_disable_unprepare call from critical section
        ASoC: sgtl5000: defer the probe if clock is not found
        ASoC: max98088 - fix element type of the register cache.
      8f074a55
    • Linus Torvalds's avatar
      Merge tag 'for-linus-v3.11-rc3' of git://oss.sgi.com/xfs/xfs · 6c4155a9
      Linus Torvalds authored
      Pull xfs fix from Ben Myers:
       "Fix for regression in commit cca9f93a ("xfs: don't do IO when
        creating an new inode"), recovery causing filesystem corruption after
        a crash"
      
      * tag 'for-linus-v3.11-rc3' of git://oss.sgi.com/xfs/xfs:
        xfs: di_flushiter considered harmful
      6c4155a9
    • Linus Torvalds's avatar
      Merge branch 'for-3.11' of git://linux-nfs.org/~bfields/linux · f315cf5e
      Linus Torvalds authored
      Pull nfsd fix from Bruce Fields:
       "One more nfsd bugfix for 3.11"
      
      * 'for-3.11' of git://linux-nfs.org/~bfields/linux:
        nfsd: nfsd_open: when dentry_open returns an error do not propagate as struct file
      f315cf5e
    • Linus Torvalds's avatar
      Merge tag 'md/3.11-fixes' of git://neil.brown.name/md · c271f5bc
      Linus Torvalds authored
      Pull md fixes from Neil Brown:
       "Two more bugfixes for md in 3.11
      
        Both marked for -stable, both since 3.3.  I guess I should spend more
        time testing..."
      
      * tag 'md/3.11-fixes' of git://neil.brown.name/md:
        md/raid5: fix interaction of 'replace' and 'recovery'.
        md/raid10: remove use-after-free bug.
      c271f5bc
    • Linus Torvalds's avatar
      Merge branch 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata · c7dad234
      Linus Torvalds authored
      Pull libata fixes from Tejun Heo:
       "Assorted libata updates.
      
        The most critical one is a fix for ahci oops during boot.  Also, a new
        smallish platform ahci driver is added and sata_inic162x is marked
        clearly as experimental (it whines during boot too) as data corruption
        seems rather common on the device and it's unlikely to get any love in
        the foreseeable future.  If the whining doesn't draw any attention, I
        think we'd probably be better of making the driver depend on BROKEN in
        a couple releases"
      
      This is v2 of this pull request with fixed dependencies for ahci_imx.
      
      * 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
        ahci_imx: depend on CONFIG_MFD_SYSCON
        ahci_imx: add ahci sata support on imx platforms
        ARM: imx6q: update the sata bits definitions of gpr13
        ahci: fix Null pointer dereference in achi_host_active()
        libata: make it clear that sata_inic162x is experimental
        libata: replace strict_strtol() with kstrtol()
        ata: Fix DVD not dectected at some platform with Wellsburg PCH
      c7dad234
    • Tejun Heo's avatar
      ahci_imx: depend on CONFIG_MFD_SYSCON · 867974fc
      Tejun Heo authored
      ahci_imx makes use of regmap but the dependency wasn't specified in
      Kconfig leading build failures if CONFIG_AHCI_IMX is enabled but
      CONFIG_MFD_SYSCON is not.  Add the Kconfig dependency.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      867974fc
  2. 25 Jul, 2013 3 commits
    • Dave Chinner's avatar
      xfs: di_flushiter considered harmful · e1b4271a
      Dave Chinner authored
      When we made all inode updates transactional, we no longer needed
      the log recovery detection for inodes being newer on disk than the
      transaction being replayed - it was redundant as replay of the log
      would always result in the latest version of the inode would be on
      disk. It was redundant, but left in place because it wasn't
      considered to be a problem.
      
      However, with the new "don't read inodes on create" optimisation,
      flushiter has come back to bite us. Essentially, the optimisation
      made always initialises flushiter to zero in the create transaction,
      and so if we then crash and run recovery and the inode already on
      disk has a non-zero flushiter it will skip recovery of that inode.
      As a result, log recovery does the wrong thing and we end up with a
      corrupt filesystem.
      
      Because we have to support old kernel to new kernel upgrades, we
      can't just get rid of the flushiter support in log recovery as we
      might be upgrading from a kernel that doesn't have fully transactional
      inode updates.  Unfortunately, for v4 superblocks there is no way to
      guarantee that log recovery knows about this fact.
      
      We cannot add a new inode format flag to say it's a "special inode
      create" because it won't be understood by older kernels and so
      recovery could do the wrong thing on downgrade. We cannot specially
      detect the combination of zero mode/non-zero flushiter on disk to
      non-zero mode, zero flushiter in the log item during recovery
      because wrapping of the flushiter can result in false detection.
      
      Hence that makes this "don't use flushiter" optimisation limited to
      a disk format that guarantees that we don't need it. And that means
      the only fix here is to limit the "no read IO on create"
      optimisation to version 5 superblocks....
      Reported-by: default avatarMarkus Trippelsdorf <markus@trippelsdorf.de>
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarMark Tinguely <tinguely@sgi.com>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      
      (cherry picked from commit e60896d8)
      e1b4271a
    • NeilBrown's avatar
      md/raid5: fix interaction of 'replace' and 'recovery'. · f94c0b66
      NeilBrown authored
      If a device in a RAID4/5/6 is being replaced while another is being
      recovered, then the writes to the replacement device currently don't
      happen, resulting in corruption when the replacement completes and the
      new drive takes over.
      
      This is because the replacement writes are only triggered when
      's.replacing' is set and not when the similar 's.sync' is set (which
      is the case during resync and recovery - it means all devices need to
      be read).
      
      So schedule those writes when s.replacing is set as well.
      
      In this case we cannot use "STRIPE_INSYNC" to record that the
      replacement has happened as that is needed for recording that any
      parity calculation is complete.  So introduce STRIPE_REPLACED to
      record if the replacement has happened.
      
      For safety we should also check that STRIPE_COMPUTE_RUN is not set.
      This has a similar effect to the "s.locked == 0" test.  The latter
      ensure that now IO has been flagged but not started.  The former
      checks if any parity calculation has been flagged by not started.
      We must wait for both of these to complete before triggering the
      'replace'.
      
      Add a similar test to the subsequent check for "are we finished yet".
      This possibly isn't needed (is subsumed in the STRIPE_INSYNC test),
      but it makes it more obvious that the REPLACE will happen before we
      think we are finished.
      
      Finally if a NeedReplace device is not UPTODATE then that is an
      error.  We really must trigger a warning.
      
      This bug was introduced in commit 9a3e1101
      (md/raid5:  detect and handle replacements during recovery.)
      which introduced replacement for raid5.
      That was in 3.3-rc3, so any stable kernel since then would benefit
      from this fix.
      
      Cc: stable@vger.kernel.org (3.3+)
      Reported-by: default avatarqindehua <13691222965@163.com>
      Tested-by: default avatarqindehua <qindehua@163.com>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      f94c0b66
    • NeilBrown's avatar
      md/raid10: remove use-after-free bug. · 0eb25bb0
      NeilBrown authored
      We always need to be careful when calling generic_make_request, as it
      can start a chain of events which might free something that we are
      using.
      
      Here is one place I wasn't careful enough.  If the wbio2 is not in
      use, then it might get freed at the first generic_make_request call.
      So perform all necessary tests first.
      
      This bug was introduced in 3.3-rc3 (24afd80d) and can cause an
      oops, so fix is suitable for any -stable since then.
      
      Cc: stable@vger.kernel.org (3.3+)
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      0eb25bb0
  3. 24 Jul, 2013 31 commits