1. 22 Feb, 2018 37 commits
  2. 16 Feb, 2018 3 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.14.20 · 7e83b2ff
      Greg Kroah-Hartman authored
      7e83b2ff
    • Uma Krishnan's avatar
      scsi: cxlflash: Reset command ioasc · 1dbdcf11
      Uma Krishnan authored
      commit 96cf727f upstream.
      
      In the event of a command failure, cxlflash returns the failure to the upper
      layers to process. After processing the error, when the command is queued
      again, the private command structure will not be zeroed and the ioasc could be
      stale. Per the SISLite specification, the AFU only sets the ioasc in the
      presence of a failure. Thus, even though the original command succeeds the
      second time, the command is considered a failure due to stale ioasc. This
      cycle repeats indefinitely and can cause a hang or IO failure.
      
      To fix the issue, clear the ioasc before queuing any command.
      
      [mkp: added Cc: stable per request]
      
      Fixes: 479ad8e9 ("scsi: cxlflash: Remove zeroing of private command data")
      Signed-off-by: default avatarUma Krishnan <ukrishn@linux.vnet.ibm.com>
      Acked-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1dbdcf11
    • James Smart's avatar
      scsi: lpfc: Fix crash after bad bar setup on driver attachment · 5fc77964
      James Smart authored
      commit e4b9794e upstream.
      
      In test cases where an instance of the driver is detached and
      reattached, the driver will crash on reattachment. There is a compound
      if statement that will skip over the bar setup if the pci_resource_start
      call is not successful. The driver erroneously returns success to its
      bar setup in this scenario even though the bars aren't properly
      configured.
      
      Rework the offending code segment for proper initialization steps.  If
      the pci_resource_start call fails, -ENOMEM is now returned.
      
      Sample stack:
      
      rport-5:0-10: blocked FC remote port time out: removing rport
      BUG: unable to handle kernel NULL pointer dereference at           (null)
      ... lpfc_sli4_wait_bmbx_ready+0x32/0x70 [lpfc]
      ...
      ...  RIP: 0010:...  ... lpfc_sli4_wait_bmbx_ready+0x32/0x70 [lpfc]
       Call Trace:
        ... lpfc_sli4_post_sync_mbox+0x106/0x4d0 [lpfc]
        ... ? __alloc_pages_nodemask+0x176/0x420
        ... ? __kmalloc+0x2e/0x230
        ... lpfc_sli_issue_mbox_s4+0x533/0x720 [lpfc]
        ... ? mempool_alloc+0x69/0x170
        ... ? dma_generic_alloc_coherent+0x8f/0x140
        ... lpfc_sli_issue_mbox+0xf/0x20 [lpfc]
        ... lpfc_sli4_driver_resource_setup+0xa6f/0x1130 [lpfc]
        ... ? lpfc_pci_probe_one+0x23e/0x16f0 [lpfc]
        ... lpfc_pci_probe_one+0x445/0x16f0 [lpfc]
        ... local_pci_probe+0x45/0xa0
        ... work_for_cpu_fn+0x14/0x20
        ... process_one_work+0x17a/0x440
      Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
      Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5fc77964