1. 14 7月, 2008 10 次提交
  2. 13 7月, 2008 20 次提交
  3. 12 7月, 2008 10 次提交
    • J
      [SCSI] bsg: fix oops on remove · 8df5fc04
      James Bottomley 提交于
      If you do a modremove of any sas driver, you run into an oops on
      shutdown when the host is removed (coming from the host bsg device).
      The root cause seems to be that there's a use after free of the
      bsg_class_device:  In bsg_kref_release_function, this is used (to do a
      put_device(bcg->parent) after bcg->release has been called.  In sas (and
      possibly many other things) bcd->release frees the queue which contains
      the bsg_class_device, so we get a put_device on unreferenced memory.
      Fix this by taking a copy of the pointer to the parent before releasing
      bsg.
      Acked-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      8df5fc04
    • J
      [SCSI] fusion: default MSI to disabled for SPI and FC controllers · 27898988
      James Bottomley 提交于
      There's a fault on the FC controllers that makes them not respond
      correctly to MSI.  The SPI controllers are fine, but are likely to be
      onboard on older motherboards which don't handle MSI correctly, so
      default both these cases to disabled.  Enable by setting the module
      parameter mpt_msi_enable=1.
      
      For the SAS case, enable MSI by default, but it can be disabled by
      setting the module parameter mpt_msi_enable=0.
      
      Cc: "Prakash, Sathya" <sathya.prakash@lsi.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      27898988
    • I
      Merge branch 'linus' into x86/core · ae94b807
      Ingo Molnar 提交于
      Conflicts:
      
      	arch/x86/mm/ioremap.c
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ae94b807
    • M
      x86: fix ldt limit for 64 bit · 5ac37f87
      Michael Karcher 提交于
      Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor.
      Signed-off-by: NMichael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5ac37f87
    • R
      x86_64: fix delayed signals · eca91e78
      Roland McGrath 提交于
      On three of the several paths in entry_64.S that call
      do_notify_resume() on the way back to user mode, we fail to properly
      check again for newly-arrived work that requires another call to
      do_notify_resume() before going to user mode.  These paths set the
      mask to check only _TIF_NEED_RESCHED, but this is wrong.  The other
      paths that lead to do_notify_resume() do this correctly already, and
      entry_32.S does it correctly in all cases.
      
      All paths back to user mode have to check all the _TIF_WORK_MASK
      flags at the last possible stage, with interrupts disabled.
      Otherwise, we miss any flags (TIF_SIGPENDING for example) that were
      set any time after we entered do_notify_resume().  More work flags
      can be set (or left set) synchronously inside do_notify_resume(), as
      TIF_SIGPENDING can be, or asynchronously by interrupts or other CPUs
      (which then send an asynchronous interrupt).
      
      There are many different scenarios that could hit this bug, most of
      them races.  The simplest one to demonstrate does not require any
      race: when one signal has done handler setup at the check before
      returning from a syscall, and there is another signal pending that
      should be handled.  The second signal's handler should interrupt the
      first signal handler before it actually starts (so the interrupted PC
      is still at the handler's entry point).  Instead, it runs away until
      the next kernel entry (next syscall, tick, etc).
      
      This test behaves correctly on 32-bit kernels, and fails on 64-bit
      (either 32-bit or 64-bit test binary).  With this fix, it works.
      
          #define _GNU_SOURCE
          #include <stdio.h>
          #include <signal.h>
          #include <string.h>
          #include <sys/ucontext.h>
      
          #ifndef REG_RIP
          #define REG_RIP REG_EIP
          #endif
      
          static sig_atomic_t hit1, hit2;
      
          static void
          handler (int sig, siginfo_t *info, void *ctx)
          {
            ucontext_t *uc = ctx;
      
            if ((void *) uc->uc_mcontext.gregs[REG_RIP] == &handler)
              {
                if (sig == SIGUSR1)
                  hit1 = 1;
                else
                  hit2 = 1;
              }
      
            printf ("%s at %#lx\n", strsignal (sig),
                    uc->uc_mcontext.gregs[REG_RIP]);
          }
      
          int
          main (void)
          {
            struct sigaction sa;
            sigset_t set;
      
            sigemptyset (&sa.sa_mask);
            sa.sa_flags = SA_SIGINFO;
            sa.sa_sigaction = &handler;
      
            if (sigaction (SIGUSR1, &sa, NULL)
                || sigaction (SIGUSR2, &sa, NULL))
              return 2;
      
            sigemptyset (&set);
            sigaddset (&set, SIGUSR1);
            sigaddset (&set, SIGUSR2);
            if (sigprocmask (SIG_BLOCK, &set, NULL))
              return 3;
      
            printf ("main at %p, handler at %p\n", &main, &handler);
      
            raise (SIGUSR1);
            raise (SIGUSR2);
      
            if (sigprocmask (SIG_UNBLOCK, &set, NULL))
              return 4;
      
            if (hit1 + hit2 == 1)
              {
                puts ("PASS");
                return 0;
              }
      
            puts ("FAIL");
            return 1;
          }
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      eca91e78
    • R
      x86: remove conflicting nx6325 and nx6125 quirks · da1f29f5
      Rafael J. Wysocki 提交于
      We have two conflicting DMA-based quirks in there for the same set of
      boxes (HP nx6325 and nx6125) and one of them actually breaks my box.
      
      So remove the extra code.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: =?iso-8859-1?q?T=F6r=F6k_Edwin?= <edwintorok@gmail.com>
      Cc: Vegard Nossum <vegard.nossum@gmail.com>
      Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      da1f29f5
    • L
      a26929fb
    • M
      [PATCH] IPMI: return correct value from ipmi_write · 3976df9b
      Mark Rustad 提交于
      This patch corrects the handling of write operations to the IPMI watchdog
      to work as intended by returning the number of characters actually
      processed. Without this patch, an "echo V >/dev/watchdog" enables the
      watchdog if IPMI is providing the watchdog function.
      Signed-off-by: NMark Rustad <MRustad@gmail.com>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
      3976df9b
    • I
      Merge branch 'x86/generalize-visws' into x86/core · 6c82a000
      Ingo Molnar 提交于
      6c82a000
    • M
      x86: Recover timer_ack lost in the merge of the NMI watchdog · 5b4d2386
      Maciej W. Rozycki 提交于
      In the course of the recent unification of the NMI watchdog an assignment
      to timer_ack to switch off unnecesary POLL commands to the 8259A in the
      case of a watchdog failure has been accidentally removed.  The statement
      used to be limited to the 32-bit variation as since the rewrite of the
      timer code it has been relevant for the 82489DX only.  This change brings
      it back.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5b4d2386