aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobert.foss@collabora.com <robert.foss@collabora.com>2017-03-07 11:46:25 -0500
committerDavid S. Miller <davem@davemloft.net>2017-03-09 13:18:09 -0800
commit8aad6f14c09d78862fc04e47214d398add9bb8ce (patch)
tree72a1fb0ddf9442b90ab0b4157b2519fea83cafe3
parentMerge branch 'thunderx-misc-fixes' (diff)
downloadlinux-dev-8aad6f14c09d78862fc04e47214d398add9bb8ce.tar.xz
linux-dev-8aad6f14c09d78862fc04e47214d398add9bb8ce.zip
qed: Fix copy of uninitialized memory
In qed_ll2_start_ooo() the ll2_info variable is uninitialized and then passed to qed_ll2_acquire_connection() where it is copied into a new memory space. This shouldn't cause any issue as long as non of the copied memory is every read. But the potential for a bug being introduced by reading this memory is real. Detected by CoverityScan, CID#1399632 ("Uninitialized scalar variable") Signed-off-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_ll2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
index 9a0b9af10a57..5fb34db377c8 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
@@ -968,7 +968,7 @@ static int qed_ll2_start_ooo(struct qed_dev *cdev,
{
struct qed_hwfn *hwfn = QED_LEADING_HWFN(cdev);
u8 *handle = &hwfn->pf_params.iscsi_pf_params.ll2_ooo_queue_id;
- struct qed_ll2_conn ll2_info;
+ struct qed_ll2_conn ll2_info = { 0 };
int rc;
ll2_info.conn_type = QED_LL2_TYPE_ISCSI_OOO;