1. 21 7月, 2012 24 次提交
  2. 11 7月, 2012 9 次提交
  3. 08 7月, 2012 3 次提交
    • T
      cgroup: fix cgroup hierarchy umount race · 5db9a4d9
      Tejun Heo 提交于
      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: NTejun Heo <tj@kernel.org>
      LKML-Reference: <4FEEA5CB.8070809@huawei.com>
      Reported-by: Nshyju pv <shyju.pv@huawei.com>
      Tested-by: Nshyju pv <shyju.pv@huawei.com>
      Cc: Sasha Levin <levinsasha928@gmail.com>
      Acked-by: NLi Zefan <lizefan@huawei.com>
      5db9a4d9
    • T
      Revert "cgroup: superblock can't be released with active dentries" · 7db5b3ca
      Tejun Heo 提交于
      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: NTejun Heo <tj@kernel.org>
      LKML-Reference: <4FEEA5CB.8070809@huawei.com>
      Reported-by: Nshyju pv <shyju.pv@huawei.com>
      Cc: Sasha Levin <levinsasha928@gmail.com>
      Acked-by: NLi Zefan <lizefan@huawei.com>
      7db5b3ca
    • L
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · cd6407fe
      Linus Torvalds 提交于
      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. 07 7月, 2012 4 次提交
    • L
      Merge tag 'ecryptfs-3.5-rc6-fixes' of... · 26c439d4
      Linus Torvalds 提交于
      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
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · c8912f2b
      Linus Torvalds 提交于
      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
    • T
      eCryptfs: Gracefully refuse miscdev file ops on inherited/passed files · 8dc67805
      Tyler Hicks 提交于
      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: NTyler Hicks <tyhicks@canonical.com>
      Reported-by: NSasha Levin <levinsasha928@gmail.com>
      Tested-by: NSasha Levin <levinsasha928@gmail.com>
      8dc67805
    • A
      qla2xxx: print the right array elements in qlt_async_event · 4f1d0f19
      Alan Cox 提交于
      Based upon Alan's patch from Coverity scan id 793583, these debug
      messages in qlt_async_event() should be starting from byte 0, which is
      always the Asynchronous Event Status Code from the parent switch statement.
      
      Also, rename reason_code -> login_code following the language used in
      2500 FW spec for Port Database Changed (0x8014) -> Port Database Changed
      Event Mailbox Register for mailbox[2].
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Cc: Chad Dupuis <chad.dupuis@qlogic.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      4f1d0f19