1. 24 Feb, 2011 4 commits
    • Hugh Dickins's avatar
      mm: fix possible cause of a page_mapped BUG · a3e8cc64
      Hugh Dickins authored
      Robert Swiecki reported a BUG_ON(page_mapped) from a fuzzer, punching
      a hole with madvise(,, MADV_REMOVE).  That path is under mutex, and
      cannot be explained by lack of serialization in unmap_mapping_range().
      
      Reviewing the code, I found one place where vm_truncate_count handling
      should have been updated, when I switched at the last minute from one
      way of managing the restart_addr to another: mremap move changes the
      virtual addresses, so it ought to adjust the restart_addr.
      
      But rather than exporting the notion of restart_addr from memory.c, or
      converting to restart_pgoff throughout, simply reset vm_truncate_count
      to 0 to force a rescan if mremap move races with preempted truncation.
      
      We have no confirmation that this fixes Robert's BUG,
      but it is a fix that's worth making anyway.
      Signed-off-by: default avatarHugh Dickins <hughd@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a3e8cc64
    • Miklos Szeredi's avatar
      mm: prevent concurrent unmap_mapping_range() on the same inode · 2aa15890
      Miklos Szeredi authored
      Michael Leun reported that running parallel opens on a fuse filesystem
      can trigger a "kernel BUG at mm/truncate.c:475"
      
      Gurudas Pai reported the same bug on NFS.
      
      The reason is, unmap_mapping_range() is not prepared for more than
      one concurrent invocation per inode.  For example:
      
        thread1: going through a big range, stops in the middle of a vma and
           stores the restart address in vm_truncate_count.
      
        thread2: comes in with a small (e.g. single page) unmap request on
           the same vma, somewhere before restart_address, finds that the
           vma was already unmapped up to the restart address and happily
           returns without doing anything.
      
      Another scenario would be two big unmap requests, both having to
      restart the unmapping and each one setting vm_truncate_count to its
      own value.  This could go on forever without any of them being able to
      finish.
      
      Truncate and hole punching already serialize with i_mutex.  Other
      callers of unmap_mapping_range() do not, and it's difficult to get
      i_mutex protection for all callers.  In particular ->d_revalidate(),
      which calls invalidate_inode_pages2_range() in fuse, may be called
      with or without i_mutex.
      
      This patch adds a new mutex to 'struct address_space' to prevent
      running multiple concurrent unmap_mapping_range() on the same mapping.
      
      [ We'll hopefully get rid of all this with the upcoming mm
        preemptibility series by Peter Zijlstra, the "mm: Remove i_mmap_mutex
        lockbreak" patch in particular.  But that is for 2.6.39 ]
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Reported-by: default avatarMichael Leun <lkml20101129@newton.leun.net>
      Reported-by: default avatarGurudas Pai <gurudas.pai@oracle.com>
      Tested-by: default avatarGurudas Pai <gurudas.pai@oracle.com>
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2aa15890
    • Linus Torvalds's avatar
      Revert "Bluetooth: Enable USB autosuspend by default on btusb" · 78794b2c
      Linus Torvalds authored
      This reverts commit 556ea928.
      
      Jeff Chua reports that it can cause some bluetooth devices (he mentions
      an Bluetooth Intermec scanner) to just stop responding after a while
      with messages like
      
        [ 4533.361959] btusb 8-1:1.0: no reset_resume for driver btusb?
        [ 4533.361964] btusb 8-1:1.1: no reset_resume for driver btusb?
      
      from the kernel. See also
      
        https://bugzilla.kernel.org/show_bug.cgi?id=26182
      
      for other reports.
      Reported-by: default avatarJeff Chua <jeff.chua.linux@gmail.com>
      Reported-by: default avatarAndrew Meakovski <meako@bigmir.net>
      Reported-by: default avatarJim Faulkner <jfaulkne@ccs.neu.edu>
      Acked-by: default avatarGreg KH <gregkh@suse.de>
      Acked-by: default avatarMatthew Garrett <mjg@redhat.com>
      Acked-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
      Cc: stable@kernel.org (for 2.6.37)
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      78794b2c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · ef324285
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (33 commits)
        Added support for usb ethernet (0x0fe6, 0x9700)
        r8169: fix RTL8168DP power off issue.
        r8169: correct settings of rtl8102e.
        r8169: fix incorrect args to oob notify.
        DM9000B: Fix PHY power for network down/up
        DM9000B: Fix reg_save after spin_lock in dm9000_timeout
        net_sched: long word align struct qdisc_skb_cb data
        sfc: lower stack usage in efx_ethtool_self_test
        bridge: Use IPv6 link-local address for multicast listener queries
        bridge: Fix MLD queries' ethernet source address
        bridge: Allow mcast snooping for transient link local addresses too
        ipv6: Add IPv6 multicast address flag defines
        bridge: Add missing ntohs()s for MLDv2 report parsing
        bridge: Fix IPv6 multicast snooping by correcting offset in MLDv2 report
        bridge: Fix IPv6 multicast snooping by storing correct protocol type
        p54pci: update receive dma buffers before and after processing
        fix cfg80211_wext_siwfreq lock ordering...
        rt2x00: Fix WPA TKIP Michael MIC failures.
        ath5k: Fix fast channel switching
        tcp: undo_retrans counter fixes
        ...
      ef324285
  2. 23 Feb, 2011 27 commits
  3. 22 Feb, 2011 9 commits