1. 22 Feb, 2018 2 commits
    • Mauricio Faria de Oliveira's avatar
      scsi: mpt3sas: fix oops in error handlers after shutdown/unload · 9ff549ff
      Mauricio Faria de Oliveira authored
      This patch adds checks for 'ioc->remove_host' in the SCSI error handlers, so
      not to access pointers/resources potentially freed in the PCI shutdown/module
      unload path.  The error handlers may be invoked after shutdown/unload,
      depending on other components.
      
      This problem was observed with kexec on a system with a mpt3sas based adapter
      and an infiniband adapter which takes long enough to shutdown:
      
      The mpt3sas driver finished shutting down / disabled interrupt handling, thus
      some commands have not finished and timed out.
      
      Since the system was still running (waiting for the infiniband adapter to
      shutdown), the scsi error handler for task abort of mpt3sas was invoked, and
      hit an oops -- either in scsih_abort() because 'ioc->scsi_lookup' was NULL
      without commit dbec4c90 ("scsi: mpt3sas: lockless command submission"), or
      later up in scsih_host_reset() (with or without that commit), because it
      eventually called mpt3sas_base_get_iocstate().
      
      After the above commit, the oops in scsih_abort() does not occur anymore
      (_scsih_scsi_lookup_find_by_scmd() is no longer called), but that commit is
      too big and out of the scope of linux-stable, where this patch might help, so
      still go for the changes.
      
      Also, this might help to prevent similar errors in the future, in case code
      changes and possibly tries to access freed stuff.
      
      Note the fix in scsih_host_reset() is still important anyway.
      Signed-off-by: default avatarMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
      Acked-by: default avatarSreekanth Reddy <Sreekanth.Reddy@broadcom.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      9ff549ff
    • Michael Kelley (EOSG)'s avatar
      scsi: storvsc: Spread interrupts when picking a channel for I/O requests · 9cfad4a5
      Michael Kelley (EOSG) authored
      Update the algorithm in storvsc_do_io to look for a channel
      starting with the current CPU + 1 and wrap around (within the
      current NUMA node). This spreads VMbus interrupts more evenly
      across CPUs. Previous code always started with first CPU in
      the current NUMA node, skewing the interrupt load to that CPU.
      Signed-off-by: default avatarMichael Kelley <mikelley@microsoft.com>
      Reviewed-by: default avatarLong Li <longli@microsoft.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      9cfad4a5
  2. 15 Feb, 2018 1 commit
  3. 14 Feb, 2018 7 commits
  4. 06 Feb, 2018 1 commit
  5. 31 Jan, 2018 12 commits
  6. 23 Jan, 2018 17 commits