1. 15 11月, 2006 15 次提交
  2. 14 11月, 2006 19 次提交
  3. 13 11月, 2006 6 次提交
    • A
      [PATCH] SCSI core: always store >= 36 bytes of INQUIRY data · 09123d23
      Alan Stern 提交于
      This patch (as810c) copies a minimum of 36 bytes of INQUIRY data, even if
      the device claims that not all of them are valid.  Often badly behaved
      devices put plausible data in the Vendor, Product, and Revision strings but
      set the Additional Length byte to a small value.  Using potentially valid
      data is certainly better than allocating a short buffer and then reading
      beyond the end of it, which is what we do now.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      09123d23
    • 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
    • F
      [PATCH] .gitignore: add miscellaneous files · 5fd934a9
      Franck Bui-Huu 提交于
      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: NFranck Bui-Huu <fbuihuu@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5fd934a9
    • R
      [PATCH] Fix missing parens in set_personality() · d8b295f2
      Russell King 提交于
      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: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d8b295f2
    • W
      [PATCH] Patch for nvidia divide by zero error for 7600 pci-express card · e40c6759
      Wink Saville 提交于
      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: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e40c6759