Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [scsi:for-next 14/27] drivers/scsi/qla2xxx/qla_os.c:364 qla2x00_free_req_que() info: redundant null check on req->outstanding_cmds calling kfree()
@ 2012-12-17 12:45 kbuild test robot
  2013-01-29  2:59 ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2012-12-17 12:45 UTC (permalink / raw)
  To: Chad Dupuis; +Cc: linux-scsi, Saurav Kashyap, James Bottomley

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
head:   e3ff197a750d2912d0bb2a0161c23c18bad250ad
commit: 99cc149bbdd78a3f18c6b366e1c239f62d59d096 [14/27] [SCSI] qla2xxx: Determine the number of outstanding commands based on available resources.


smatch warnings:

+ drivers/scsi/qla2xxx/qla_os.c:364 qla2x00_free_req_que() info: redundant null check on req->outstanding_cmds calling kfree()
  drivers/scsi/qla2xxx/qla_os.c:686 qla2xxx_queuecommand() error: potential NULL dereference 'rport'.

vim +364 drivers/scsi/qla2xxx/qla_os.c

73208dfd Anirban Chakraborty 2008-12-09  348  
73208dfd Anirban Chakraborty 2008-12-09  349  fail_rsp_map:
73208dfd Anirban Chakraborty 2008-12-09  350  	kfree(ha->req_q_map);
73208dfd Anirban Chakraborty 2008-12-09  351  	ha->req_q_map = NULL;
73208dfd Anirban Chakraborty 2008-12-09  352  fail_req_map:
73208dfd Anirban Chakraborty 2008-12-09  353  	return -ENOMEM;
73208dfd Anirban Chakraborty 2008-12-09  354  }
73208dfd Anirban Chakraborty 2008-12-09  355  
2afa19a9 Anirban Chakraborty 2009-04-06  356  static void qla2x00_free_req_que(struct qla_hw_data *ha, struct req_que *req)
73208dfd Anirban Chakraborty 2008-12-09  357  {
73208dfd Anirban Chakraborty 2008-12-09  358  	if (req && req->ring)
73208dfd Anirban Chakraborty 2008-12-09  359  		dma_free_coherent(&ha->pdev->dev,
73208dfd Anirban Chakraborty 2008-12-09  360  		(req->length + 1) * sizeof(request_t),
73208dfd Anirban Chakraborty 2008-12-09  361  		req->ring, req->dma);
73208dfd Anirban Chakraborty 2008-12-09  362  
99cc149b Chad Dupuis         2012-12-07  363  	if (req && req->outstanding_cmds)
99cc149b Chad Dupuis         2012-12-07 @364  		kfree(req->outstanding_cmds);
99cc149b Chad Dupuis         2012-12-07  365  
73208dfd Anirban Chakraborty 2008-12-09  366  	kfree(req);
73208dfd Anirban Chakraborty 2008-12-09  367  	req = NULL;
73208dfd Anirban Chakraborty 2008-12-09  368  }
73208dfd Anirban Chakraborty 2008-12-09  369  
2afa19a9 Anirban Chakraborty 2009-04-06  370  static void qla2x00_free_rsp_que(struct qla_hw_data *ha, struct rsp_que *rsp)
2afa19a9 Anirban Chakraborty 2009-04-06  371  {
2afa19a9 Anirban Chakraborty 2009-04-06  372  	if (rsp && rsp->ring)

---
0-DAY kernel build testing backend         Open Source Technology Center
Fengguang Wu, Yuanhan Liu                              Intel Corporation

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

* Re: [scsi:for-next 14/27] drivers/scsi/qla2xxx/qla_os.c:364 qla2x00_free_req_que() info: redundant null check on req->outstanding_cmds calling kfree()
  2012-12-17 12:45 [scsi:for-next 14/27] drivers/scsi/qla2xxx/qla_os.c:364 qla2x00_free_req_que() info: redundant null check on req->outstanding_cmds calling kfree() kbuild test robot
@ 2013-01-29  2:59 ` James Bottomley
  2013-01-30  5:25   ` Saurav Kashyap
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2013-01-29  2:59 UTC (permalink / raw)
  To: kbuild test robot; +Cc: Chad Dupuis, linux-scsi, Saurav Kashyap

On Mon, 2012-12-17 at 20:45 +0800, kbuild test robot wrote:
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
> head:   e3ff197a750d2912d0bb2a0161c23c18bad250ad
> commit: 99cc149bbdd78a3f18c6b366e1c239f62d59d096 [14/27] [SCSI] qla2xxx: Determine the number of outstanding commands based on available resources.
> 
> 
> smatch warnings:
> 
> + drivers/scsi/qla2xxx/qla_os.c:364 qla2x00_free_req_que() info: redundant null check on req->outstanding_cmds calling kfree()
>   drivers/scsi/qla2xxx/qla_os.c:686 qla2xxx_queuecommand() error: potential NULL dereference 'rport'.

I flushed all the outstanding qla2xxx patches from the SCSI tree.
Please fix these issues and resubmit.

Thanks,

James



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

* Re: [scsi:for-next 14/27] drivers/scsi/qla2xxx/qla_os.c:364 qla2x00_free_req_que() info: redundant null check on req->outstanding_cmds calling kfree()
  2013-01-29  2:59 ` James Bottomley
@ 2013-01-30  5:25   ` Saurav Kashyap
  0 siblings, 0 replies; 3+ messages in thread
From: Saurav Kashyap @ 2013-01-30  5:25 UTC (permalink / raw)
  To: James Bottomley, kbuild test robot
  Cc: Chad Dupuis, linux-scsi@vger.kernel.org



>On Mon, 2012-12-17 at 20:45 +0800, kbuild test robot wrote:
>> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
>>for-next
>> head:   e3ff197a750d2912d0bb2a0161c23c18bad250ad
>> commit: 99cc149bbdd78a3f18c6b366e1c239f62d59d096 [14/27] [SCSI]
>>qla2xxx: Determine the number of outstanding commands based on available
>>resources.
>>
>>
>> smatch warnings:
>>
>> + drivers/scsi/qla2xxx/qla_os.c:364 qla2x00_free_req_que() info:
>>redundant null check on req->outstanding_cmds calling kfree()
>>   drivers/scsi/qla2xxx/qla_os.c:686 qla2xxx_queuecommand() error:
>>potential NULL dereference 'rport'.
>
>I flushed all the outstanding qla2xxx patches from the SCSI tree.
>Please fix these issues and resubmit.

Hi James,

We will be re-submitting the patches soon.

Thanks,
~Saurav
>
>Thanks,
>
>James
>
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


________________________________

This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.


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

end of thread, other threads:[~2013-01-30  5:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 12:45 [scsi:for-next 14/27] drivers/scsi/qla2xxx/qla_os.c:364 qla2x00_free_req_que() info: redundant null check on req->outstanding_cmds calling kfree() kbuild test robot
2013-01-29  2:59 ` James Bottomley
2013-01-30  5:25   ` Saurav Kashyap

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