Bart Van Assche
17c5f65db6
scsi: qla2xxx: Fix a NULL pointer dereference in an error path
This patch fixes the following Coverity complaint:
FORWARD_NULL
qla_init.c: 5275 in qla2x00_configure_local_loop()
5269
5270 if (fcport->scan_state == QLA_FCPORT_FOUND)
5271 qla24xx_fcport_handle_login(vha, fcport);
5272 }
5273
5274 cleanup_allocation:
>>> CID 353340: (FORWARD_NULL)
>>> Passing null pointer "new_fcport" to "qla2x00_free_fcport", which dereferences it.
5275 qla2x00_free_fcport(new_fcport);
5276
5277 if (rval != QLA_SUCCESS) {
5278 ql_dbg(ql_dbg_disc, vha, 0x2098,
5279 "Configure local loop error exit: rval=%x.\n", rval);
5280 }
qla_init.c: 5275 in qla2x00_configure_local_loop()
5269
5270 if (fcport->scan_state == QLA_FCPORT_FOUND)
5271 qla24xx_fcport_handle_login(vha, fcport);
5272 }
5273
5274 cleanup_allocation:
>>> CID 353340: (FORWARD_NULL)
>>> Passing null pointer "new_fcport" to "qla2x00_free_fcport", which dereferences it.
5275 qla2x00_free_fcport(new_fcport);
5276
5277 if (rval != QLA_SUCCESS) {
5278 ql_dbg(ql_dbg_disc, vha, 0x2098,
5279 "Configure local loop error exit: rval=%x.\n", rval);
5280 }
Fixes: 3dae220595 ("scsi: qla2xxx: Use common routine to free fcport struct")
Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Quinn Tran <qutran@marvell.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Daniel Wagner <dwagner@suse.de>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Link: https://lore.kernel.org/r/20200118042056.32232-1-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-01-20 18:38:20 -05:00
..
2019-12-09 10:36:44 -08:00
2019-12-19 22:08:55 -05:00
2020-01-03 09:42:52 +01:00
2019-11-19 21:37:34 -05:00
2019-10-24 21:22:32 -04:00
2019-12-09 10:36:44 -08:00
2019-09-30 23:59:53 -04:00
2019-11-19 22:31:18 -05:00
2019-11-19 21:37:34 -05:00
2019-12-19 22:42:44 -05:00
2019-12-27 17:28:41 -08:00
2019-12-02 13:37:02 -08:00
2019-11-07 06:43:18 -07:00
2019-05-30 11:26:32 -07:00
2019-12-02 13:37:02 -08:00
2019-09-21 10:50:15 -07:00
2019-11-06 00:04:02 -05:00
2020-01-03 09:42:52 +01:00
2019-09-21 10:50:15 -07:00
2019-12-19 22:08:54 -05:00
2020-01-03 09:42:52 +01:00
2019-07-29 21:12:35 -04:00
2019-12-21 13:42:42 -05:00
2020-01-10 01:23:47 -05:00
2020-01-15 23:21:03 -05:00
2020-01-10 00:14:46 -05:00
2020-01-03 09:42:52 +01:00
2019-11-12 22:21:34 -05:00
2020-01-03 09:42:52 +01:00
2019-10-24 21:22:32 -04:00
2019-10-24 21:22:32 -04:00
2020-01-20 18:38:20 -05:00
2019-12-19 22:08:55 -05:00
2019-12-09 10:36:44 -08:00
2019-01-29 00:40:54 -05:00
2019-12-19 22:08:54 -05:00
2020-01-15 22:23:13 -05:00
2019-02-25 21:37:25 -05:00
2019-03-02 11:39:54 -08:00
2019-10-23 17:23:44 +02:00
2018-10-17 21:58:51 -04:00
2019-05-24 17:36:45 +02:00
2019-01-08 07:58:37 -05:00
2019-05-21 10:50:45 +02:00
2019-10-18 15:01:54 +02:00
2019-05-21 10:50:45 +02:00
2019-07-11 15:17:41 -07:00
2019-07-11 15:17:41 -07:00
2019-05-21 10:50:45 +02:00
2018-12-18 23:13:12 -05:00
2019-05-21 10:50:45 +02:00
2019-11-12 22:21:34 -05:00
2019-11-12 22:21:35 -05:00
2020-01-15 22:19:49 -05:00
2019-06-05 17:37:11 +02:00
2019-05-21 10:50:45 +02:00
2020-01-03 09:42:32 +01:00
2018-12-18 23:19:21 -05:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-12-19 22:08:51 -05:00
2019-12-19 22:08:51 -05:00
2019-07-30 12:18:24 -04:00
2019-06-18 19:46:18 -04:00
2019-07-30 12:17:28 -04:00
2019-06-18 19:46:22 -04:00
2019-05-21 10:50:45 +02:00
2019-01-08 21:58:35 -05:00
2019-01-08 21:58:35 -05:00
2019-01-08 21:57:42 -05:00
2019-05-30 11:25:18 -07:00
2019-01-08 21:58:35 -05:00
2019-05-21 10:50:45 +02:00
2019-11-01 20:12:50 -04:00
2019-07-11 15:14:01 -07:00
2019-11-07 06:43:18 -07:00
2019-06-18 19:46:18 -04:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:36:37 +02:00
2019-07-11 15:17:41 -07:00
2019-12-19 22:08:54 -05:00
2020-01-03 09:42:52 +01:00
2019-05-30 11:26:35 -07:00
2019-09-30 22:46:40 -04:00
2018-11-06 21:31:28 -05:00
2019-06-05 17:36:37 +02:00
2020-01-15 22:48:34 -05:00
2019-05-30 11:26:37 -07:00
2019-05-21 10:50:45 +02:00
2019-11-07 06:43:18 -07:00
2019-05-24 17:36:45 +02:00
2019-07-11 15:14:01 -07:00
2019-12-09 19:19:28 -05:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-11-12 22:21:34 -05:00
2019-07-17 22:39:27 +09:00
2019-09-23 23:09:42 -04:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2018-12-18 23:13:12 -05:00
2019-07-11 15:17:41 -07:00
2019-05-30 11:26:39 -07:00
2018-12-28 14:48:06 -08:00
2020-01-02 21:57:44 -05:00
2019-05-20 10:56:43 -04:00
2020-01-02 21:57:44 -05:00
2019-10-24 21:22:32 -04:00
2019-05-24 17:36:45 +02:00
2019-11-19 21:37:34 -05:00
2019-06-20 15:37:02 -04:00
2019-10-24 21:22:32 -04:00
2019-05-24 17:39:02 +02:00
2019-10-23 17:23:44 +02:00
2019-05-30 11:26:35 -07:00
2019-06-20 15:21:33 -04:00
2019-05-30 11:26:38 -07:00
2020-01-20 18:35:55 -05:00
2020-01-15 23:09:11 -05:00
2019-03-19 17:11:37 -04:00
2018-12-18 23:19:21 -05:00
2019-08-07 21:32:53 -04:00
2019-02-13 22:07:03 -05:00
2019-06-05 17:37:17 +02:00
2019-05-24 17:36:45 +02:00
2019-11-19 21:37:34 -05:00
2019-07-30 12:42:55 -04:00
2019-05-21 06:16:21 -04:00
2019-07-11 20:39:22 -04:00
2019-05-30 11:26:35 -07:00
2019-10-03 21:43:04 -04:00
2020-01-03 09:33:18 +01:00
2019-12-19 22:08:52 -05:00
2019-09-30 23:07:16 -04:00
2019-12-19 22:08:54 -05:00
2019-05-30 11:26:35 -07:00
2019-09-12 07:11:58 -06:00
2019-11-01 20:12:50 -04:00
2019-07-30 13:07:42 +02:00
2019-04-15 22:25:00 -04:00
2019-05-30 11:29:53 -07:00
2019-12-02 13:37:02 -08:00
2019-11-06 00:06:03 -05:00
2019-07-11 15:14:01 -07:00
2020-01-15 22:55:37 -05:00
2019-11-21 21:12:39 -05:00
2019-05-30 11:26:35 -07:00
2019-06-19 17:09:56 +02:00
2019-12-02 13:37:02 -08:00
2019-06-05 17:37:14 +02:00
2020-01-02 21:53:31 -05:00
2020-01-03 09:42:32 +01:00
2019-12-08 12:23:42 -08:00
2019-07-11 15:14:01 -07:00
2020-01-03 09:42:32 +01:00
2018-12-18 23:19:21 -05:00
2019-05-24 17:36:45 +02:00
2019-10-09 23:35:42 -04:00
2019-11-26 13:02:26 -07:00
2020-01-03 09:42:52 +01:00
2020-01-03 09:42:32 +01:00
2019-05-30 11:26:32 -07:00
2019-11-21 20:10:44 -05:00
2019-11-12 22:21:34 -05:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-09-10 22:10:17 -04:00
2019-12-19 22:42:44 -05:00
2019-08-07 21:35:59 -04:00
2019-05-24 17:39:02 +02:00
2019-07-11 15:14:01 -07:00
2018-11-15 14:27:08 -05:00
2018-12-18 23:13:12 -05:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-11-12 22:21:34 -05:00