scsi: lpfc: Fix crash in lpfc nvmet when fc port is reset
authorDick Kennedy <dick.kennedy@broadcom.com>
Wed, 23 Aug 2017 23:55:38 +0000 (16:55 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Aug 2017 02:29:38 +0000 (22:29 -0400)
commit4b40d02b8b2bd549c7751a3c4629077ea5f9a1fd
tree07f7bd56fb32fbb3f0f4ea0c1c33c7d073a4ccf1
parent4adc041b4dccbf315297e504457b096757fdb324
scsi: lpfc: Fix crash in lpfc nvmet when fc port is reset

In adapter reset tests, an oops was seen with a NULL pointer in
lpfc_free_rq_buffer+0x20/0x60

The driver is failing to properly repost the nvmet sgl list when
recovering from the reset. Thus the driver eventually trys to walk an
errant buffer list.

Corrected the sgl buffer recovery as well as strengthening the
initialization of the bufferlist.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_init.c