1. 07 Mar, 2012 6 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · dac12d1f
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
      1) TCP can chop up SACK'd SKBs below below the unacked send sequence and
         that breaks lots of stuff.  Fix from Neal Cardwell.
      
      2) There is code in ipv6 to properly join and leave the all-routers
         multicast code when the forwarding setting is changed, but once
         forwarding is turned on, we don't do the join for newly registered
         devices.  Fix from Li Wei.
      
      3) Netfilter's NAT module autoload in ctnetlink drops a spinlock around
         a sleeping call, problem is this code path doesn't actually hold that
         lock.  Fix from Pablo Neira Ayuso.
      
      4) TG3 uses the wrong interfaces to hook into the new byte queue limit
         support.  It uses the device level interfaces, which is fine for
         single queue devices, but on more recent chips this driver supports
         multiqueue so we have to use the multiqueue BQL APIs.  Fix from Tom
         Herbert.
      
      5) r8169 resume fix from Francois Romieu.
      
      6) Add some cxgb4 device IDs, from Vipul Pandya.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        IPv6: Fix not join all-router mcast group when forwarding set.
        caif-hsi: Set default MTU to 4096
        cxgb4vf: Add support for Chelsio's T480-CR and T440-LP-CR adapters
        cxgb4: Add support for Chelsio's T480-CR and T440-LP-CR adapters
        mlx4_core: remove buggy sched_queue masking
        netfilter: nf_conntrack: fix early_drop with reliable event delivery
        bridge: netfilter: don't call iptables on vlan packets if sysctl is off
        netfilter: bridge: fix wrong pointer dereference
        netfilter: ctnetlink: remove incorrect spin_[un]lock_bh on NAT module autoload
        netfilter: ebtables: fix wrong name length while copying to user-space
        r8169: runtime resume before shutdown.
        tcp: fix tcp_shift_skb_data() to not shift SACKed data below snd_una
        tg3: Fix to use multi queue BQL interfaces
      dac12d1f
    • Linus Torvalds's avatar
      x86: fix typo in recent find_vma_prev purge · 55062d06
      Linus Torvalds authored
      It turns out that test-compiling this file on x86-64 doesn't really
      help, because much of it is x86-32-specific.  And so I hadn't noticed
      the slightly over-eager removal of the 'r' from 'addr' variable despite
      thinking I had tested it.
      Signed-off-by: default avatarLinus "oopsie" Torvalds <torvalds@linux-foundation.org>
      55062d06
    • Linus Torvalds's avatar
      vm: avoid using find_vma_prev() unnecessarily · 097d5910
      Linus Torvalds authored
      Several users of "find_vma_prev()" were not in fact interested in the
      previous vma if there was no primary vma to be found either.  And in
      those cases, we're much better off just using the regular "find_vma()",
      and then "prev" can be looked up by just checking vma->vm_prev.
      
      The find_vma_prev() semantics are fairly subtle (see Mikulas' recent
      commit 83cd904d: "mm: fix find_vma_prev"), and the whole "return
      prev by reference" means that it generates worse code too.
      
      Thus this "let's avoid using this inconvenient and clearly too subtle
      interface when we don't really have to" patch.
      
      Cc: Mikulas Patocka <mpatocka@redhat.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      097d5910
    • Linus Torvalds's avatar
      Merge git://git.samba.org/sfrench/cifs-2.6 · 71fece95
      Linus Torvalds authored
      Pull CIFS fixes from Steve French
      
      * git://git.samba.org/sfrench/cifs-2.6:
        cifs: fix dentry refcount leak when opening a FIFO on lookup
        CIFS: Fix mkdir/rmdir bug for the non-POSIX case
      71fece95
    • Mikulas Patocka's avatar
      mm: fix find_vma_prev · 83cd904d
      Mikulas Patocka authored
      Commit 6bd4837d ("mm: simplify find_vma_prev()") broke memory
      management on PA-RISC.
      
      After application of the patch, programs that allocate big arrays on the
      stack crash with segfault, for example, this will crash if compiled
      without optimization:
      
        int main()
        {
      	char array[200000];
      	array[199999] = 0;
      	return 0;
        }
      
      The reason is that PA-RISC has up-growing stack and the stack is usually
      the last memory area.  In the above example, a page fault happens above
      the stack.
      
      Previously, if we passed too high address to find_vma_prev, it returned
      NULL and stored the last VMA in *pprev.  After "simplify find_vma_prev"
      change, it stores NULL in *pprev.  Consequently, the stack area is not
      found and it is not expanded, as it used to be before the change.
      
      This patch restores the old behavior and makes it return the last VMA in
      *pprev if the requested address is higher than address of any other VMA.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Acked-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      83cd904d
    • Thomas Gleixner's avatar
      genirq: Clear action->thread_mask if IRQ_ONESHOT is not set · 52abb700
      Thomas Gleixner authored
      Xommit ac563761(genirq: Unmask oneshot irqs when thread was not woken)
      fails to unmask when a !IRQ_ONESHOT threaded handler is handled by
      handle_level_irq.
      
      This happens because thread_mask is or'ed unconditionally in
      irq_wake_thread(), but for !IRQ_ONESHOT interrupts never cleared.  So
      the check for !desc->thread_active fails and keeps the interrupt
      disabled.
      
      Keep the thread_mask zero for !IRQ_ONESHOT interrupts.
      
      Document the thread_mask magic while at it.
      Reported-and-tested-by: default avatarSven Joachim <svenjoac@gmx.de>
      Reported-and-tested-by: default avatarStefan Lippers-Hollmann <s.l-h@gmx.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      52abb700
  2. 06 Mar, 2012 30 commits
  3. 05 Mar, 2012 4 commits
    • Linus Torvalds's avatar
      Merge branch 'akpm' (Andrew's patch bomb) · 3e85fb9c
      Linus Torvalds authored
      Merge the emailed seties of 19 patches from Andrew Morton
      
      * akpm:
        rapidio/tsi721: fix queue wrapping bug in inbound doorbell handler
        memcg: fix mapcount check in move charge code for anonymous page
        mm: thp: fix BUG on mm->nr_ptes
        alpha: fix 32/64-bit bug in futex support
        memcg: fix GPF when cgroup removal races with last exit
        debugobjects: Fix selftest for static warnings
        floppy/scsi: fix setting of BIO flags
        memcg: fix deadlock by inverting lrucare nesting
        drivers/rtc/rtc-r9701.c: fix crash in r9701_remove()
        c2port: class_create() returns an ERR_PTR
        pps: class_create() returns an ERR_PTR, not NULL
        hung_task: fix the broken rcu_lock_break() logic
        vfork: kill PF_STARTING
        coredump_wait: don't call complete_vfork_done()
        vfork: make it killable
        vfork: introduce complete_vfork_done()
        aio: wake up waiters when freeing unused kiocbs
        kprobes: return proper error code from register_kprobe()
        kmsg_dump: don't run on non-error paths by default
      3e85fb9c
    • Alexandre Bounine's avatar
      rapidio/tsi721: fix queue wrapping bug in inbound doorbell handler · b24823e6
      Alexandre Bounine authored
      Fix a bug that causes a kernel panic when the number of received doorbells
      is larger than number of entries in the inbound doorbell queue (current
      default value = 512).
      
      Another possible indication for this bug is large number of spurious
      doorbells reported by tsi721 driver after reaching the queue size maximum.
      Signed-off-by: default avatarAlexandre Bounine <alexandre.bounine@idt.com>
      Cc: Chul Kim <chul.kim@idt.com>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: <stable@vger.kernel.org>		[3.2.x+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b24823e6
    • Naoya Horiguchi's avatar
      memcg: fix mapcount check in move charge code for anonymous page · e6ca7b89
      Naoya Horiguchi authored
      Currently the charge on shared anonyous pages is supposed not to moved in
      task migration.  To implement this, we need to check that mapcount > 1,
      instread of > 2.  So this patch fixes it.
      Signed-off-by: default avatarNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
      Reviewed-by: default avatarDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Hillf Danton <dhillf@gmail.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e6ca7b89
    • Andrea Arcangeli's avatar
      mm: thp: fix BUG on mm->nr_ptes · 1c641e84
      Andrea Arcangeli authored
      Dave Jones reports a few Fedora users hitting the BUG_ON(mm->nr_ptes...)
      in exit_mmap() recently.
      
      Quoting Hugh's discovery and explanation of the SMP race condition:
      
        "mm->nr_ptes had unusual locking: down_read mmap_sem plus
         page_table_lock when incrementing, down_write mmap_sem (or mm_users
         0) when decrementing; whereas THP is careful to increment and
         decrement it under page_table_lock.
      
         Now most of those paths in THP also hold mmap_sem for read or write
         (with appropriate checks on mm_users), but two do not: when
         split_huge_page() is called by hwpoison_user_mappings(), and when
         called by add_to_swap().
      
         It's conceivable that the latter case is responsible for the
         exit_mmap() BUG_ON mm->nr_ptes that has been reported on Fedora."
      
      The simplest way to fix it without having to alter the locking is to make
      split_huge_page() a noop in nr_ptes terms, so by counting the preallocated
      pagetables that exists for every mapped hugepage.  It was an arbitrary
      choice not to count them and either way is not wrong or right, because
      they are not used but they're still allocated.
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Reported-by: default avatarHugh Dickins <hughd@google.com>
      Signed-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Cc: <stable@vger.kernel.org>	[3.0.x, 3.1.x, 3.2.x]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1c641e84