1. 21 Jul, 2012 25 commits
  2. 11 Jul, 2012 9 commits
  3. 07 Jul, 2012 3 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
    • 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
  4. 06 Jul, 2012 3 commits
    • Linus Torvalds's avatar
      Merge tag 'ecryptfs-3.5-rc6-fixes' of... · 26c439d4
      Linus Torvalds authored
      Merge tag 'ecryptfs-3.5-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs
      
      Pull eCryptfs fixes from Tyler Hicks:
       "Fixes an incorrect access mode check when preparing to open a file in
        the lower filesystem.  This isn't an urgent fix, but it is simple and
        the check was obviously incorrect.
      
        Also fixes a couple important bugs in the eCryptfs miscdev interface.
        These changes are low risk due to the small number of users that use
        the miscdev interface.  I was able to keep the changes minimal and I
        have some cleaner, more complete changes queued up for the next merge
        window that will build on these patches."
      
      * tag 'ecryptfs-3.5-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
        eCryptfs: Gracefully refuse miscdev file ops on inherited/passed files
        eCryptfs: Fix lockdep warning in miscdev operations
        eCryptfs: Properly check for O_RDONLY flag before doing privileged open
      26c439d4
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · c8912f2b
      Linus Torvalds authored
      Pull target fixes from Nicholas Bellinger:
       "Two minor target fixes.  There is really nothing exciting and/or
        controversial this time around.
      
        There's one fix from MDR for a RCU debug warning message within tcm_fc
        code (CC'ed to stable), and a small AC fix for qla_target.c based upon
        a recent Coverity static report.
      
        Also, there is one other outstanding virtio-scsi LUN scanning bugfix
        that has been uncovered with the in-flight tcm_vhost driver over the
        last days, and that needs to make it into 3.5 final too.  This patch
        has been posted to linux-scsi again here:
      
          http://marc.info/?l=linux-scsi&m=134160609212542&w=2
      
        and I've asked James to include it in his next PULL request."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
        qla2xxx: print the right array elements in qlt_async_event
        tcm_fc: Resolve suspicious RCU usage warnings
      c8912f2b
    • Tyler Hicks's avatar
      eCryptfs: Gracefully refuse miscdev file ops on inherited/passed files · 8dc67805
      Tyler Hicks authored
      File operations on /dev/ecryptfs would BUG() when the operations were
      performed by processes other than the process that originally opened the
      file. This could happen with open files inherited after fork() or file
      descriptors passed through IPC mechanisms. Rather than calling BUG(), an
      error code can be safely returned in most situations.
      
      In ecryptfs_miscdev_release(), eCryptfs still needs to handle the
      release even if the last file reference is being held by a process that
      didn't originally open the file. ecryptfs_find_daemon_by_euid() will not
      be successful, so a pointer to the daemon is stored in the file's
      private_data. The private_data pointer is initialized when the miscdev
      file is opened and only used when the file is released.
      
      https://launchpad.net/bugs/994247Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
      Reported-by: default avatarSasha Levin <levinsasha928@gmail.com>
      Tested-by: default avatarSasha Levin <levinsasha928@gmail.com>
      8dc67805