]> git.baikalelectronics.ru Git - 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)
commiteba5429f0de5d175d0b4e5620fd001eb633bc117
tree6ff8b2183a6ab609804bae7eb5c7f90cfc5faeb4
parentc3bf21c9cf27e9e4ccd5370e80403467ec5cc290
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: 00517e291437 ("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