public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* re: [SCSI] qla2xxx: Add support for ISP8044.
@ 2013-09-02  9:20 Dan Carpenter
  2013-09-03 20:19 ` Chad Dupuis
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2013-09-02  9:20 UTC (permalink / raw)
  To: atul.deshmukh; +Cc: linux-scsi

Hello Atul Deshmukh,

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

The patch ef4647420025: "[SCSI] qla2xxx: Add support for ISP8044." 
from Aug 27, 2013, leads to the following Smatch complaint:

drivers/scsi/qla2xxx/qla_os.c:2962 qla2x00_probe_one()
	 error: we previously assumed 'base_vha' could be null (see line 2632)

drivers/scsi/qla2xxx/qla_os.c
  2631		base_vha = qla2x00_create_host(sht, ha);
  2632		if (!base_vha) {
                     ^^^^^^^^
Existing check.

  2633			ret = -ENOMEM;
  2634			qla2x00_mem_free(ha);
  2635			qla2x00_free_req_que(ha, req);
  2636			qla2x00_free_rsp_que(ha, rsp);
  2637			goto probe_hw_failed;
  2638		}

[ snip ]

  2954	probe_hw_failed:
  2955		if (IS_QLA82XX(ha)) {
  2956			qla82xx_idc_lock(ha);
  2957			qla82xx_clear_drv_active(ha);
  2958			qla82xx_idc_unlock(ha);
  2959		}
  2960		if (IS_QLA8044(ha)) {
  2961			qla8044_idc_lock(ha);
  2962			qla8044_clear_drv_active(base_vha);
                                                 ^^^^^^^^
Patch adds dereference.

  2963			qla8044_idc_unlock(ha);
  2964		}

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 4+ messages in thread
* re: [SCSI] qla2xxx: Add support for ISP8044.
@ 2013-11-01 10:30 Dan Carpenter
  2013-11-05  9:20 ` Saurav Kashyap
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2013-11-01 10:30 UTC (permalink / raw)
  To: atul.deshmukh; +Cc: linux-scsi

Hello Atul Deshmukh,

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

The patch 7ec0effd30bb: "[SCSI] qla2xxx: Add support for ISP8044." 
from Aug 27, 2013, leads to the following Smatch complaint:

drivers/scsi/qla2xxx/qla_os.c:2958 qla2x00_probe_one()
	 error: we previously assumed 'base_vha' could be null (see line 2628)

drivers/scsi/qla2xxx/qla_os.c
  2627		base_vha = qla2x00_create_host(sht, ha);
  2628		if (!base_vha) {
                    ^^^^^^^^^
Existing check.

  2629			ret = -ENOMEM;
  2630			qla2x00_mem_free(ha);
  2631			qla2x00_free_req_que(ha, req);
  2632			qla2x00_free_rsp_que(ha, rsp);
  2633			goto probe_hw_failed;
  2634		}

[ snip ]

  2935	probe_failed:
  2936		if (base_vha->timer_active)
  2937			qla2x00_stop_timer(base_vha);
  2938		base_vha->flags.online = 0;
  2939		if (ha->dpc_thread) {
  2940			struct task_struct *t = ha->dpc_thread;
  2941	
  2942			ha->dpc_thread = NULL;
  2943			kthread_stop(t);
  2944		}
  2945	
  2946		qla2x00_free_device(base_vha);
  2947	
  2948		scsi_host_put(base_vha->host);
  2949	
  2950	probe_hw_failed:
  2951		if (IS_QLA82XX(ha)) {
  2952			qla82xx_idc_lock(ha);
  2953			qla82xx_clear_drv_active(ha);
  2954			qla82xx_idc_unlock(ha);
  2955		}
  2956		if (IS_QLA8044(ha)) {
  2957			qla8044_idc_lock(ha);
  2958			qla8044_clear_drv_active(base_vha);
                                                 ^^^^^^^^
Patch introduces new unchecked dereference.

  2959			qla8044_idc_unlock(ha);
  2960		}

regards,
dan carpenter

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

end of thread, other threads:[~2013-11-05  9:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-02  9:20 [SCSI] qla2xxx: Add support for ISP8044 Dan Carpenter
2013-09-03 20:19 ` Chad Dupuis
  -- strict thread matches above, loose matches on Subject: below --
2013-11-01 10:30 Dan Carpenter
2013-11-05  9:20 ` Saurav Kashyap

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