Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp701787imd; Fri, 26 Oct 2018 15:47:57 -0700 (PDT) X-Google-Smtp-Source: AJdET5cgwm2l3gI5t6RFa8EhMBdetjoqdxuaMCKZu0et3V6MgsnRQGgE85W1HuOyQRZjVtIwF+qs X-Received: by 2002:a63:ba48:: with SMTP id l8mr5111321pgu.72.1540594077475; Fri, 26 Oct 2018 15:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540594077; cv=none; d=google.com; s=arc-20160816; b=onm5EfFi6Vq9Yrp28+7yEF8zwm3DPjb0Aw+5jfvMcx+MimUlAUBoAi6OLaqa+LyEsi CamtTt+MfPG5vLChCKrhpeu7h6zNJAxl9S1XN1Sg7r0tMcAZPdfOyKSFdf+4nHdKtd0L Su+VoSRJj4o3H7mbWUExcSsYj4zXChr5UTn2WDBcuEy5UgCJdYuGtZ457i3L72bHqXjk a2pJoWiAEq31RKKoP/1xTxS1dYrJVmQ9hpFkKHucJX/Jl7n9tPY5jDy9D2TauQOTXkqz 9+VBUevNfe+8JLe2w+dlcJL03tOyxOAT25A12fKCl/LVBlehDqaPmYz9n2txMpsaa/3u 81dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=yTEBhUmwyX5DI3a0jvxu7k5W3q+VATRxfwHQSOszOQE=; b=RJ1if/Y+rM30YKk8fUuvN+mkPgEGmixnPuP3j15qtgyRQLBVSegqeqVH1+jl6jwj0f y6N3tXM1QNo/90Jpu2J4d6XZjiveQcOhQKl9u7Uckv5Lb0SCitjh6hvf/f9ScxIuRAR3 vmWgkTcIQy6vsQWJj0486Zp6DfKSeLsbNNQK/oaFzXB904kQUnZlJ58/KdydYNEOoGro mUyq57G7WVPz7U41Y39mcXTibGEMfpZFl/14FHc4o0p7R4fvqYExk2ohLkoBOuwJTXv4 25GegC3Yg5FwxIgjIhi1YgVykhwpQ44EoAtaD/LBMLyRWyTggPdlxJVeiMK3QttjRUYZ HhIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a32-v6si12150802pgm.24.2018.10.26.15.47.41; Fri, 26 Oct 2018 15:47:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728166AbeJ0H0M (ORCPT + 99 others); Sat, 27 Oct 2018 03:26:12 -0400 Received: from emh04.mail.saunalahti.fi ([62.142.5.110]:39102 "EHLO emh04.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728022AbeJ0H0M (ORCPT ); Sat, 27 Oct 2018 03:26:12 -0400 Received: from localhost.localdomain (85-76-71-107-nat.elisa-mobile.fi [85.76.71.107]) by emh04.mail.saunalahti.fi (Postfix) with ESMTP id 5BDD6300BC; Sat, 27 Oct 2018 01:47:18 +0300 (EEST) From: Aaro Koskinen To: Ralf Baechle , Paul Burton , linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Cc: Aaro Koskinen Subject: [PATCH] MIPS: OCTEON: fix out of bounds array access on CN68XX Date: Sat, 27 Oct 2018 01:46:34 +0300 Message-Id: <20181026224634.30560-1-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The maximum number of interfaces is returned by cvmx_helper_get_number_of_interfaces(), and the value is used to access interface_port_count[]. When CN68XX support was added, we forgot to increase the array size. Fix that. Fixes: 2c8c3f0201333 ("MIPS: Octeon: Support additional interfaces on CN68XX") Signed-off-by: Aaro Koskinen --- arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper.c b/arch/mips/cavium-octeon/executive/cvmx-helper.c index 75108ec669eb..6c79e8a16a26 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-helper.c +++ b/arch/mips/cavium-octeon/executive/cvmx-helper.c @@ -67,7 +67,7 @@ void (*cvmx_override_pko_queue_priority) (int pko_port, void (*cvmx_override_ipd_port_setup) (int ipd_port); /* Port count per interface */ -static int interface_port_count[5]; +static int interface_port_count[9]; /** * Return the number of interfaces the chip has. Each interface -- 2.17.0