1. 21 7月, 2013 5 次提交
  2. 20 7月, 2013 13 次提交
    • P
      vfs: constify dentry parameter in d_count() · 24924a20
      Peng Tao 提交于
      so that it can be used in places like d_compare/d_hash
      without causing a compiler warning.
      Signed-off-by: NPeng Tao <tao.peng@emc.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      24924a20
    • A
      livelock avoidance in sget() · acfec9a5
      Al Viro 提交于
      Eric Sandeen has found a nasty livelock in sget() - take a mount(2) about
      to fail.  The superblock is on ->fs_supers, ->s_umount is held exclusive,
      ->s_active is 1.  Along comes two more processes, trying to mount the same
      thing; sget() in each is picking that superblock, bumping ->s_count and
      trying to grab ->s_umount.  ->s_active is 3 now.  Original mount(2)
      finally gets to deactivate_locked_super() on failure; ->s_active is 2,
      superblock is still ->fs_supers because shutdown will *not* happen until
      ->s_active hits 0.  ->s_umount is dropped and now we have two processes
      chasing each other:
      s_active = 2, A acquired ->s_umount, B blocked
      A sees that the damn thing is stillborn, does deactivate_locked_super()
      s_active = 1, A drops ->s_umount, B gets it
      A restarts the search and finds the same superblock.  And bumps it ->s_active.
      s_active = 2, B holds ->s_umount, A blocked on trying to get it
      ... and we are in the earlier situation with A and B switched places.
      
      The root cause, of course, is that ->s_active should not grow until we'd
      got MS_BORN.  Then failing ->mount() will have deactivate_locked_super()
      shut the damn thing down.  Fortunately, it's easy to do - the key point
      is that grab_super() is called only for superblocks currently on ->fs_supers,
      so it can bump ->s_count and grab ->s_umount first, then check MS_BORN and
      bump ->s_active; we must never increment ->s_count for superblocks past
      ->kill_sb(), but grab_super() is never called for those.
      
      The bug is pretty old; we would've caught it by now, if not for accidental
      exclusion between sget() for block filesystems; the things like cgroup or
      e.g. mtd-based filesystems don't have anything of that sort, so they get
      bitten.  The right way to deal with that is obviously to fix sget()...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      acfec9a5
    • A
      allow O_TMPFILE to work with O_WRONLY · ba57ea64
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ba57ea64
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · d471ce53
      Linus Torvalds 提交于
      Pull UML fixes from Richard Weinberger:
       "Special thanks goes to Toralf Föster for continuously testing UML and
        reporting issues!"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: remove dead code
        um: siginfo cleanup
        uml: Fix which_tmpdir failure when /dev/shm is a symlink, and in other edge cases
        um: Fix wait_stub_done() error handling
        um: Mark stub pages mapping with VM_PFNMAP
        um: Fix return value of strnlen_user()
      d471ce53
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 1b050180
      Linus Torvalds 提交于
      Pull MIPS fixes from Ralf Baechle:
       "MIPS fixes for 3.11.  Half of then is for Netlogic the remainder
        touches things across arch/mips.
      
        Nothing really dramatic and by rc1 standards MIPS will be in fairly
        good shape with this applied.  Tested by building all MIPS defconfigs
        of which with this pull request four platforms won't build.  And yes,
        it boots also on my favorite test systems"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: kvm: Kconfig: Drop HAVE_KVM dependency from VIRTUALIZATION
        MIPS: Octeon: Fix DT pruning bug with pip ports
        MIPS: KVM: Mark KVM_GUEST (T&E KVM) as BROKEN_ON_SMP
        MIPS: tlbex: fix broken build in v3.11-rc1
        MIPS: Netlogic: Add XLP PIC irqdomain
        MIPS: Netlogic: Fix USB block's coherent DMA mask
        MIPS: tlbex: Fix typo in r3000 tlb store handler
        MIPS: BMIPS: Fix thinko to release slave TP from reset
        MIPS: Delete dead invocation of exception_exit().
      1b050180
    • L
      Merge tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64 · 89d0abe3
      Linus Torvalds 提交于
      Pull arm64 fixes from Catalin Marinas:
       - Post -rc1 update to the common reboot infrastructure.
       - Fixes (user cache maintenance fault handling, !COMPAT compilation,
         CPU online and interrupt hanlding).
      
      * tag 'arm64-stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
        arm64: use common reboot infrastructure
        arm64: mm: don't treat user cache maintenance faults as writes
        arm64: add '#ifdef CONFIG_COMPAT' for aarch32_break_handler()
        arm64: Only enable local interrupts after the CPU is marked online
      89d0abe3
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 89a8c594
      Linus Torvalds 提交于
      Pull s390 fixes from Martin Schwidefsky:
       "An update for the BFP jit to the latest and greatest, two patches to
        get kdump working again, the random-abort ptrace extention for
        transactional execution, the z90crypt module alias for ap and a tiny
        cleanup"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/zcrypt: Alias for new zcrypt device driver base module
        s390/kdump: Allow copy_oldmem_page() copy to virtual memory
        s390/kdump: Disable mmap for s390
        s390/bpf,jit: add pkt_type support
        s390/bpf,jit: address randomize and write protect jit code
        s390/bpf,jit: use generic jit dumper
        s390/bpf,jit: call module_free() from any context
        s390/qdio: remove unused variable
        s390/ptrace: PTRACE_TE_ABORT_RAND
      89a8c594
    • S
      Btrfs: fix wrong write offset when replacing a device · 115930cb
      Stefan Behrens 提交于
      Miao Xie reported the following issue:
      
      The filesystem was corrupted after we did a device replace.
      
      Steps to reproduce:
       # mkfs.btrfs -f -m single -d raid10 <device0>..<device3>
       # mount <device0> <mnt>
       # btrfs replace start -rfB 1 <device4> <mnt>
       # umount <mnt>
       # btrfsck <device4>
      
      The reason for the issue is that we changed the write offset by mistake,
      introduced by commit 625f1c8d.
      
      We read the data from the source device at first, and then write the
      data into the corresponding place of the new device. In order to
      implement the "-r" option, the source location is remapped using
      btrfs_map_block(). The read takes place on the mapped location, and
      the write needs to take place on the unmapped location. Currently
      the write is using the mapped location, and this commit changes it
      back by undoing the change to the write address that the aforementioned
      commit added by mistake.
      Reported-by: NMiao Xie <miaox@cn.fujitsu.com>
      Cc: <stable@vger.kernel.org> # 3.10+
      Signed-off-by: NStefan Behrens <sbehrens@giantdisaster.de>
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      115930cb
    • J
      Btrfs: re-add root to dead root list if we stop dropping it · d29a9f62
      Josef Bacik 提交于
      If we stop dropping a root for whatever reason we need to add it back to the
      dead root list so that we will re-start the dropping next transaction commit.
      The other case this happens is if we recover a drop because we will add a root
      without adding it to the fs radix tree, so we can leak it's root and commit root
      extent buffer, adding this to the dead root list makes this cleanup happen.
      Thanks,
      
      Cc: stable@vger.kernel.org
      Reported-by: NAlex Lyakas <alex.btrfs@zadarastorage.com>
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      d29a9f62
    • J
      Btrfs: fix lock leak when resuming snapshot deletion · fec386ac
      Josef Bacik 提交于
      We aren't setting path->locks[level] when we resume a snapshot deletion which
      means we won't unlock the buffer when we free the path.  This causes deadlocks
      if we happen to re-allocate the block before we've evicted the extent buffer
      from cache.  Thanks,
      
      Cc: stable@vger.kernel.org
      Reported-by: NAlex Lyakas <alex.btrfs@zadarastorage.com>
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      fec386ac
    • J
      Btrfs: update drop progress before stopping snapshot dropping · 3c8f2422
      Josef Bacik 提交于
      Alex pointed out a problem and fix that exists in the drop one snapshot at a
      time patch.  If we decide we need to exit for whatever reason (umount for
      example) we will just exit the snapshot dropping without updating the drop
      progress.  So the next time we go to resume we will BUG_ON() because we can't
      find the extent we left off at because we never updated it.  This patch fixes
      the problem.
      
      Cc: stable@vger.kernel.org
      Reported-by: NAlex Lyakas <alex.btrfs@zadarastorage.com>
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      3c8f2422
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · b8a33fc7
      Linus Torvalds 提交于
      Pull KVM fix from Paolo Bonzini:
       "This single patch fixes a regression caused by one of the
        optimizations introduced in 3.11, which is generally visible only on
        AMD processors"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: MMU: avoid fast page fault fixing mmio page fault
      b8a33fc7
    • L
      Merge tag 'pm+acpi-3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · b7356abb
      Linus Torvalds 提交于
      Pull power management and ACPI fixes from Rafael Wysocki:
       "These are fixes collected over the last week, most importnatly two
        cpufreq reverts fixing regressions introduced in 3.10, an autoseelp
        fix preventing systems using it from crashing during shutdown and two
        ACPI scan fixes related to hotplug.
      
        Specifics:
      
         - Two cpufreq commits from the 3.10 cycle introduced regressions.
           The first of them was buggy (it did way much more than it needed to
           do) and the second one attempted to fix an issue introduced by the
           first one.  Fixes from Srivatsa S Bhat revert both.
      
         - If autosleep triggers during system shutdown and the shutdown
           callbacks of some device drivers have been called already, it may
           crash the system.  Fix from Liu Shuo prevents that from happening
           by making try_to_suspend() check system_state.
      
         - The ACPI memory hotplug driver doesn't clear its driver_data on
           errors which may cause a NULL poiter dereference to happen later.
           Fix from Toshi Kani.
      
         - The ACPI namespace scanning code should not try to attach scan
           handlers to device objects that have them already, which may
           confuse things quite a bit, and it should rescan the whole
           namespace branch starting at the given node after receiving a bus
           check notify event even if the device at that particular node has
           been discovered already.  Fixes from Rafael J Wysocki.
      
         - New ACPI video blacklist entry for a system whose initial backlight
           setting from the BIOS doesn't make sense.  From Lan Tianyu.
      
         - Garbage string output avoindance for ACPI PNP from Liu Shuo.
      
         - Two Kconfig fixes for issues introduced recently in the s3c24xx
           cpufreq driver (when moving the driver to drivers/cpufreq) from
           Paul Bolle.
      
         - Trivial comment fix in pm_wakeup.h from Chanwoo Choi"
      
      * tag 'pm+acpi-3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / video: ignore BIOS initial backlight value for Fujitsu E753
        PNP / ACPI: avoid garbage in resource name
        cpufreq: Revert commit 2f7021a8 to fix CPU hotplug regression
        cpufreq: s3c24xx: fix "depends on ARM_S3C24XX" in Kconfig
        cpufreq: s3c24xx: rename CONFIG_CPU_FREQ_S3C24XX_DEBUGFS
        PM / Sleep: Fix comment typo in pm_wakeup.h
        PM / Sleep: avoid 'autosleep' in shutdown progress
        cpufreq: Revert commit a66b2e to fix suspend/resume regression
        ACPI / memhotplug: Fix a stale pointer in error path
        ACPI / scan: Always call acpi_bus_scan() for bus check notifications
        ACPI / scan: Do not try to attach scan handlers to devices having them
      b7356abb
  3. 19 7月, 2013 22 次提交