]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mpt3sas: Fix unprotected list lookup in v4.3-rc0 changes
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 9 Sep 2015 06:05:49 +0000 (23:05 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 9 Sep 2015 21:59:57 +0000 (14:59 -0700)
commit8edb1554f7c2eb73cf70c9856aec01e786b9bcf9
tree6783ac1facf1b0383e01318f31b9648e5cb72c61
parentdb9e2f7959159da634da0eacb6375270ff216018
mpt3sas: Fix unprotected list lookup in v4.3-rc0 changes

This patch adds the missing mpt3sas_get_sdev_by_addr() protected
lookup usage in mpt3sas_transport_port_add() to avoid a NULL pointer
dereference when &ioc->sas_device_list or &ioc->sas_device_init_list
changes from below without a proper sas_device_get(sas_device)
reference held.

Also, use the protected mpt3sas_get_sdev_by_handle() lookup within
_scsih_block_io_device() as well.

Reported-by: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Reported-by: Chaitra Basappa <chaitra.basappa@avagotech.com>
Cc: Calvin Owens <calvinowens@fb.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_transport.c