]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
scsi: qedf: Fix a potential NULL pointer dereference
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 20 Aug 2017 17:09:35 +0000 (19:09 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 24 Aug 2017 02:42:41 +0000 (22:42 -0400)
commit47c4ccd3086139d2085e0f1e59c0f26e8ce4ff46
tree6ff8b2183a6ab609804bae7eb5c7f90cfc5faeb4
parentbd46fc406b30d1db1aff8dabaff8d18bb423fdcf
scsi: qedf: Fix a potential NULL pointer dereference

At the beginning of 'qedf_srr_compl()' and of 'qedf_rec_compl()', we
check if 'orig_io_req' is NULL. If this happens, a NULL pointer
dereference will occur in the error handling path.

Fix it by adding an additional label in the error handling path in order
to avoid this NULL pointer dereference.

[mkp: typo]

Fixes: 61d8658b4a43 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf_els.c