1. Aug 19, 2012
  2. Aug 18, 2012
  3. Aug 17, 2012
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming · 9d0f8140
      Linus Torvalds authored
      Pull C6X atomic64 support from Mark Salter:
       "Enable atomic64 ops in C6X
         - define L1_CACHE_SHIFT
         - select GENERIC_ATOMIC64"
      
      * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
        C6X: select GENERIC_ATOMIC64
        C6X: add Lx_CACHE_SHIFT defines
      9d0f8140
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · ef824bfb
      Linus Torvalds authored
      Pull ext4 bug fixes from Ted Ts'o:
       "The following are all bug fixes and regressions.  The most notable are
        the ones which cause problems for ext4 on RAID --- a performance
        problem when mounting very large filesystems, and a kernel OOPS when
        doing an rm -rf on large directory hierarchies on fast devices."
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix kernel BUG on large-scale rm -rf commands
        ext4: fix long mount times on very big file systems
        ext4: don't call ext4_error while block group is locked
        ext4: avoid kmemcheck complaint from reading uninitialized memory
        ext4: make sure the journal sb is written in ext4_clear_journal_err()
      ef824bfb
    • Ian Kent's avatar
      autofs4 - fix expire check · d807ff83
      Ian Kent authored
      
      
      In some cases when an autofs indirect mount is contained in a file
      system that is marked as shared (such as when systemd does the
      equivalent of "mount --make-rshared /" early in the boot), mounts
      stop expiring.
      
      When this happens the first expiry check on a mountpoint dentry in
      autofs_expire_indirect() sees a mountpoint dentry with a higher
      than minimal reference count. Consequently the dentry is condidered
      busy and the actual expiry check is never done.
      
      This particular check was originally meant as an optimisation to
      detect a path walk in progress but with the addition of rcu-walk
      it can be ineffective anyway.
      
      Removing the test allows automounts to expire again since the
      actual expire check doesn't rely on the dentry reference count.
      
      Signed-off-by: default avatarIan Kent <raven@themaw.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d807ff83
    • Theodore Ts'o's avatar
      ext4: fix kernel BUG on large-scale rm -rf commands · 89a4e48f
      Theodore Ts'o authored
      Commit 968dee77: "ext4: fix hole punch failure when depth is greater
      than 0" introduced a regression in v3.5.1/v3.6-rc1 which caused kernel
      crashes when users ran run "rm -rf" on large directory hierarchy on
      ext4 filesystems on RAID devices:
      
          BUG: unable to handle kernel NULL pointer dereference at 0000000000000028
      
          Process rm (pid: 18229, threadinfo ffff8801276bc000, task ffff880123631710)
          Call Trace:
           [<ffffffff81236483>] ? __ext4_handle_dirty_metadata+0x83/0x110
           [<ffffffff812353d3>] ext4_ext_truncate+0x193/0x1d0
           [<ffffffff8120a8cf>] ? ext4_mark_inode_dirty+0x7f/0x1f0
           [<ffffffff81207e05>] ext4_truncate+0xf5/0x100
           [<ffffffff8120cd51>] ext4_evict_inode+0x461/0x490
           [<ffffffff811a1312>] evict+0xa2/0x1a0
           [<ffffffff811a1513>] iput+0x103/0x1f0
           [<ffffffff81196d84>] do_unlinkat+0x154/0x1c0
           [<ffffffff8118cc3a>] ? sys_newfstatat+0x2a/0x40
           [<ffffffff81197b0b>] sys_unlinkat+0x1b/0x50
           [<ffffffff816135e9>] system_call_fastpath+0x16/0x1b
          Code: 8b 4d 20 0f b7 41 02 48 8d 04 40 48 8d 04 81 49 89 45 18 0f b7 49 02 48 83 c1 01 49 89 4d 00 e9 ae f8 ff ff 0f 1f 00 49 8b 45 28 <48> 8b 40 28 49 89 45 20 e9 85 f8 ff ff 0f 1f 80 00 00 00
      
          RIP  [<ffffffff81233164>] ext4_ext_remove_space+0xa34/0xdf0
      
      This could be reproduced as follows:
      
      The problem in commit 968dee77
      
       was that caused the variable 'i' to
      be left uninitialized if the truncate required more space than was
      available in the journal.  This resulted in the function
      ext4_ext_truncate_extend_restart() returning -EAGAIN, which caused
      ext4_ext_remove_space() to restart the truncate operation after
      starting a new jbd2 handle.
      
      Reported-by: default avatarMaciej Żenczykowski <maze@google.com>
      Reported-by: default avatarMarti Raudsepp <marti@juffo.org>
      Tested-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      89a4e48f
    • Theodore Ts'o's avatar
      ext4: fix long mount times on very big file systems · 0548bbb8
      Theodore Ts'o authored
      
      
      Commit 8aeb00ff85a: "ext4: fix overhead calculation used by
      ext4_statfs()" introduced a O(n**2) calculation which makes very large
      file systems take forever to mount.  Fix this with an optimization for
      non-bigalloc file systems.  (For bigalloc file systems the overhead
      needs to be set in the the superblock.)
      
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      0548bbb8
    • Theodore Ts'o's avatar
      ext4: don't call ext4_error while block group is locked · 7a4c5de2
      Theodore Ts'o authored
      While in ext4_validate_block_bitmap(), if an block allocation bitmap
      is found to be invalid, we call ext4_error() while the block group is
      still locked.  This causes ext4_commit_super() to call a function
      which might sleep while in an atomic context.
      
      There's no need to keep the block group locked at this point, so hoist
      the ext4_error() call up to ext4_validate_block_bitmap() and release
      the block group spinlock before calling ext4_error().
      
      The reported stack trace can be found at:
      
      	http://article.gmane.org/gmane.comp.file-systems.ext4/33731
      
      
      
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      7a4c5de2
    • Kees Cook's avatar
      Yama: access task_struct->comm directly · 7612bfee
      Kees Cook authored
      
      
      The core ptrace access checking routine holds a task lock, and when
      reporting a failure, Yama takes a separate task lock. To avoid a
      potential deadlock with two ptracers taking the opposite locks, do not
      use get_task_comm() and just use ->comm directly since accuracy is not
      important for the report.
      
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Suggested-by: default avatarOleg Nesterov <oleg@redhat.com>
      CC: stable@vger.kernel.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarJohn Johansen <john.johansen@canonical.com>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      7612bfee
    • Linus Torvalds's avatar
      Linux 3.6-rc2 · d9875690
      Linus Torvalds authored
      d9875690
    • Greg Kroah-Hartman's avatar
      Merge tag 'v3.6-rc1-iio-fixes' of... · 3a491aea
      Greg Kroah-Hartman authored
      Merge tag 'v3.6-rc1-iio-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
      
      IIO fixes for v3.6-rc1
      
      These mostly consist of fixes from Lars-Peter Clausen that were
      the first part of a large series reworking the drivers concerned.
      Turns out these drivers had quite a wealth of minor bugs.
      
      Also here are some build warning fixes for lm3533-als and
      adjd_s111 (both new drives in this cycle).
      Final elements are a a div factor overflow and a warning
      related fix in a couple of Analog Devices drivers.
      
      All in all nothing major, but a worthwhile bunch of short
      fixes.
      3a491aea
    • Raphael Assenat's avatar
      1-Wire: Add support for the maxim ds1825 temperature sensor · f3261dfb
      Raphael Assenat authored
      
      
      This patch adds support for maxim ds1825 based 1-wire temperature sensors.
      
      Signed-off-by: default avatarRaphael Assenat <raph@8d.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f3261dfb
    • Matthias Kaehlcke's avatar
      ti-st: Fix check for pdata->chip_awake function pointer · f3d9d365
      Matthias Kaehlcke authored
      
      
      ll_device_want_to_wakeup(): Fix the NULL pointer check on pdata->chip_awake,
      which is performed on the wrong function pointer
      
      Signed-off-by: default avatarMatthias Kaehlcke <matthias@kaehlcke.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f3d9d365
    • Axel Lin's avatar
      iio: lm3533-als: Fix build warnings · 95d1c8c7
      Axel Lin authored
      
      
      Fix below build warnings:
        CC [M]  drivers/iio/light/lm3533-als.o
      drivers/iio/light/lm3533-als.c:667:8: warning: initialization from incompatible pointer type [enabled by default]
      drivers/iio/light/lm3533-als.c:667:8: warning: (near initialization for 'dev_attr_in_illuminance0_thresh_either_en.show') [enabled by default]
      drivers/iio/light/lm3533-als.c:667:8: warning: initialization from incompatible pointer type [enabled by default]
      drivers/iio/light/lm3533-als.c:667:8: warning: (near initialization for 'dev_attr_in_illuminance0_thresh_either_en.store') [enabled by default]
      
      Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
      95d1c8c7
    • Lars-Peter Clausen's avatar
      staging:iio:ad7780: Mark channels as unsigned · 70e01880
      Lars-Peter Clausen authored
      
      
      The values reported by the AD7780 are unsigned with a binary offset:
      
      	0x000000 is negative fullscale
      	0x800000 is zeroscale
      	0xffffff is positive fullscale
      
      So mark the channel in the channel spec as unsigned rather than signed.
      
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      70e01880
    • Lars-Peter Clausen's avatar
      staging:iio:ad7192: Report offset and scale for temperature channel · 4fcbcf95
      Lars-Peter Clausen authored
      
      
      The temperature channel reports values in degree Kelvin with sensitivity of 5630
      codes per degree. If the chip is configured in bipolar mode there is an
      additional binary offset of 0x800000 and the sensitivity is divided by two.
      
      Currently the driver does the mapping from the raw value to degree Celsius when
      doing a manual conversion. This has several disadvantages, the major one being
      that it does not work for buffered mode, also by doing the division by the
      sensitivity in the driver the precession of the reported value is needlessly
      reduced.
      
      Furthermore the current calculation only works in bipolar mode and the current
      scale is of by a factor of 1000.
      
      This patch modifies the driver to report correct offset and scale values in
      both unipolar and bipolar mode and to report the raw temperature value
      for manual conversions.
      
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      4fcbcf95