* [bug report] qedr: Add GSI support
@ 2016-10-26 13:25 Dan Carpenter
[not found] ` <20161026132501.GA3628-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-10-26 13:25 UTC (permalink / raw)
To: Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Hello Ram Amrani,
This is a semi-automatic email about new static checker warnings.
The patch 048867793046: "qedr: Add GSI support" from Oct 10, 2016,
leads to the following Smatch complaint:
drivers/infiniband/hw/qedr/qedr_cm.c:284 qedr_gsi_build_header()
warn: variable dereferenced before check 'sgid_attr.ndev' (see line 281)
drivers/infiniband/hw/qedr/qedr_cm.c
280
281 vlan_id = rdma_vlan_dev_vlan_id(sgid_attr.ndev);
^^^^^^^^^^^^^^
Dereference inside function.
282 if (vlan_id < VLAN_CFI_MASK)
283 has_vlan = true;
284 if (sgid_attr.ndev)
^^^^^^^^^^^^^^
Check too late.
285 dev_put(sgid_attr.ndev);
286
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [bug report] qedr: Add GSI support
[not found] ` <20161026132501.GA3628-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
@ 2016-10-27 7:46 ` Amrani, Ram
0 siblings, 0 replies; 2+ messages in thread
From: Amrani, Ram @ 2016-10-27 7:46 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> The patch 048867793046: "qedr: Add GSI support" from Oct 10, 2016, leads to
> the following Smatch complaint:
>
> drivers/infiniband/hw/qedr/qedr_cm.c:284 qedr_gsi_build_header()
> warn: variable dereferenced before check 'sgid_attr.ndev' (see line 281)
>
> drivers/infiniband/hw/qedr/qedr_cm.c
> 280
> 281 vlan_id = rdma_vlan_dev_vlan_id(sgid_attr.ndev);
> ^^^^^^^^^^^^^^ Dereference inside function.
>
> 282 if (vlan_id < VLAN_CFI_MASK)
> 283 has_vlan = true;
> 284 if (sgid_attr.ndev)
> ^^^^^^^^^^^^^^
> Check too late.
>
> 285 dev_put(sgid_attr.ndev);
> 286
Thanks Dan. I'll fix this.
Ram
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-27 7:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-26 13:25 [bug report] qedr: Add GSI support Dan Carpenter
[not found] ` <20161026132501.GA3628-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2016-10-27 7:46 ` Amrani, Ram
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox