RE: [PATCH 2/3] qed: avoid possible stack overflow in qed_ll2_acquire_connection

From: Mintz, Yuval
Date: Thu Jan 19 2017 - 08:14:19 EST


> 968,23 +968,19 @@ 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_info *ll2_info;
> + struct qed_ll2_conn ll2_info;

A bit confusing to change the type from qed_ll2_info - > qed_ll2_conn
yet leave the variable named 'll2_info'.
Probably better to have it name `ll2_params' as in:

> @@ -2632,7 +2632,7 @@ static int qed_roce_ll2_start(struct qed_dev *cdev,
> {
> struct qed_hwfn *hwfn = QED_LEADING_HWFN(cdev);
> struct qed_roce_ll2_info *roce_ll2;
> - struct qed_ll2_info ll2_params;
> + struct qed_ll2_conn ll2_params;

But that's nitpicking; You can do this if for some reason you'll need a v2,
or we'll later change it in some semantic patch.

Thanks for taking care of this.

Acked-by: Yuval Mintz <Yuval.Mintz@xxxxxxxxxx>