1. 03 12月, 2010 8 次提交
  2. 02 12月, 2010 13 次提交
  3. 01 12月, 2010 19 次提交
    • D
      xfs: only run xfs_error_test if error injection is active · c76febef
      Dave Chinner 提交于
      Recent tests writing lots of small files showed the flusher thread
      being CPU bound and taking a long time to do allocations on a debug
      kernel. perf showed this as the prime reason:
      
                   samples  pcnt function                    DSO
                   _______ _____ ___________________________ _________________
      
                 224648.00 36.8% xfs_error_test              [kernel.kallsyms]
                  86045.00 14.1% xfs_btree_check_sblock      [kernel.kallsyms]
                  39778.00  6.5% prandom32                   [kernel.kallsyms]
                  37436.00  6.1% xfs_btree_increment         [kernel.kallsyms]
                  29278.00  4.8% xfs_btree_get_rec           [kernel.kallsyms]
                  27717.00  4.5% random32                    [kernel.kallsyms]
      
      Walking btree blocks during allocation checking them requires each
      block (a cache hit, so no I/O) call xfs_error_test(), which then
      does a random32() call as the first operation.  IOWs, ~50% of the
      CPU is being consumed just testing whether we need to inject an
      error, even though error injection is not active.
      
      Kill this overhead when error injection is not active by adding a
      global counter of active error traps and only calling into
      xfs_error_test when fault injection is active.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      c76febef
    • D
      xfs: avoid moving stale inodes in the AIL · de25c181
      Dave Chinner 提交于
      When an inode has been marked stale because the cluster is being
      freed, we don't want to (re-)insert this inode into the AIL. There
      is a race condition where the cluster buffer may be unpinned before
      the inode is inserted into the AIL during transaction committed
      processing. If the buffer is unpinned before the inode item has been
      committed and inserted, then it is possible for the buffer to be
      released and hence processthe stale inode callbacks before the inode
      is inserted into the AIL.
      
      In this case, we then insert a clean, stale inode into the AIL which
      will never get removed by an IO completion. It will, however, get
      reclaimed and that triggers an assert in xfs_inode_free()
      complaining about freeing an inode still in the AIL.
      
      This race can be avoided by not moving stale inodes forward in the AIL
      during transaction commit completion processing. This closes the
      race condition by ensuring we never insert clean stale inodes into
      the AIL. It is safe to do this because a dirty stale inode, by
      definition, must already be in the AIL.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      de25c181
    • D
      xfs: delayed alloc blocks beyond EOF are valid after writeback · 309c8480
      Dave Chinner 提交于
      There is an assumption in the parts of XFS that flushing a dirty
      file will make all the delayed allocation blocks disappear from an
      inode. That is, that after calling xfs_flush_pages() then
      ip->i_delayed_blks will be zero.
      
      This is an invalid assumption as we may have specualtive
      preallocation beyond EOF and they are recorded in
      ip->i_delayed_blks. A flush of the dirty pages of an inode will not
      change the state of these blocks beyond EOF, so a non-zero
      deeelalloc block count after a flush is valid.
      
      The bmap code has an invalid ASSERT() that needs to be removed, and
      the swapext code has a bug in that while it swaps the data forks
      around, it fails to swap the i_delayed_blks counter associated with
      the fork and hence can get the block accounting wrong.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      309c8480
    • D
      xfs: push stale, pinned buffers on trylock failures · 90810b9e
      Dave Chinner 提交于
      As reported by Nick Piggin, XFS is suffering from long pauses under
      highly concurrent workloads when hosted on ramdisks. The problem is
      that an inode buffer is stuck in the pinned state in memory and as a
      result either the inode buffer or one of the inodes within the
      buffer is stopping the tail of the log from being moved forward.
      
      The system remains in this state until a periodic log force issued
      by xfssyncd causes the buffer to be unpinned. The main problem is
      that these are stale buffers, and are hence held locked until the
      transaction/checkpoint that marked them state has been committed to
      disk. When the filesystem gets into this state, only the xfssyncd
      can cause the async transactions to be committed to disk and hence
      unpin the inode buffer.
      
      This problem was encountered when scaling the busy extent list, but
      only the blocking lock interface was fixed to solve the problem.
      Extend the same fix to the buffer trylock operations - if we fail to
      lock a pinned, stale buffer, then force the log immediately so that
      when the next attempt to lock it comes around, it will have been
      unpinned.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      90810b9e
    • D
      xfs: fix failed write truncation handling. · c726de44
      Dave Chinner 提交于
      Since the move to the new truncate sequence we call xfs_setattr to
      truncate down excessively instanciated blocks.  As shown by the testcase
      in kernel.org BZ #22452 that doesn't work too well.  Due to the confusion
      of the internal inode size, and the VFS inode i_size it zeroes data that
      it shouldn't.
      
      But full blown truncate seems like overkill here.  We only instanciate
      delayed allocations in the write path, and given that we never released
      the iolock we can't have converted them to real allocations yet either.
      
      The only nasty case is pre-existing preallocation which we need to skip.
      We already do this for page discard during writeback, so make the delayed
      allocation block punching a generic function and call it from the failed
      write path as well as xfs_aops_discard_page. The callers are
      responsible for ensuring that partial blocks are not truncated away,
      and that they hold the ilock.
      
      Based on a fix originally from Christoph Hellwig. This version used
      filesystem blocks as the range unit.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      c726de44
    • L
      Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 · fb82155d
      Linus Torvalds 提交于
      * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
        drm/radeon/kms: add workaround for dce3 ddc line vbios bug
        drm/radeon/kms: fix interlaced and doublescan handling
        drm/radeon/kms: fix typos in disabled vbios code
        Revert "drm/i915/dp: use VBT provided eDP params if available"
        drm/i915: Clear pfit registers when not used by any outputs
        drm: record monitor status in output_poll_execute
        drm: Set connector DPMS status to ON in drm_crtc_helper_set_config
        drm/i915: fix regression due to ba3d8d74
        Revert "drm/radeon/kms: fix typo in r600 cs checker"
        drm/i915/sdvo: Always add a 30ms delay to make SDVO TV detection reliable
        MAINTAINERS: INTEL DRM DRIVERS list (intel-gfx) is subscribers-only
        drm/i915/sdvo: Always fallback to querying the shared DDC line
        drm/i915: Handle pagefaults in execbuffer user relocations
        drm/i915/sdvo: Only enable HDMI encodings only if the commandset is supported
        drm/radeon/kms: fix resume regression for some r5xx laptops
        drm/radeon/kms: fix regression in rs4xx i2c setup
        drm/i915: Only save/restore cursor regs if !KMS
        drm/i915: Prevent integer overflow when validating the execbuffer
      fb82155d
    • A
    • A
      drm/radeon/kms: fix interlaced and doublescan handling · c49948f4
      Alex Deucher 提交于
      Signed-off-by: NAlex Deucher <alexdeucher@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      c49948f4
    • A
      drm/radeon/kms: fix typos in disabled vbios code · 0ec80d64
      Alex Deucher 提交于
      6xx/7xx was hitting the wrong BUS_CNTL reg and bits.
      Signed-off-by: NAlex Deucher <alexdeucher@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      0ec80d64
    • D
      Merge remote branch 'intel/drm-intel-fixes' of /ssd/git/drm-next into drm-fixes · 150f8815
      Dave Airlie 提交于
      * 'intel/drm-intel-fixes' of /ssd/git/drm-next:
        Revert "drm/i915/dp: use VBT provided eDP params if available"
        drm/i915: Clear pfit registers when not used by any outputs
        drm/i915: fix regression due to ba3d8d74
      150f8815
    • L
      Merge branch 'for_linus' of git://github.com/at91linux/linux-2.6-at91 · 22a5b566
      Linus Torvalds 提交于
      * 'for_linus' of git://github.com/at91linux/linux-2.6-at91:
        at91/board-yl-9200: fix typo in video support
        atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'
        at91/picotux200: remove commenting usb device and dataflash support
        at91: rename rm9200ek and rm9200dk board file name
        at91rm9200ek: fix warning: 'ek_mmc_data' defined but not used
        at91rm9200dk: fix warning: 'dk_mmc_data' defined but not used
        at91: Convert remaining boards to new-style UART initialization
        at91: merge all at91rm9200 defconfig in one single file
      22a5b566
    • O
      exec: copy-and-paste the fixes into compat_do_execve() paths · 114279be
      Oleg Nesterov 提交于
      Note: this patch targets 2.6.37 and tries to be as simple as possible.
      That is why it adds more copy-and-paste horror into fs/compat.c and
      uglifies fs/exec.c, this will be cleanuped later.
      
      compat_copy_strings() plays with bprm->vma/mm directly and thus has
      two problems: it lacks the RLIMIT_STACK check and argv/envp memory
      is not visible to oom killer.
      
      Export acct_arg_size() and get_arg_page(), change compat_copy_strings()
      to use get_arg_page(), change compat_do_execve() to do acct_arg_size(0)
      as do_execve() does.
      
      Add the fatal_signal_pending/cond_resched checks into compat_count() and
      compat_copy_strings(), this matches the code in fs/exec.c and certainly
      makes sense.
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      114279be
    • O
      exec: make argv/envp memory visible to oom-killer · 3c77f845
      Oleg Nesterov 提交于
      Brad Spengler published a local memory-allocation DoS that
      evades the OOM-killer (though not the virtual memory RLIMIT):
      http://www.grsecurity.net/~spender/64bit_dos.c
      
      execve()->copy_strings() can allocate a lot of memory, but
      this is not visible to oom-killer, nobody can see the nascent
      bprm->mm and take it into account.
      
      With this patch get_arg_page() increments current's MM_ANONPAGES
      counter every time we allocate the new page for argv/envp. When
      do_execve() succeds or fails, we change this counter back.
      
      Technically this is not 100% correct, we can't know if the new
      page is swapped out and turn MM_ANONPAGES into MM_SWAPENTS, but
      I don't think this really matters and everything becomes correct
      once exec changes ->mm or fails.
      Reported-by: NBrad Spengler <spender@grsecurity.net>
      Reviewed-and-discussed-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3c77f845
    • G
    • G
    • J
      cifs: fix parsing of hostname in dfs referrals · ba038648
      Jeff Layton 提交于
      The DFS referral parsing code does a memchr() call to find the '\\'
      delimiter that separates the hostname in the referral UNC from the
      sharename. It then uses that value to set the length of the hostname via
      pointer subtraction.  Instead of subtracting the start of the hostname
      however, it subtracts the start of the UNC, which causes the code to
      pass in a hostname length that is 2 bytes too long.
      
      Regression introduced in commit 1a4240f4.
      Reported-and-Tested-by: NRobbert Kouprie <robbert@exx.nl>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Cc: Wang Lei <wang840925@gmail.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      ba038648
    • A
      USB: fix autosuspend bug in usb-serial · abf03184
      Alan Stern 提交于
      This patch (as1437) fixes a bug in the usb-serial autosuspend
      handling.  Since the usb-serial core now has autosuspend support, it
      must set the .supports_autosuspend member in every serial driver it
      registers.  Otherwise the usb_autopm_get_interface() call won't work.
      
      This fixes Bugzilla #23012.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: stable@kernel.org
      Reported-by: NKevin Smith <thirdwiggin@gmail.com>
      Reported-and-tested-by: NSimon Gerber <gesimu@gmail.com>
      Reported-and-tested-by: NMatteo Croce <matteo@openwrt.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      abf03184
    • B
      USB: ehci: disable LPM and PPCD for nVidia MCP89 chips · a85b4e7f
      Brian J. Tarricone 提交于
      Tested on MacBookAir3,1.  Without this, we get EPROTO errors when
      fetching device config descriptors.
      Signed-off-by: NBrian Tarricone <brian@tarricone.org>
      Reported-by: NBenoit Gschwind <gschwind@gnu-log.net>
      Tested-by: NEdgar Hucek <gimli@dark-green.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a85b4e7f
    • J
      USB: serial: ftdi_sio: Vardaan USB RS422/485 converter PID added · 6fdbad80
      Jacques Viviers 提交于
      Add the PID for the Vardaan Enterprises VEUSB422R3 USB to RS422/485
      converter. It uses the same chip as the FTDI_8U232AM_PID 0x6001.
      
      This should also work with the stable branches for:
      2.6.31, 2.6.32, 2.6.33, 2.6.34, 2.6.35, 2.6.36
      Signed-off-by: NJacques Viviers <jacques.viviers@gmail.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6fdbad80