Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ipipe
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • xenomaixenomai
  • ipipe
  • Repository
Switch branch/tag
  • ipipe
  • drivers
  • scsi
  • qla2xxx
  • qla_os.c
Find file BlameHistoryPermalink
  • Mauricio Faria de Oliveira's avatar
    scsi: qla2xxx: do not queue commands when unloading · 04dfaa53
    Mauricio Faria de Oliveira authored Nov 07, 2016
    
    
    When the driver is unloading, in qla2x00_remove_one(), there is a single
    call/point in time to abort ongoing commands, qla2x00_abort_all_cmds(),
    which is still several steps away from the call to scsi_remove_host().
    
    If more commands continue to arrive and be processed during that
    interval, when the driver is tearing down and releasing its structures,
    it might potentially hit an oops due to invalid memory access:
    
        Unable to handle kernel paging request for data at address 0x00000138
        <...>
        NIP [d000000004700a40] qla2xxx_queuecommand+0x80/0x3f0 [qla2xxx]
        LR [d000000004700a10] qla2xxx_queuecommand+0x50/0x3f0 [qla2xxx]
    
    So, fail commands in qla2xxx_queuecommand() if the UNLOADING bit is set.
    
    Signed-off-by: default avatarMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
    Acked-by: default avatarHimanshu Madhani <himanshu.madhani@cavium.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    04dfaa53

Imprint & Privacy Policy