1. 10 Jul, 2012 4 commits
    • Paul Mundt's avatar
      sh: pfc: Rudimentary pinctrl-backed GPIO support. · ca5481c6
      Paul Mundt authored
      This begins the migration of the PFC core to the pinctrl subsystem.
      Initial support is very basic, with the bulk of the implementation simply
      being nopped out in such a way to allow registration with the pinctrl
      core to succeed.
      
      The gpio chip driver is stripped down considerably now relying purely on
      pinctrl API calls to manage the bulk of its operations.
      
      This provides a basis for further PFC refactoring, including decoupling
      pin functions from the GPIO API, establishing pin groups, and so forth.
      These will all be dealt with incrementally so as to introduce as few
      growing and migratory pains to tree-wide PFC pinmux users today.
      
      When the interfaces have been well established and in-tree users have
      been migrated off of the legacy interfaces it will be possible to strip
      down the core considerably, leading to eventual drivers/pinctrl rehoming.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      ca5481c6
    • Paul Mundt's avatar
      sh: pfc: Dumb GPIO stringification. · 72c7afa1
      Paul Mundt authored
      This implements fairly simplistic stringification of existing pinmux
      GPIOs for easy enum id -> string mapping, which will subsequently be used
      by the pinctrl support code.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      72c7afa1
    • Paul Mundt's avatar
      Merge branch 'common/pfc' into common/pinctrl · a18d7f96
      Paul Mundt authored
      a18d7f96
    • Paul Mundt's avatar
      sh: pfc: Shuffle PFC support core. · afae021a
      Paul Mundt authored
      This follows the intc/clk changes and shuffles the PFC support code under
      its own directory. This will facilitate better code sharing, and allow us
      to trim down the exported interface by quite a margin.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      afae021a
  2. 09 Jul, 2012 7 commits
  3. 08 Jul, 2012 5 commits
    • Michael S. Tsirkin's avatar
      virtio-balloon: fix add/get API use · 9c378abc
      Michael S. Tsirkin authored
      Since ee7cd898 'virtio: expose added
      descriptors immediately.', in virtio balloon virtqueue_get_buf might
      now run concurrently with virtqueue_kick.  I audited both and this
      seems safe in practice but this is not guaranteed by the API.
      Additionally, a spurious interrupt might in theory make
      virtqueue_get_buf run in parallel with virtqueue_add_buf, which is
      racy.
      
      While we might try to protect against spurious callbacks it's
      easier to fix the driver: balloon seems to be the only one
      (mis)using the API like this, so let's just fix balloon.
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (removed unused var)
      9c378abc
    • Linus Torvalds's avatar
      Merge branch 'for-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 8c84bf41
      Linus Torvalds authored
      Pull cgroup fixes from Tejun Heo:
       "The previous cgroup pull request contained a patch to fix a race
        condition during cgroup hierarchy umount.  Unfortunately, while the
        patch reduced the race window such that the test case I and Sasha were
        using didn't trigger it anymore, it wasn't complete - Shyju and Li
        could reliably trigger the race condition using a different test case.
      
        The problem wasn't the gap between dentry deletion and release which
        the previous patch tried to fix.  The window was between the last
        dput() of a root's child and the resulting dput() of the root.  For
        cgroup dentries, the deletion and release always happen synchronously.
        As this releases the s_active ref, the refcnt of the root dentry,
        which doesn't hold s_active, stays above zero without the
        corresponding s_active.  If umount was in progress, the last
        deactivate_super() proceeds to destory the superblock and triggers
        BUG() on the non-zero root dentry refcnt after shrinking.
      
        This issue surfaced because cgroup dentries are now allowed to linger
        after rmdir(2) since 3.5-rc1.  Before, rmdir synchronously drained the
        dentry refcnt and the s_active acquired by rmdir from vfs layer
        protected the whole thing.  After 3.5-rc1, cgroup may internally hold
        and put dentry refs after rmdir finishes and the delayed dput()
        doesn't have surrounding s_active ref exposing this issue.
      
        This pull request contains two patches - one reverting the previous
        incorrect fix and the other adding the surrounding s_active ref around
        the delayed dput().
      
        This is quite late in the release cycle but the change is on the safer
        side and fixes the test cases reliably, so I don't think it's too
        crazy."
      
      * 'for-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cgroup: fix cgroup hierarchy umount race
        Revert "cgroup: superblock can't be released with active dentries"
      8c84bf41
    • Linus Torvalds's avatar
      Linux 3.5-rc6 · bd0a521e
      Linus Torvalds authored
      bd0a521e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · a0127afb
      Linus Torvalds authored
      Pull security docs update from James Morris.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        security: Minor improvements to no_new_privs documentation
      a0127afb
    • Linus Torvalds's avatar
      vfs: make O_PATH file descriptors usable for 'fchdir()' · 332a2e12
      Linus Torvalds authored
      We already use them for openat() and friends, but fchdir() also wants to
      be able to use O_PATH file descriptors.  This should make it comparable
      to the O_SEARCH of Solaris.  In particular, O_PATH allows you to access
      (not-quite-open) a directory you don't have read persmission to, only
      execute permission.
      
      Noticed during development of multithread support for ksh93.
      Reported-by: default avatarольга крыжановская <olga.kryzhanovska@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: stable@kernel.org    # O_PATH introduced in 3.0+
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      332a2e12
  4. 07 Jul, 2012 5 commits
    • Tejun Heo's avatar
      cgroup: fix cgroup hierarchy umount race · 5db9a4d9
      Tejun Heo authored
      48ddbe19 "cgroup: make css->refcnt clearing on cgroup removal
      optional" allowed a css to linger after the associated cgroup is
      removed.  As a css holds a reference on the cgroup's dentry, it means
      that cgroup dentries may linger for a while.
      
      Destroying a superblock which has dentries with positive refcnts is a
      critical bug and triggers BUG() in vfs code.  As each cgroup dentry
      holds an s_active reference, any lingering cgroup has both its dentry
      and the superblock pinned and thus preventing premature release of
      superblock.
      
      Unfortunately, after 48ddbe19, there's a small window while
      releasing a cgroup which is directly under the root of the hierarchy.
      When a cgroup directory is released, vfs layer first deletes the
      corresponding dentry and then invokes dput() on the parent, which may
      recurse further, so when a cgroup directly below root cgroup is
      released, the cgroup is first destroyed - which releases the s_active
      it was holding - and then the dentry for the root cgroup is dput().
      
      This creates a window where the root dentry's refcnt isn't zero but
      superblock's s_active is.  If umount happens before or during this
      window, vfs will see the root dentry with non-zero refcnt and trigger
      BUG().
      
      Before 48ddbe19, this problem didn't exist because the last dentry
      reference was guaranteed to be put synchronously from rmdir(2)
      invocation which holds s_active around the whole process.
      
      Fix it by holding an extra superblock->s_active reference across
      dput() from css release, which is the dput() path added by 48ddbe19
      and the only one which doesn't hold an extra s_active ref across the
      final cgroup dput().
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      LKML-Reference: <4FEEA5CB.8070809@huawei.com>
      Reported-by: default avatarshyju pv <shyju.pv@huawei.com>
      Tested-by: default avatarshyju pv <shyju.pv@huawei.com>
      Cc: Sasha Levin <levinsasha928@gmail.com>
      Acked-by: default avatarLi Zefan <lizefan@huawei.com>
      5db9a4d9
    • Tejun Heo's avatar
      Revert "cgroup: superblock can't be released with active dentries" · 7db5b3ca
      Tejun Heo authored
      This reverts commit fa980ca8.  The
      commit was an attempt to fix a race condition where a cgroup hierarchy
      may be unmounted with positive dentry reference on root cgroup.  While
      the commit made the race condition slightly more difficult to trigger,
      the race was still there and could be reliably triggered using a
      different test case.
      
      Revert the incorrect fix.  The next commit will describe the race and
      fix it correctly.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      LKML-Reference: <4FEEA5CB.8070809@huawei.com>
      Reported-by: default avatarshyju pv <shyju.pv@huawei.com>
      Cc: Sasha Levin <levinsasha928@gmail.com>
      Acked-by: default avatarLi Zefan <lizefan@huawei.com>
      7db5b3ca
    • Shinya Kuribayashi's avatar
      hwspinlock/core: use global ID to register hwspinlocks on multiple devices · 476a7eeb
      Shinya Kuribayashi authored
      Commit 300bab97 (hwspinlock/core: register a bank of hwspinlocks in a
      single API call, 2011-09-06) introduced 'hwspin_lock_register_single()'
      to register numerous (a bank of) hwspinlock instances in a single API,
      'hwspin_lock_register()'.
      
      At which time, 'hwspin_lock_register()' accidentally passes 'local IDs'
      to 'hwspin_lock_register_single()', despite that ..._single() requires
      'global IDs' to register hwspinlocks.
      
      We have to convert into global IDs by supplying the missing 'base_id'.
      
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarShinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
      [ohad: fix error path of hwspin_lock_register, too]
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      476a7eeb
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · cd6407fe
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Last merge window, we had some updates from Al cleaning up the signal
        restart handling.  These have caused some problems on ARM, and while
        Al has some fixes, we have some concerns with Al's patches but we've
        been unsuccesful with discussing this.
      
        We have got to the point where we need to do something, and we've
        decided that the best solution is to revert the appropriate commits
        until Al is able to reply to us.
      
        Also included here are four patches to fix warnings that I've noticed
        in my build system, and one fix for kprobes test code."
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: fix warning caused by wrongly typed arm_dma_limit
        ARM: fix warnings about atomic64_read
        ARM: 7440/1: kprobes: only test 'sub pc, pc, #1b-2b+8-2' on ARMv6
        ARM: 7441/1: perf: return -EOPNOTSUPP if requested mode exclusion is unavailable
        ARM: 7443/1: Revert "new way of handling ERESTART_RESTARTBLOCK"
        ARM: 7442/1: Revert "remove unused restart trampoline"
        ARM: fix set_domain() macro
        ARM: fix mach-versatile/pci.c warning
      cd6407fe
    • Andy Lutomirski's avatar
      security: Minor improvements to no_new_privs documentation · c540521b
      Andy Lutomirski authored
      The documentation didn't actually mention how to enable no_new_privs.
      This also adds a note about possible interactions between
      no_new_privs and LSMs (i.e. why teaching systemd to set no_new_privs
      is not necessarily a good idea), and it references the new docs
      from include/linux/prctl.h.
      Suggested-by: default avatarRob Landley <rob@landley.net>
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      c540521b
  5. 06 Jul, 2012 11 commits
  6. 05 Jul, 2012 8 commits
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · c4aed353
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "Small fixes on multiple ARM platforms
         - A build regression from a previous fix on dove and mv78xx0
         - Two fixes for recently (3.5-rc1) changed mmp/pxa code
         - multiple omap2+ bug fixes
         - two trivial fixes for i.MX
         - one v3.5 regression for mxs"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: apx4devkit: fix FEC enabling PHY clock
        ARM: OMAP2+: hwmod data: Fix wrong McBSP clock alias on OMAP4
        ARM: OMAP4: hwmod data: temporarily comment out data for the usb_host_fs and aess IP blocks
        ARM: Orion: Fix WDT compile for Dove and MV78xx0
        ARM: mmp: remove mach/gpio-pxa.h
        ARM: imx: assert SCC gate stays enabled
        ARM: OMAP4: TWL6030: ensure sys_nirq1 is mux'd and wakeup enabled
        ARM: OMAP2: Overo: init I2C before MMC to fix MMC suspend/resume failure
        ARM: imx27_visstrim_m10: Do not include <asm/system.h>
        ARM: pxa: hx4700: Fix basic suspend/resume
      c4aed353
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/virt/kvm/kvm · 6bc51545
      Linus Torvalds authored
      Pull KVM fix from Marcelo Tosatti:
       "Memory leak and oops on the x86 mmu code, and sanitization of the
        KVM_IRQFD ioctl."
      
      * git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: MMU: fix shrinking page from the empty mmu
        KVM: fix fault page leak
        KVM: Sanitize KVM_IRQFD flags
        KVM: Add missing KVM_IRQFD API documentation
        KVM: Pass kvm_irqfd to functions
      6bc51545
    • Linus Torvalds's avatar
      Merge branch 'fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds · 24eee627
      Linus Torvalds authored
      Pull leds fix from Bryan Wu:
       "Fix for heartbeat led trigger driver"
      
      * 'fixes-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
        leds: heartbeat: fix bug on panic
      24eee627
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 5eecb9cc
      Linus Torvalds authored
      Pull btrfs updates from Chris Mason:
       "I held off on my rc5 pull because I hit an oops during log recovery
        after a crash.  I wanted to make sure it wasn't a regression because
        we have some logging fixes in here.
      
        It turns out that a commit during the merge window just made it much
        more likely to trigger directory logging instead of full commits,
        which exposed an old bug.
      
        The new backref walking code got some additional fixes.  This should
        be the final set of them.
      
        Josef fixed up a corner where our O_DIRECT writes and buffered reads
        could expose old file contents (not stale, just not the most recent).
        He and Liu Bo fixed crashes during tree log recover as well.
      
        Ilya fixed errors while we resume disk balancing operations on
        readonly mounts."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: run delayed directory updates during log replay
        Btrfs: hold a ref on the inode during writepages
        Btrfs: fix tree log remove space corner case
        Btrfs: fix wrong check during log recovery
        Btrfs: use _IOR for BTRFS_IOC_SUBVOL_GETFLAGS
        Btrfs: resume balance on rw (re)mounts properly
        Btrfs: restore restriper state on all mounts
        Btrfs: fix dio write vs buffered read race
        Btrfs: don't count I/O statistic read errors for missing devices
        Btrfs: resolve tree mod log locking issue in btrfs_next_leaf
        Btrfs: fix tree mod log rewind of ADD operations
        Btrfs: leave critical region in btrfs_find_all_roots as soon as possible
        Btrfs: always put insert_ptr modifications into the tree mod log
        Btrfs: fix tree mod log for root replacements at leaf level
        Btrfs: support root level changes in __resolve_indirect_ref
        Btrfs: avoid waiting for delayed refs when we must not
      5eecb9cc
    • Linus Torvalds's avatar
      Merge branch 'fixes-for-grant' of git://sources.calxeda.com/kernel/linux · 62ad6449
      Linus Torvalds authored
      Pull DT fixes from Rob Herring:
       "Mainly some documentation updates and 2 fixes:
      
         - An export symbol fix for of_platform_populate from Stephen W.
         - A fix for the order compatible entries are matched to ensure the
           first compatible string is matched when there are multiple matches."
      
      Normally these would go through Grant Likely (thus the "fixes-for-grant"
      branch name), but Grant is in the middle of moving to Scotland, and is
      practically offline until sometime in August. So pull directly from Rob.
      
      * 'fixes-for-grant' of git://sources.calxeda.com/kernel/linux:
        of: match by compatible property first
        dt: mc13xxx.txt: Fix gpio number assignment
        dt: fsl-fec.txt: Fix gpio number assignment
        dt: fsl-mma8450.txt: Add missing 'reg' description
        dt: fsl-imx-esdhc.txt: Fix gpio number assignment
        dt: fsl-imx-cspi.txt: Fix comment about GPIOs used for chip selects
        of: Add Avionic Design vendor prefix
        of: export of_platform_populate()
      62ad6449
    • Russell King's avatar
      ARM: fix warning caused by wrongly typed arm_dma_limit · 09b2ad13
      Russell King authored
      arch/arm/mm/init.c: In function 'arm_memblock_init':
      arch/arm/mm/init.c:380: warning: comparison of distinct pointer types lacks a cast
      
      by fixing the typecast in its definition when DMA_ZONE is disabled.
      This was missed in 4986e5c7 (ARM: mm: fix type of the arm_dma_limit
      global variable).
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      09b2ad13
    • Russell King's avatar
      ARM: fix warnings about atomic64_read · b89d607b
      Russell King authored
      Fix:
      net/netfilter/xt_connbytes.c: In function 'connbytes_mt':
      net/netfilter/xt_connbytes.c:43: warning: passing argument 1 of 'atomic64_read' discards qualifiers from pointer target type
      ...
      
      by adding the missing const.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      b89d607b
    • Rabin Vincent's avatar
      ARM: 7440/1: kprobes: only test 'sub pc, pc, #1b-2b+8-2' on ARMv6 · f8b435bb
      Rabin Vincent authored
      'sub pc, pc, #1b-2b+8-2' results in address<1:0> == '10'.
      
      sub pc, pc, #const (== ADR pc, #const) performs an interworking branch
      (BXWritePC()) on ARMv7+ and a simple branch (BranchWritePC()) on earlier
      versions.
      
      In ARM state, BXWritePC() is UNPREDICTABLE when address<1:0> == '10'.
      
      In ARM state on ARMv6+, BranchWritePC() ignores address<1:0>.  Before
      ARMv6, BranchWritePC() is UNPREDICTABLE if address<1:0> != '00'
      
      So the instruction is UNPREDICTABLE both before and after v6.
      Acked-by: default avatarJon Medhurst <tixy@yxit.co.uk>
      Signed-off-by: default avatarRabin Vincent <rabin.vincent@stericsson.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      f8b435bb