1. 29 5月, 2011 14 次提交
    • H
      tmpfs: fix race between truncate and writepage · 826267cf
      Hugh Dickins 提交于
      While running fsx on tmpfs with a memhog then swapoff, swapoff was hanging
      (interruptibly), repeatedly failing to locate the owner of a 0xff entry in
      the swap_map.
      
      Although shmem_writepage() does abandon when it sees incoming page index
      is beyond eof, there was still a window in which shmem_truncate_range()
      could come in between writepage's dropping lock and updating swap_map,
      find the half-completed swap_map entry, and in trying to free it,
      leave it in a state that swap_shmem_alloc() could not correct.
      
      Arguably a bug in __swap_duplicate()'s and swap_entry_free()'s handling
      of the different cases, but easiest to fix by moving swap_shmem_alloc()
      under cover of the lock.
      
      More interesting than the bug: it's been there since 2.6.33, why could
      I not see it with earlier kernels?  The mmotm of two weeks ago seems to
      have some magic for generating races, this is just one of three I found.
      
      With yesterday's git I first saw this in mainline, bisected in search of
      that magic, but the easy reproducibility evaporated.  Oh well, fix the bug.
      Signed-off-by: NHugh Dickins <hughd@google.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      826267cf
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · 36947a76
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (36 commits)
        Cache xattr security drop check for write v2
        fs: block_page_mkwrite should wait for writeback to finish
        mm: Wait for writeback when grabbing pages to begin a write
        configfs: remove unnecessary dentry_unhash on rmdir, dir rename
        fat: remove unnecessary dentry_unhash on rmdir, dir rename
        hpfs: remove unnecessary dentry_unhash on rmdir, dir rename
        minix: remove unnecessary dentry_unhash on rmdir, dir rename
        fuse: remove unnecessary dentry_unhash on rmdir, dir rename
        coda: remove unnecessary dentry_unhash on rmdir, dir rename
        afs: remove unnecessary dentry_unhash on rmdir, dir rename
        affs: remove unnecessary dentry_unhash on rmdir, dir rename
        9p: remove unnecessary dentry_unhash on rmdir, dir rename
        ncpfs: fix rename over directory with dangling references
        ncpfs: document dentry_unhash usage
        ecryptfs: remove unnecessary dentry_unhash on rmdir, dir rename
        hostfs: remove unnecessary dentry_unhash on rmdir, dir rename
        hfsplus: remove unnecessary dentry_unhash on rmdir, dir rename
        hfs: remove unnecessary dentry_unhash on rmdir, dir rename
        omfs: remove unnecessary dentry_unhash on rmdir, dir rneame
        udf: remove unnecessary dentry_unhash from rmdir, dir rename
        ...
      36947a76
    • L
      Merge branch 'x86-urgent-for-linus' of... · a947e23a
      Linus Torvalds 提交于
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        x86, asm: Clean up desc.h a bit
        x86, amd: Do not enable ARAT feature on AMD processors below family 0x12
        x86: Move do_page_fault()'s error path under unlikely()
        x86, efi: Retain boot service code until after switching to virtual mode
        x86: Remove unnecessary check in detect_ht()
        x86: Reorder mm_context_t to remove x86_64 alignment padding and thus shrink mm_struct
        x86, UV: Clean up uv_tlb.c
        x86, UV: Add support for SGI UV2 hub chip
        x86, cpufeature: Update CPU feature RDRND to RDRAND
      a947e23a
    • L
      Merge branch 'sched-urgent-for-linus' of... · 08a8b796
      Linus Torvalds 提交于
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        cpuset: Fix cpuset_cpus_allowed_fallback(), don't update tsk->rt.nr_cpus_allowed
        sched: Fix ->min_vruntime calculation in dequeue_entity()
        sched: Fix ttwu() for __ARCH_WANT_INTERRUPTS_ON_CTXSW
        sched: More sched_domain iterations fixes
      08a8b796
    • L
      Merge branch 'core-urgent-for-linus' of... · 1ba4b8cb
      Linus Torvalds 提交于
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        rcu: Start RCU kthreads in TASK_INTERRUPTIBLE state
        rcu: Remove waitqueue usage for cpu, node, and boost kthreads
        rcu: Avoid acquiring rcu_node locks in timer functions
        atomic: Add atomic_or()
        Documentation: Add statistics about nested locks
        rcu: Decrease memory-barrier usage based on semi-formal proof
        rcu: Make rcu_enter_nohz() pay attention to nesting
        rcu: Don't do reschedule unless in irq
        rcu: Remove old memory barriers from rcu_process_callbacks()
        rcu: Add memory barriers
        rcu: Fix unpaired rcu_irq_enter() from locking selftests
      1ba4b8cb
    • L
      Merge branch 'perf-urgent-for-linus' of... · c4a227d8
      Linus Torvalds 提交于
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (25 commits)
        perf: Fix SIGIO handling
        perf top: Don't stop if no kernel symtab is found
        perf top: Handle kptr_restrict
        perf top: Remove unused macro
        perf events: initialize fd array to -1 instead of 0
        perf tools: Make sure kptr_restrict warnings fit 80 col terms
        perf tools: Fix build on older systems
        perf symbols: Handle /proc/sys/kernel/kptr_restrict
        perf: Remove duplicate headers
        ftrace: Add internal recursive checks
        tracing: Update btrfs's tracepoints to use u64 interface
        tracing: Add __print_symbolic_u64 to avoid warnings on 32bit machine
        ftrace: Set ops->flag to enabled even on static function tracing
        tracing: Have event with function tracer check error return
        ftrace: Have ftrace_startup() return failure code
        jump_label: Check entries limit in __jump_label_update
        ftrace/recordmcount: Avoid STT_FUNC symbols as base on ARM
        scripts/tags.sh: Add magic for trace-events for etags too
        scripts/tags.sh: Fix ctags for DEFINE_EVENT()
        x86/ftrace: Fix compiler warning in ftrace.c
        ...
      c4a227d8
    • L
      Merge branch 'for-usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci · 87367a0b
      Linus Torvalds 提交于
      * 'for-usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci:
        Intel xhci: Limit number of active endpoints to 64.
        Intel xhci: Ignore spurious successful event.
        Intel xhci: Support EHCI/xHCI port switching.
        Intel xhci: Add PCI id for Panther Point xHCI host.
        xhci: STFU: Be quieter during URB submission and completion.
        xhci: STFU: Don't print event ring dequeue pointer.
        xhci: STFU: Remove function tracing.
        xhci: Don't submit commands when the host is dead.
        xhci: Clear stopped_td when Stop Endpoint command completes.
      87367a0b
    • L
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx · 4cb865de
      Linus Torvalds 提交于
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (33 commits)
        x86: poll waiting for I/OAT DMA channel status
        maintainers: add dma engine tree details
        dmaengine: add TODO items for future work on dma drivers
        dmaengine: Add API documentation for slave dma usage
        dmaengine/dw_dmac: Update maintainer-ship
        dmaengine: move link order
        dmaengine/dw_dmac: implement pause and resume in dwc_control
        dmaengine/dw_dmac: Replace spin_lock* with irqsave variants and enable submission from callback
        dmaengine/dw_dmac: Divide one sg to many desc, if sg len is greater than DWC_MAX_COUNT
        dmaengine/dw_dmac: set residue as total len in dwc_tx_status if status is !DMA_SUCCESS
        dmaengine/dw_dmac: don't call callback routine in case dmaengine_terminate_all() is called
        dmaengine: at_hdmac: pause: no need to wait for FIFO empty
        pch_dma: modify pci device table definition
        pch_dma: Support new device ML7223 IOH
        pch_dma: Support I2S for ML7213 IOH
        pch_dma: Fix DMA setting issue
        pch_dma: modify for checkpatch
        pch_dma: fix dma direction issue for ML7213 IOH video-in
        dmaengine: at_hdmac: use descriptor chaining help function
        dmaengine: at_hdmac: implement pause and resume in atc_control
        ...
      
      Fix up trivial conflict in drivers/dma/dw_dmac.c
      4cb865de
    • L
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 · 55f08e1b
      Linus Torvalds 提交于
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
        mfd: Fix build breakage caused by tps65910 gpio directory move
        mfd: Use mfd cell platform_data for db8500-prcmu cells platform bits
      55f08e1b
    • L
      Merge branch 'spi/next' of git://git.secretlab.ca/git/linux-2.6 · d02bf062
      Linus Torvalds 提交于
      * 'spi/next' of git://git.secretlab.ca/git/linux-2.6:
        spi/spi_bfin_sport: new driver for a SPI bus via the Blackfin SPORT peripheral
        spi/tle620x: add missing device_remove_file()
      d02bf062
    • L
      Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6 · 04830fcc
      Linus Torvalds 提交于
      * 'gpio/next' of git://git.secretlab.ca/git/linux-2.6:
        gpio/pch_gpio: Support new device ML7223
        gpio: make gpio_{request,free}_array gpio array parameter const
        GPIO: OMAP: move to drivers/gpio
        GPIO: OMAP: move register offset defines into <plat/gpio.h>
        gpio: Convert gpio_is_valid to return bool
        gpio: Move the s5pc100 GPIO to drivers/gpio
        gpio: Move the s5pv210 GPIO to drivers/gpio
        gpio: Move the exynos4 GPIO to drivers/gpio
        gpio: Move to Samsung common GPIO library to drivers/gpio
        gpio/nomadik: add function to read GPIO pull down status
        gpio/nomadik: show all pins in debug
        gpio: move Nomadik GPIO driver to drivers/gpio
        gpio: move U300 GPIO driver to drivers/gpio
        langwell_gpio: add runtime pm support
        gpio/pca953x: Add support for pca9574 and pca9575 devices
        gpio/cs5535: Show explicit dependency between gpio_cs5535 and mfd_cs5535
      04830fcc
    • L
      Merge branch 'setns' · 571503e1
      Linus Torvalds 提交于
      * setns:
        ns: Wire up the setns system call
      
      Done as a merge to make it easier to fix up conflicts in arm due to
      addition of sendmmsg system call
      571503e1
    • E
      ns: Wire up the setns system call · 7b21fddd
      Eric W. Biederman 提交于
      32bit and 64bit on x86 are tested and working.  The rest I have looked
      at closely and I can't find any problems.
      
      setns is an easy system call to wire up.  It just takes two ints so I
      don't expect any weird architecture porting problems.
      
      While doing this I have noticed that we have some architectures that are
      very slow to get new system calls.  cris seems to be the slowest where
      the last system calls wired up were preadv and pwritev.  avr32 is weird
      in that recvmmsg was wired up but never declared in unistd.h.  frv is
      behind with perf_event_open being the last syscall wired up.  On h8300
      the last system call wired up was epoll_wait.  On m32r the last system
      call wired up was fallocate.  mn10300 has recvmmsg as the last system
      call wired up.  The rest seem to at least have syncfs wired up which was
      new in the 2.6.39.
      
      v2: Most of the architecture support added by Daniel Lezcano <dlezcano@fr.ibm.com>
      v3: ported to v2.6.36-rc4 by: Eric W. Biederman <ebiederm@xmission.com>
      v4: Moved wiring up of the system call to another patch
      v5: ported to v2.6.39-rc6
      v6: rebased onto parisc-next and net-next to avoid syscall  conflicts.
      v7: ported to Linus's latest post 2.6.39 tree.
      
      >  arch/blackfin/include/asm/unistd.h     |    3 ++-
      >  arch/blackfin/mach-common/entry.S      |    1 +
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      
      Oh - ia64 wiring looks good.
      Acked-by: NTony Luck <tony.luck@intel.com>
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7b21fddd
    • A
      Cache xattr security drop check for write v2 · 69b45732
      Andi Kleen 提交于
      Some recent benchmarking on btrfs showed that a major scaling bottleneck
      on large systems on btrfs is currently the xattr lookup on every write.
      
      Why xattr lookup on every write I hear you ask?
      
      write wants to drop suid and security related xattrs that could set o
      capabilities for executables.  To do that it currently looks up
      security.capability on EVERY write (even for non executables) to decide
      whether to drop it or not.
      
      In btrfs this causes an additional tree walk, hitting some per file system
      locks and quite bad scalability. In a simple read workload on a 8S
      system I saw over 90% CPU time in spinlocks related to that.
      
      Chris Mason tells me this is also a problem in ext4, where it hits
      the global mbcache lock.
      
      This patch adds a simple per inode to avoid this problem.  We only
      do the lookup once per file and then if there is no xattr cache
      the decision. All xattr changes clear the flag.
      
      I also used the same flag to avoid the suid check, although
      that one is pretty cheap.
      
      A file system can also set this flag when it creates the inode,
      if it has a cheap way to do so.  This is done for some common file systems
      in followon patches.
      
      With this patch a major part of the lock contention disappears
      for btrfs. Some testing on smaller systems didn't show significant
      performance changes, but at least it helps the larger systems
      and is generally more efficient.
      
      v2: Rename is_sgid. add file system helper.
      Cc: chris.mason@oracle.com
      Cc: josef@redhat.com
      Cc: viro@zeniv.linux.org.uk
      Cc: agruen@linbit.com
      Cc: Serge E. Hallyn <serue@us.ibm.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      69b45732
  2. 28 5月, 2011 26 次提交