Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3703299pxb; Mon, 24 Jan 2022 15:50:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLXNwLsV2vqF9nSH7K6+5m3jZqwbLeLYDybpEdkOMOwszQTKJ/R+rd3x07sRfA9ix8Y+Yc X-Received: by 2002:a05:6a00:16d3:b0:4ba:4aee:2e34 with SMTP id l19-20020a056a0016d300b004ba4aee2e34mr15634935pfc.82.1643068115337; Mon, 24 Jan 2022 15:48:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643068115; cv=none; d=google.com; s=arc-20160816; b=HOhFaZ3uytDtgMftz8tgLm0Uf3V1bpxZd8Elr6C5Q8MpqcFV+aSOr0rP9VOH4CQg23 wnuqSE0GLtjChCLk9EfEkUzU4p2BCZ3ibcwN9ch6Vd1HHxFPFLKV+KpstaVOUVa6TQlD mifvanAMHHvKipz43kgpuIsJzs/anv+VyOKl+so7O142ySATValAzfoUFhVkSgFksF33 VcToEKICJAW3OVPJ51chvks6ctncvVxMh64ISwGoKZ6bj9bfYVWDQnkov7VevSpzIAak 8LIH2GkiHqq8I38EtSCGF57no5zhB/s76KTTf/OyPh3b6rmkmJqnfrg3qSRWMJ434Ymr jq9Q== 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=ouUsJbedP+KKphy8gsUPPxk3jnmyNMod8Dqnv6m944Q=; b=KkbKkNoKIubA6AqmErk+exHu/5Y3RpkuzW13edCQ6kLWrKrRpy8JLroGPhMayRP52e 2+mKnbbKNifaZDsEGQcw+f2IZA+8B9dGys5avFE4I/VYirwJTLG2BOaHrCLd8+xI0SNr qiKjrNnGSt2tQWnqWZiT+8EsVbY4ynPLNo2tjGfcWsPlSndpdyDhdGalIQpx7e0zhT4y m7/DhVQsEy580vdYKZYdnrughA12uv64eGLn3cSxHYuInNYxzzkfTrCmgiYL08ptQ8nv 4Nxddow2OxTjetplZky4pPcfPU21lfMAVXbOImL91MkektsaO9cO9mbFz3OD7QMpSuH9 vTBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p6yNJxHa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 e12si3953019plh.484.2022.01.24.15.48.22; Mon, 24 Jan 2022 15:48:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=p6yNJxHa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S2362351AbiAXXmO (ORCPT + 99 others); Mon, 24 Jan 2022 18:42:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1843316AbiAXXDs (ORCPT ); Mon, 24 Jan 2022 18:03:48 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C51E6C06C59D; Mon, 24 Jan 2022 13:14:32 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 64C7861484; Mon, 24 Jan 2022 21:14:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 420A9C340E5; Mon, 24 Jan 2022 21:14:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058871; bh=3Dr0Y8JmlRteCgNv3ytXBhi/7TFoA+6ATQj4UbNYrkU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p6yNJxHah0eXO/Hw0w8R34Gf8JgZcYi+i29fNfZaXF6dULUkRYQLiFutOtGrj9V9s e4CbmkvD1GGYIjr/p4gEqtSO3BMc5p+QwYctKuMzv1QQN67714/qAQe/+O2K1Mpl5n KLcgH9tUiZsg7ycC+c90N0+h8lsrVWP0PcfyeR3s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sunil Goutham , Subbaraya Sundeep , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.16 0429/1039] octeontx2-af: Fix interrupt name strings Date: Mon, 24 Jan 2022 19:36:58 +0100 Message-Id: <20220124184139.716698050@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sunil Goutham [ Upstream commit 6dc9a23e29061e50c36523270de60039ccf536fa ] Fixed interrupt name string logic which currently results in wrong memory location being accessed while dumping /proc/interrupts. Fixes: 4826090719d4 ("octeontx2-af: Enable CPT HW interrupts") Signed-off-by: Sunil Goutham Signed-off-by: Subbaraya Sundeep Link: https://lore.kernel.org/r/1641538505-28367-1-git-send-email-sbhatta@marvell.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 5 ++--- drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c index 45357deecabbf..a73a8017e0ee9 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c @@ -172,14 +172,13 @@ static int cpt_10k_register_interrupts(struct rvu_block *block, int off) { struct rvu *rvu = block->rvu; int blkaddr = block->addr; - char irq_name[16]; int i, ret; for (i = CPT_10K_AF_INT_VEC_FLT0; i < CPT_10K_AF_INT_VEC_RVU; i++) { - snprintf(irq_name, sizeof(irq_name), "CPTAF FLT%d", i); + sprintf(&rvu->irq_name[(off + i) * NAME_SIZE], "CPTAF FLT%d", i); ret = rvu_cpt_do_register_interrupt(block, off + i, rvu_cpt_af_flt_intr_handler, - irq_name); + &rvu->irq_name[(off + i) * NAME_SIZE]); if (ret) goto err; rvu_write64(rvu, blkaddr, CPT_AF_FLTX_INT_ENA_W1S(i), 0x1); diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c index 70bacd38a6d9d..d0ab8f233a029 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c @@ -41,7 +41,7 @@ static bool rvu_common_request_irq(struct rvu *rvu, int offset, struct rvu_devlink *rvu_dl = rvu->rvu_dl; int rc; - sprintf(&rvu->irq_name[offset * NAME_SIZE], name); + sprintf(&rvu->irq_name[offset * NAME_SIZE], "%s", name); rc = request_irq(pci_irq_vector(rvu->pdev, offset), fn, 0, &rvu->irq_name[offset * NAME_SIZE], rvu_dl); if (rc) -- 2.34.1