1. 13 Nov, 2006 9 commits
    • Pavel Emelianov's avatar
      [PATCH] Fix misrouted interrupts deadlocks · f72fa707
      Pavel Emelianov authored
      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: default avatarIngo Molnar <mingo@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      f72fa707
    • Sharyathi Nagesh's avatar
      [PATCH] fix Data Acess error in dup_fd · 0130b0b3
      Sharyathi Nagesh authored
      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: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0130b0b3
    • Franck Bui-Huu's avatar
      [PATCH] .gitignore: add miscellaneous files · 5fd934a9
      Franck Bui-Huu authored
      Prevent git from reporting this useless status:
      
      	On branch refs/heads/master
      	Untracked files:
      	  (use "git add" to add to commit)
      
      	      TAGS
      	      scripts/kconfig/lkc_defs.h
      	      scripts/kconfig/qconf.moc
      	nothing to commit
      Signed-off-by: default avatarFranck Bui-Huu <fbuihuu@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      5fd934a9
    • Russell King's avatar
      [PATCH] Fix missing parens in set_personality() · d8b295f2
      Russell King authored
      If you call set_personality() with an expression such as:
      
      	set_personality(foo ? PERS_FOO1 : PERS_FOO2);
      
      then this evaluates to:
      
      	((current->personality == foo ? PERS_FOO1 : PERS_FOO2) ? ...
      
      which is obviously not the intended result.  Add the missing parents
      to ensure this gets evaluated as expected:
      
      	((current->personality == (foo ? PERS_FOO1 : PERS_FOO2)) ? ...
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      d8b295f2
    • Wink Saville's avatar
      [PATCH] Patch for nvidia divide by zero error for 7600 pci-express card · e40c6759
      Wink Saville authored
      The following patch resolves the divide by zero error I encountered on my
      system:
      
      	http://marc.10east.com/?l=linux-fbdev-devel&m=116058257024413&w=2
      
      I accomplished this by merging what I thought was appropriate from:
      
      	http://webcvs.freedesktop.org/xorg/driver/xf86-video-nv/src/Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      e40c6759
    • Corey Minyard's avatar
      [PATCH] IPMI: Fix more && typos · 7947d2cc
      Corey Minyard authored
      Fix improper use of "&&" when "&" was intended.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      7947d2cc
    • Jes Sorensen's avatar
      [PATCH] mspec driver build fix · 1a4b0fc5
      Jes Sorensen authored
      Fix MSPEC driver to build for non SN2 enabled configs as the driver should
      work in cached and uncached modes (no fetchop) on these systems.  In
      addition make MSPEC select IA64_UNCACHED_ALLOCATOR, which is required for
      it and move it to arch/ia64/Kconfig to avoid warnings on non ia64
      architectures running allmodconfig.  Once the Kconfig code is fixed, we can
      move it back.
      Signed-off-by: default avatarJes Sorensen <jes@sgi.com>
      Cc: Fernando Luis Vzquez Cao <fernando@oss.ntt.co.jp>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      1a4b0fc5
    • David Miller's avatar
      [PATCH] pci: don't try to remove sysfs files before they are setup. · d67afe5e
      David Miller authored
      The PCI sysfs attributes are created after the initial PCI bus scan.  With
      the addition of more return value checking and assertions in the device and
      sysfs layers we now can get dumps like this on sparc64:
      
      [   20.135032] Call Trace:
      [   20.135042]  [0000000000537f88] pci_remove_bus_device+0x30/0xc0
      [   20.135076]  [000000000078f890] pci_fill_in_pbm_cookies+0x98/0x440
      [   20.135109]  [000000000042e828] sabre_scan_bus+0x230/0x400
      [   20.135139]  [000000000078c710] pcibios_init+0x58/0xa0
      [   20.135159]  [0000000000416f14] init+0x9c/0x2e0
      [   20.135190]  [0000000000417a50] kernel_thread+0x38/0x60
      [   20.135211]  [0000000000417170] rest_init+0x18/0x40
      [   20.135514] PCI0(PBMB): Bus running at 33MHz
      
      It's triggering because removal of the "config" PCI sysfs file for the
      device fails.
      
      On sparc64, after probing the device, we'll delete the PCI device via
      pci_remove_bus_device() if we cannot find the firmware device tree node
      corresponding to it.
      
      This is fine, but at this point the sysfs files for the PCI device won't be
      setup yet.
      
      So we should not try to do anything in pci_remove_sysfs_dev_files() if
      pci_sysfs_init() has not run yet.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      d67afe5e
    • Eric Dumazet's avatar
      [PATCH] vmalloc: optimization, cleanup, bugfixes · 2b4ac44e
      Eric Dumazet authored
      - reorder 'struct vm_struct' to speedup lookups on CPUS with small cache
        lines.  The fields 'next,addr,size' should be now in the same cache line,
        to speedup lookups.
      
      - One minor cleanup in __get_vm_area_node()
      
      - Bugfixes in vmalloc_user() and vmalloc_32_user() NULL returns from
        __vmalloc() and __find_vm_area() were not tested.
      
      [akpm@osdl.org: remove redundant BUG_ONs]
      Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      2b4ac44e
  2. 09 Nov, 2006 24 commits
  3. 08 Nov, 2006 7 commits