public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* qla2xxx: NULL deref in qla_tgt_abort_task()
@ 2012-03-13 17:21 Dan Carpenter
  2012-03-15 23:24 ` Nicholas A. Bellinger
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-03-13 17:21 UTC (permalink / raw)
  To: nab; +Cc: linux-scsi, linux-driver

Hello Nicholas,

This is a semi-automatic email about new static checker warnings.

The patch 962f988d031f: "qla2xxx: Add LLD target-mode infrastructure 
for >= 24xx series" from Mar 8, 2012, leads to the following Smatch 
complaint:

drivers/scsi/qla2xxx/qla_target.c:2873 qla_tgt_abort_task()
	 error: we previously assumed 'sess' could be null (see line 2870)

drivers/scsi/qla2xxx/qla_target.c
  2869		sess = ha->tgt_ops->find_sess_by_loop_id(vha, loop_id);
  2870		if (sess == NULL) {
                    ^^^^^^^^^^^^
Test.

  2871			ql_dbg(ql_dbg_tgt_mgt, vha, 0xe129, "qla_target(%d): task abort for unexisting "
  2872				"session\n", vha->vp_idx);
  2873			res = qla_tgt_sched_sess_work(sess->tgt, QLA_TGT_SESS_WORK_ABORT,
                                                      ^^^^^^^^^
NULL dereference.

  2874						iocb, sizeof(*iocb));
  2875			if (res != 0)

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-15 23:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-13 17:21 qla2xxx: NULL deref in qla_tgt_abort_task() Dan Carpenter
2012-03-15 23:24 ` Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox