1. 03 12月, 2006 3 次提交
  2. 02 12月, 2006 1 次提交
  3. 29 11月, 2006 2 次提交
  4. 26 11月, 2006 2 次提交
  5. 23 11月, 2006 1 次提交
  6. 18 11月, 2006 1 次提交
    • I
      [PATCH] lockdep: fix static keys in module-allocated percpu areas · 1ff56830
      Ingo Molnar 提交于
      lockdep got confused by certain locks in modules:
      
       INFO: trying to register non-static key.
       the code is fine but needs lockdep annotation.
       turning off the locking correctness validator.
      
       Call Trace:
        [<ffffffff8026f40d>] dump_trace+0xaa/0x3f2
        [<ffffffff8026f78f>] show_trace+0x3a/0x60
        [<ffffffff8026f9d1>] dump_stack+0x15/0x17
        [<ffffffff802abfe8>] __lock_acquire+0x724/0x9bb
        [<ffffffff802ac52b>] lock_acquire+0x4d/0x67
        [<ffffffff80267139>] rt_spin_lock+0x3d/0x41
        [<ffffffff8839ed3f>] :ip_conntrack:__ip_ct_refresh_acct+0x131/0x174
        [<ffffffff883a1334>] :ip_conntrack:udp_packet+0xbf/0xcf
        [<ffffffff8839f9af>] :ip_conntrack:ip_conntrack_in+0x394/0x4a7
        [<ffffffff8023551f>] nf_iterate+0x41/0x7f
        [<ffffffff8025946a>] nf_hook_slow+0x64/0xd5
        [<ffffffff802369a2>] ip_rcv+0x24e/0x506
        [...]
      
      Steven Rostedt found the bug: static_obj() check did not take
      PERCPU_ENOUGH_ROOM into account, so in-module DEFINE_PER_CPU-area locks
      were triggering this message.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1ff56830
  7. 17 11月, 2006 1 次提交
    • Z
      [PATCH] some irq_chip variables point to NULL · b86432b4
      Zhang, Yanmin 提交于
      I got an oops when booting 2.6.19-rc5-mm1 on my ia64 machine.
      
      Below is the log.
      
      Oops 11012296146944 [1]
      Modules linked in: binfmt_misc dm_mirror dm_multipath dm_mod thermal processor f
      an container button sg eepro100 e100 mii
      
      Pid: 0, CPU 0, comm:              swapper
      psr : 0000121008022038 ifs : 800000000000040b ip  : [<a0000001000e1411>]    Not
      tainted
      ip is at __do_IRQ+0x371/0x3e0
      unat: 0000000000000000 pfs : 000000000000040b rsc : 0000000000000003
      rnat: 656960155aa56aa5 bsps: a00000010058b890 pr  : 656960155aa55a65
      ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c0270033f
      csd : 0000000000000000 ssd : 0000000000000000
      b0  : a0000001000e1390 b6  : a0000001005beac0 b7  : e00000007f01aa00
      f6  : 000000000000000000000 f7  : 0ffe69090000000000000
      f8  : 1000a9090000000000000 f9  : 0ffff8000000000000000
      f10 : 1000a908ffffff6f70000 f11 : 1003e0000000000000909
      r1  : a000000100fbbff0 r2  : 0000000000010002 r3  : 0000000000010001
      r8  : fffffffffffbffff r9  : a000000100bd8060 r10 : a000000100dd83b8
      r11 : fffffffffffeffff r12 : a000000100bcbbb0 r13 : a000000100bc4000
      r14 : 0000000000010000 r15 : 0000000000010000 r16 : a000000100c01aa8
      r17 : a000000100d2c350 r18 : 0000000000000000 r19 : a000000100d2c300
      r20 : a000000100c01a88 r21 : 0000000080010100 r22 : a000000100c01ac0
      r23 : a0000001000108e0 r24 : e000000477980004 r25 : 0000000000000000
      r26 : 0000000000000000 r27 : e00000000913400c r28 : e0000004799ee51c
      r29 : e0000004778b87f0 r30 : a000000100d2c300 r31 : a00000010005c7e0
      
      Call Trace:
       [<a000000100014600>] show_stack+0x40/0xa0
                                      sp=a000000100bcb760 bsp=a000000100bc4f40
       [<a000000100014f00>] show_regs+0x840/0x880
                                      sp=a000000100bcb930 bsp=a000000100bc4ee8
       [<a000000100037fb0>] die+0x250/0x320
                                      sp=a000000100bcb930 bsp=a000000100bc4ea0
       [<a00000010005e5f0>] ia64_do_page_fault+0x8d0/0xa20
                                      sp=a000000100bcb950 bsp=a000000100bc4e50
       [<a00000010000caa0>] ia64_leave_kernel+0x0/0x290
                                      sp=a000000100bcb9e0 bsp=a000000100bc4e50
       [<a0000001000e1410>] __do_IRQ+0x370/0x3e0
                                      sp=a000000100bcbbb0 bsp=a000000100bc4df0
       [<a000000100011f50>] ia64_handle_irq+0x170/0x220
                                      sp=a000000100bcbbb0 bsp=a000000100bc4dc0
       [<a00000010000caa0>] ia64_leave_kernel+0x0/0x290
                                      sp=a000000100bcbbb0 bsp=a000000100bc4dc0
       [<a000000100012390>] ia64_pal_call_static+0x90/0xc0
                                      sp=a000000100bcbd80 bsp=a000000100bc4d78
       [<a000000100015630>] default_idle+0x90/0x160
                                      sp=a000000100bcbd80 bsp=a000000100bc4d58
       [<a000000100014290>] cpu_idle+0x1f0/0x440
                                      sp=a000000100bcbe20 bsp=a000000100bc4d18
       [<a000000100009980>] rest_init+0xc0/0xe0
                                      sp=a000000100bcbe20 bsp=a000000100bc4d00
       [<a0000001009f8ea0>] start_kernel+0x6a0/0x6c0
                                      sp=a000000100bcbe20 bsp=a000000100bc4ca0
       [<a0000001000089f0>] __end_ivt_text+0x6d0/0x6f0
                                      sp=a000000100bcbe30 bsp=a000000100bc4c00
       <0>Kernel panic - not syncing: Aiee, killing interrupt handler!
      
      The root cause is that some irq_chip variables, especially ia64_msi_chip,
      initiate their memeber end to point to NULL. __do_IRQ doesn't check
      if irq_chip->end is null and just calls it after processing the interrupt.
      
      As irq_chip->end is called at many places, so I fix it by reinitiating
      irq_chip->end to dummy_irq_chip.end, e.g., a noop function.
      Signed-off-by: NZhang Yanmin <yanmin.zhang@intel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b86432b4
  8. 15 11月, 2006 2 次提交
    • L
      Revert "[PATCH] fix Data Acess error in dup_fd" · 9a3a04ac
      Linus Torvalds 提交于
      This reverts commit 0130b0b3.
      
      Sergey Vlasov points out (and Vadim Lobanov concurs) that the bug it was
      supposed to fix must be some unrelated memory corruption, and the "fix"
      actually causes more problems:
      
        "However, the new code does not look safe in all cases.  If some other
         task has opened more files while dup_fd() released oldf->file_lock, the
         new code will update open_files to the new larger value.  But newf was
         allocated with the old smaller value of open_files, therefore subsequent
         accesses to newf may try to write into unallocated memory."
      
      so revert it.
      
      Cc: Sharyathi Nagesh <sharyath@in.ibm.com>
      Cc: Sergey Vlasov <vsu@altlinux.ru>
      Cc: Vadim Lobanov <vlobanov@speakeasy.net>
      Cc: Andrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9a3a04ac
    • A
      [PATCH] setup_irq(): better mismatch debugging · 8b126b77
      Andrew Morton 提交于
      When we get a mismatch between handlers on the same IRQ, all we get is "IRQ
      handler type mismatch for IRQ n".  Let's print the name of the
      presently-registered handler with which we got the mismatch.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8b126b77
  9. 13 11月, 2006 2 次提交
    • P
      [PATCH] Fix misrouted interrupts deadlocks · f72fa707
      Pavel Emelianov 提交于
      While testing kernel on machine with "irqpoll" option I've caught such a
      lockup:
      
      	__do_IRQ()
      	   spin_lock(&desc->lock);
                 desc->chip->ack(); /* IRQ is ACKed */
      	note_interrupt()
      	misrouted_irq()
      	handle_IRQ_event()
                 if (...)
      	      local_irq_enable_in_hardirq();
      	/* interrupts are enabled from now */
      	...
      	__do_IRQ() /* same IRQ we've started from */
      	   spin_lock(&desc->lock); /* LOCKUP */
      
      Looking at misrouted_irq() code I've found that a potential deadlock like
      this can also take place:
      
      1CPU:
      __do_IRQ()
         spin_lock(&desc->lock); /* irq = A */
      misrouted_irq()
         for (i = 1; i < NR_IRQS; i++) {
            spin_lock(&desc->lock); /* irq = B */
            if (desc->status & IRQ_INPROGRESS) {
      
      2CPU:
      __do_IRQ()
         spin_lock(&desc->lock); /* irq = B */
      misrouted_irq()
         for (i = 1; i < NR_IRQS; i++) {
            spin_lock(&desc->lock); /* irq = A */
            if (desc->status & IRQ_INPROGRESS) {
      
      As the second lock on both CPUs is taken before checking that this irq is
      being handled in another processor this may cause a deadlock.  This issue
      is only theoretical.
      
      I propose the attached patch to fix booth problems: when trying to handle
      misrouted IRQ active desc->lock may be unlocked.
      Acked-by: NIngo Molnar <mingo@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f72fa707
    • S
      [PATCH] fix Data Acess error in dup_fd · 0130b0b3
      Sharyathi Nagesh 提交于
      On running the Stress Test on machine for more than 72 hours following
      error message was observed.
      
      0:mon> e
      cpu 0x0: Vector: 300 (Data Access) at [c00000007ce2f7f0]
          pc: c000000000060d90: .dup_fd+0x240/0x39c
          lr: c000000000060d6c: .dup_fd+0x21c/0x39c
          sp: c00000007ce2fa70
         msr: 800000000000b032
         dar: ffffffff00000028
       dsisr: 40000000
        current = 0xc000000074950980
        paca    = 0xc000000000454500
          pid   = 27330, comm = bash
      
      0:mon> t
      [c00000007ce2fa70] c000000000060d28 .dup_fd+0x1d8/0x39c (unreliable)
      [c00000007ce2fb30] c000000000060f48 .copy_files+0x5c/0x88
      [c00000007ce2fbd0] c000000000061f5c .copy_process+0x574/0x1520
      [c00000007ce2fcd0] c000000000062f88 .do_fork+0x80/0x1c4
      [c00000007ce2fdc0] c000000000011790 .sys_clone+0x5c/0x74
      [c00000007ce2fe30] c000000000008950 .ppc_clone+0x8/0xc
      
      The problem is because of race window.  When if(expand) block is executed in
      dup_fd unlocking of oldf->file_lock give a window for fdtable in oldf to be
      modified.  So actual open_files in oldf may not match with open_files
      variable.
      
      Cc: Vadim Lobanov <vlobanov@speakeasy.net>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0130b0b3
  10. 06 11月, 2006 4 次提交
  11. 05 11月, 2006 2 次提交
    • L
      Make sure "user->sigpending" count is in sync · 10b1fbdb
      Linus Torvalds 提交于
      The previous commit (45c18b0b, aka "Fix
      unlikely (but possible) race condition on task->user access") fixed a
      potential oops due to __sigqueue_alloc() getting its "user" pointer out
      of sync with switch_user(), and accessing a user pointer that had been
      de-allocated on another CPU.
      
      It still left another (much less serious) problem, where a concurrent
      __sigqueue_alloc and swich_user could cause sigqueue_alloc to do signal
      pending reference counting for a _different_ user than the one it then
      actually ended up using.  No oops, but we'd end up with the wrong signal
      accounting.
      
      Another case of Oleg's eagle-eyes picking up the problem.
      
      This is trivially fixed by just making sure we load whichever "user"
      structure we decide to use (it doesn't matter _which_ one we pick, we
      just need to pick one) just once.
      Acked-by: NOleg Nesterov <oleg@tv-sign.ru>
      Cc: Andrew Morton <akpm@osdl.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      10b1fbdb
    • L
      Fix unlikely (but possible) race condition on task->user access · 45c18b0b
      Linus Torvalds 提交于
      There's a possible race condition when doing a "switch_uid()" from one
      user to another, which could race with another thread doing a signal
      allocation and looking at the old thread ->user pointer as it is freed.
      
      This explains an oops reported by Lukasz Trabinski:
      	http://permalink.gmane.org/gmane.linux.kernel/462241
      
      We fix this by delaying the (reference-counted) freeing of the user
      structure until the thread signal handler lock has been released, so
      that we know that the signal allocation has either seen the new value or
      has properly incremented the reference count of the old one.
      
      Race identified by Oleg Nesterov.
      
      Cc: Lukasz Trabinski <lukasz@wsisiz.edu.pl>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Andrew Morton <akpm@osdl.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      45c18b0b
  12. 04 11月, 2006 4 次提交
  13. 01 11月, 2006 1 次提交
  14. 31 10月, 2006 2 次提交
  15. 30 10月, 2006 2 次提交
  16. 29 10月, 2006 10 次提交