From patchwork Mon Mar 1 16:05:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 388713 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3623091jap; Mon, 1 Mar 2021 11:17:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUrVJGFS+5bm/VBFAsjW97E9GmKgFbcKb15S3TVYtKN9IDD20ReaET49jPoMHp+CSz6P1a X-Received: by 2002:aa7:d6c2:: with SMTP id x2mr18024229edr.79.1614626227510; Mon, 01 Mar 2021 11:17:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614626227; cv=none; d=google.com; s=arc-20160816; b=DbWcKqFFK5b2K+BsE9XkDovjqBwVyond0yjNMW01VsB4fvZUbZkzvYgouBhMBj5SCc 3TQns9X1famryZnbZBkVz2ifHs1KdkKq23VCdJImQwgawxSIH2zb7TOozv/dALbYUHtc UbatUlMCu0FI2ogbgdZAbIlmYn2jXXRB5FkPhQCNtp6xXoz+XAdYdWqG6Ug5LhE7BENh Swo6PH3li9DYf6PLVWfC7t13pV/tJ1uP1YqD9bjWwkFg1kJiAhogaTDntTmoJzTxUhDB 5Debg+hASn2xyhD49mJEMeE0LJTY/hd58kV+dCHuLGvNXBwNezDn2EtpeWvbzXZeGgAN ulKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ctoSiDddHAoeRCFVWdmbcLFakQ0QMLGqLSFB5hhYboY=; b=LJzRi2FvePSAYXk6ExZMFBAFt1D/LcYXOR9B6AG/HhatQb+di9FJpBlrl5NhpQo8H+ M0MC6aWpLNIma0ku+8Gb5H9bKFLQFi9fTTr/ZHgG0Zan5OUODUNov3A1/HqglJOIEfSR 2V7P51CxJuyLX4K7PJ8x4Jp3qW7KTfG0TeV1cb7d0yrCAJmN9z8X9ie2p4Aoy4Sjd8yR E9ZMXVCTewT3AGpqs1YQqbpzNNBIK6ylIH7DCTnbXFHca6T718xsawNWqvEP9MuqXzqQ S2apWiF9OFEJI/2Mf/nc+VCD+IcEEaTqjEHV7ZXkGeyzWzxnsxrUty/SxQsW5OHH17rP NWmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gkYxdB19; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y21si10521612edq.105.2021.03.01.11.17.07; Mon, 01 Mar 2021 11:17:07 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gkYxdB19; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236937AbhCATQX (ORCPT + 13 others); Mon, 1 Mar 2021 14:16:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:39774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241143AbhCATMp (ORCPT ); Mon, 1 Mar 2021 14:12:45 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C416D65312; Mon, 1 Mar 2021 17:43:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614620583; bh=+0yWCGYX/eWleYB0xPjxvLFpfpYXEb8nti+BkNJmvRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gkYxdB197TrOal4HYWZrzIxr6keqyh9TOTO/qJMo4QboOxoxpalWikvA5Nnzb/vgO K+IZmmqNTCeSmeUFdxEfghaCYBpQP/1Qhe7TDV7+/xXbTdRwqaFXlWjr+UXXiPxYo5 iUV1wwKz9mwu71o2G4ljpA8Mn6n0h/JGOf3RqcTw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alex Elder , "David S. Miller" , Sasha Levin Subject: [PATCH 5.11 165/775] net: ipa: initialize all resources Date: Mon, 1 Mar 2021 17:05:33 +0100 Message-Id: <20210301161209.793436218@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161201.679371205@linuxfoundation.org> References: <20210301161201.679371205@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Alex Elder [ Upstream commit 25c5a7e89b1de80f4b04ad5365b2e05fefd92279 ] We configure the minimum and maximum number of various types of IPA resources in ipa_resource_config(). It iterates over resource types in the configuration data and assigns resource limits to each resource group for each type. Unfortunately, we are repeatedly initializing the resource data for the first type, rather than initializing each of the types whose limits are specified. Fix this bug. Fixes: 4a0d7579d466e ("net: ipa: avoid going past end of resource group array") Signed-off-by: Alex Elder Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ipa/ipa_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.27.0 diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index 84bb8ae927252..eb1c8396bcdd9 100644 --- a/drivers/net/ipa/ipa_main.c +++ b/drivers/net/ipa/ipa_main.c @@ -581,10 +581,10 @@ ipa_resource_config(struct ipa *ipa, const struct ipa_resource_data *data) return -EINVAL; for (i = 0; i < data->resource_src_count; i++) - ipa_resource_config_src(ipa, data->resource_src); + ipa_resource_config_src(ipa, &data->resource_src[i]); for (i = 0; i < data->resource_dst_count; i++) - ipa_resource_config_dst(ipa, data->resource_dst); + ipa_resource_config_dst(ipa, &data->resource_dst[i]); return 0; }