1. 10 Feb, 2012 3 commits
    • Yinghai Lu's avatar
      PCI: Fix pci cardbus removal · 3682a394
      Yinghai Lu authored
      During test busn_res allocation with cardbus, found pci card removal is not
      working anymore, and it turns out it is broken by:
      
      |commit 79cc9601
      |Date:   Tue Nov 22 21:06:53 2011 -0800
      |
      |    PCI: Only call pci_stop_bus_device() one time for child devices at remove
      
      The above changed the behavior of pci_remove_behind_bridge that
      yenta_cardbus depended on.  So restore the old behavoir of
      pci_remove_behind_bridge (which requires stopping and removing of all
      devices) by:
      
      1. rename pci_remove_behind_bridge to __pci_remove_behind_bridge, and let
         __pci_remove_bus_device() call it instead.
      2. add pci_stop_behind_bridge that will stop devices behind a bridge
      3. add back pci_remove_behind_bridge that will stop and remove devices
         under bridge.
      
      -v2: update commit description a little bit.
      Tested-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      3682a394
    • Vaidyanathan Srinivasan's avatar
      PCI: set pci sriov page size before reading SRIOV BAR · 8161fe91
      Vaidyanathan Srinivasan authored
      For an SRIOV device, PCI_SRIOV_SYS_PGSIZE should be set before
      the PCI_SRIOV_BAR are queried.  The sys pagesize defaults to 4k,
      so this change is required on powerpc box with 64k base page size.
          
      This is a regression caused due to moving SRIOV init to sriov_enable().
          
      | commit afd24ece
      | Author: Ram Pai <linuxram@us.ibm.com>
          
      | PCI: delay configuration of SRIOV capability
      | The SRIOV capability, namely page size and total_vfs of a device are
      | configured during enumeration phase of the device.  This can potentially
      | interfere with the PCI operations of the platform, if the IOV capability
      | of the device is not enabled.
      Signed-off-by: default avatarVaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
      Acked-by: default avatarRam Pai <linuxram@us.ibm.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      8161fe91
    • Yinghai Lu's avatar
      PCI: workaround hard-wired bus number V2 · 71f6bd4a
      Yinghai Lu authored
      Fixes PCI device detection on IBM xSeries IBM 3850 M2 / x3950 M2
      when using ACPI resources (_CRS).
      This is default, a manual workaround (without this patch)
      would be pci=nocrs boot param.
      
      V2: Add dev_warn if the workaround is hit. This should reveal
      how common such setups are (via google) and point to possible
      problems if things are still not working as expected.
      -> Suggested by Jan Beulich.
      
      Cc: stable@vger.kernel.org
      Tested-by: garyhade@us.ibm.com
      Signed-off-by: default avatarYinghai Lu <yinghai.lu@oracle.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      71f6bd4a
  2. 27 Jan, 2012 11 commits
  3. 26 Jan, 2012 14 commits
  4. 25 Jan, 2012 12 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs · aaad641e
      Linus Torvalds authored
      Quoth Ben Myers:
       "Please pull in the following bugfix for xfs.  We forgot to drop a lock on
        error in xfs_readlink.  It hasn't been through -next yet, but there is no
        -next tree tomorrow.  The fix is clear so I'm sending this request today."
      
      * 'for-linus' of git://oss.sgi.com/xfs/xfs:
        xfs: Fix missing xfs_iunlock() on error recovery path in xfs_readlink()
      aaad641e
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 74a7f6a0
      Linus Torvalds authored
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/ttm: fix two regressions since move_notify changes
        drm/radeon: avoid deadlock if GPU lockup is detected in ib_pool_get
        drm/radeon: silence out possible lock dependency warning
        drm: Fix authentication kernel crash
        gma500: Fix shmem mapping
        drm/radeon/kms: refine TMDS dual link checks
        drm/radeon/kms: use drm_detect_hdmi_monitor for picking encoder mode
        drm/radeon/kms: rework modeset sequence for DCE41 and DCE5
        drm/radeon/kms: move panel mode setup into encoder mode set
        drm/radeon/kms: move disp eng pll setup to init path
        drm/radeon: finish getting bios earlier
        drm/radeon: fix invalid memory access in radeon_atrm_get_bios()
        drm/radeon/kms: add some missing semaphore init
        drm/radeon/kms: Add an MSI quirk for Dell RS690
        gpu, drm, sis: Don't return uninitialized variable from sis_driver_load()
      74a7f6a0
    • Linus Torvalds's avatar
      Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 486bc794
      Linus Torvalds authored
      * 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ASoC: wm2000: Fix use-after-free - don't release_firmware() twice on error
        ASoC: wm8958: Use correct format string in dev_err() call
        ASoC: wm8996: Call _POST_PMU callback for CPVDD
        ASoC: mxs: Fix mxs-saif timeout
        ASoC: Disable register synchronisation for low frequency WM8996 SYSCLK
        ASoC: Don't go through cache when applying WM5100 rev A updates
        ASoC: Mark WM5100 register map cache only when going into BIAS_OFF
        ASoC: tlv320aic32x4: always enable analouge block
        ASoC: tlv320aic32x4: always enable dividers
        ASoC: sgtl5000: Fix wrong register name in restore
      486bc794
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 7ca4e8c4
      Linus Torvalds authored
      A fairly simple bugfix for a WARN_ON() which was triggered in the cache
      reset support as a result of some subsequent work.  There's only one
      mainline user for the code path that's updated right now (wm8994) so
      should be low risk.
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: Reset cache status when reinitialsing the cache
      7ca4e8c4
    • Li Wang's avatar
      eCryptfs: move misleading function comments · 1589cb1a
      Li Wang authored
       The data encryption was moved from ecryptfs_write_end into
      ecryptfs_writepage, this patch moves the corresponding function
      comments to be consistent with the modification.
      Signed-off-by: default avatarLi Wang <liwang@nudt.edu.cn>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1589cb1a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs · 3074c035
      Linus Torvalds authored
      Says Tyler:
       "Tim's logging message update will be really helpful to users when
        they're trying to locate a problematic file in the lower filesystem
        with filename encryption enabled.
      
        You'll recognize the fix from Li, as you commented on that.
      
        You should also be familiar with my setattr/truncate improvements,
        since you were the one that pointed them out to us (thanks again!).
        Andrew noted the /dev/ecryptfs write count sanitization needed to be
        improved, so I've got a fix in there for that along with some other
        less important cleanups of the /dev/ecryptfs read/write code."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
        eCryptfs: Fix oops when printing debug info in extent crypto functions
        eCryptfs: Remove unused ecryptfs_read()
        eCryptfs: Check inode changes in setattr
        eCryptfs: Make truncate path killable
        eCryptfs: Infinite loop due to overflow in ecryptfs_write()
        eCryptfs: Replace miscdev read/write magic numbers
        eCryptfs: Report errors in writes to /dev/ecryptfs
        eCryptfs: Sanitize write counts of /dev/ecryptfs
        ecryptfs: Remove unnecessary variable initialization
        ecryptfs: Improve metadata read failure logging
        MAINTAINERS: Update eCryptfs maintainer address
      3074c035
    • Tyler Hicks's avatar
      eCryptfs: Fix oops when printing debug info in extent crypto functions · 58ded24f
      Tyler Hicks authored
      If pages passed to the eCryptfs extent-based crypto functions are not
      mapped and the module parameter ecryptfs_verbosity=1 was specified at
      loading time, a NULL pointer dereference will occur.
      
      Note that this wouldn't happen on a production system, as you wouldn't
      pass ecryptfs_verbosity=1 on a production system. It leaks private
      information to the system logs and is for debugging only.
      
      The debugging info printed in these messages is no longer very useful
      and rather than doing a kmap() in these debugging paths, it will be
      better to simply remove the debugging paths completely.
      
      https://launchpad.net/bugs/913651Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
      Reported-by: Daniel DeFreez
      Cc: <stable@vger.kernel.org>
      58ded24f
    • Tyler Hicks's avatar
      eCryptfs: Remove unused ecryptfs_read() · f2cb9335
      Tyler Hicks authored
      ecryptfs_read() has been ifdef'ed out for years now and it was
      apparently unused before then. It is time to get rid of it for good.
      Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
      f2cb9335
    • Tyler Hicks's avatar
      eCryptfs: Check inode changes in setattr · a261a039
      Tyler Hicks authored
      Most filesystems call inode_change_ok() very early in ->setattr(), but
      eCryptfs didn't call it at all. It allowed the lower filesystem to make
      the call in its ->setattr() function. Then, eCryptfs would copy the
      appropriate inode attributes from the lower inode to the eCryptfs inode.
      
      This patch changes that and actually calls inode_change_ok() on the
      eCryptfs inode, fairly early in ecryptfs_setattr(). Ideally, the call
      would happen earlier in ecryptfs_setattr(), but there are some possible
      inode initialization steps that must happen first.
      
      Since the call was already being made on the lower inode, the change in
      functionality should be minimal, except for the case of a file extending
      truncate call. In that case, inode_newsize_ok() was never being
      called on the eCryptfs inode. Rather than inode_newsize_ok() catching
      maximum file size errors early on, eCryptfs would encrypt zeroed pages
      and write them to the lower filesystem until the lower filesystem's
      write path caught the error in generic_write_checks(). This patch
      introduces a new function, called ecryptfs_inode_newsize_ok(), which
      checks if the new lower file size is within the appropriate limits when
      the truncate operation will be growing the lower file.
      
      In summary this change prevents eCryptfs truncate operations (and the
      resulting page encryptions), which would exceed the lower filesystem
      limits or FSIZE rlimits, from ever starting.
      Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
      Reviewed-by: default avatarLi Wang <liwang@nudt.edu.cn>
      Cc: <stable@vger.kernel.org>
      a261a039
    • Tyler Hicks's avatar
      eCryptfs: Make truncate path killable · 5e6f0d76
      Tyler Hicks authored
      ecryptfs_write() handles the truncation of eCryptfs inodes. It grabs a
      page, zeroes out the appropriate portions, and then encrypts the page
      before writing it to the lower filesystem. It was unkillable and due to
      the lack of sparse file support could result in tying up a large portion
      of system resources, while encrypting pages of zeros, with no way for
      the truncate operation to be stopped from userspace.
      
      This patch adds the ability for ecryptfs_write() to detect a pending
      fatal signal and return as gracefully as possible. The intent is to
      leave the lower file in a useable state, while still allowing a user to
      break out of the encryption loop. If a pending fatal signal is detected,
      the eCryptfs inode size is updated to reflect the modified inode size
      and then -EINTR is returned.
      Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
      Cc: <stable@vger.kernel.org>
      5e6f0d76
    • Li Wang's avatar
      eCryptfs: Infinite loop due to overflow in ecryptfs_write() · 684a3ff7
      Li Wang authored
      ecryptfs_write() can enter an infinite loop when truncating a file to a
      size larger than 4G. This only happens on architectures where size_t is
      represented by 32 bits.
      
      This was caused by a size_t overflow due to it incorrectly being used to
      store the result of a calculation which uses potentially large values of
      type loff_t.
      
      [tyhicks@canonical.com: rewrite subject and commit message]
      Signed-off-by: default avatarLi Wang <liwang@nudt.edu.cn>
      Signed-off-by: default avatarYunchuan Wen <wenyunchuan@kylinos.com.cn>
      Reviewed-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
      684a3ff7
    • Tyler Hicks's avatar
      eCryptfs: Replace miscdev read/write magic numbers · 48399c0b
      Tyler Hicks authored
      ecryptfs_miscdev_read() and ecryptfs_miscdev_write() contained many
      magic numbers for specifying packet header field sizes and offsets. This
      patch defines those values and replaces the magic values.
      Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
      48399c0b