Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3777724pxb; Mon, 4 Oct 2021 09:22:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBeRqyS+JWZbnbHnHnElSv+IGBwrnm26KB+/J/rY4AIqXCkMqq53ki759MLGv9HLVF63tr X-Received: by 2002:a05:600c:a08:: with SMTP id z8mr19712200wmp.165.1633364565890; Mon, 04 Oct 2021 09:22:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633364565; cv=none; d=google.com; s=arc-20160816; b=gJeKmIpPDT29zTJveC9GY6wD4PB9Axefku/ROX92mLegTbYR0+FvZFasvQ4SW1fMIu AyrksiFaYCilMQyxpfGacah3oQNnA6tzrJBe+4fAE+obR+/u1H9u/dPI3lI4ktcgy1X1 0/JQbPNIypzn8Pskz5jTo9p67Z2jZxxSEEXF2aZZkBtJAJOMj0oC2fu3mLj6Q169x0aI zbFc7LUQe1XgiRIDuRY1Yxr5lqUBTkBXyK0asPXxMFgWG/gXJIyDkfdoCN9uIuMDyyzk ceYu4C9Vv9jHGWS/j1YR6XoL2jaP38wt+vjsmnUAi1RH09pPtRgwBZb3HDC0txi9L7HZ 99xw== 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=lbXmZN/yqC0tU3L6vbwZH1OyfKiJoLGqQNw8GD28UWw=; b=VyMn/QwbgFrRRuFwpii3PblQV6f/BojrAvgzyyXHQAAltBw1sctLUwIoTuSvrKXKAS Jb+whM+jM79YHHVMSl5Z6bnHTvgb0MBH98HWO0A4skJR6jR+R3bHBYOP/TYwMxJ3yW6B M5Paqlnrbq8bDLGTS/zTmQm7Yy1F+DpowErLaww21vSh111U7HyO5ytXuuc0Rcr1RO71 WlUbnwUX1zi6TsEFXt/eKXrH1BRnl04ldeDVcudmRw1PSXqVQ0yvBxfmRSfgiW94cETe iQzyQPJXqPFS19aPny6lGaFSPl6YR+BcADNkYZajKVg2qXJT4fssTN06K02xA+k8Qn0l cpBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SDfyYTuM; 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 u2si21754111ejy.557.2021.10.04.09.22.18; Mon, 04 Oct 2021 09:22:45 -0700 (PDT) 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=SDfyYTuM; 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 S237489AbhJDNcc (ORCPT + 99 others); Mon, 4 Oct 2021 09:32:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:43756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237572AbhJDNae (ORCPT ); Mon, 4 Oct 2021 09:30:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E9F4261B93; Mon, 4 Oct 2021 13:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633353228; bh=mSdQYmdyDXhgidCiTMRMJVTPZZlgblIqLnLzCOIIHH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SDfyYTuMeSZTtU9D56Am+9wsCGlvEHG5kJOpbsLlnnACpf5n01uSay8XIWm3yDoQo iYSP/b/MkPgpXDYVjUZu1WXiN0X+JUNXzttOa9yrqmMtElCoJlo8v9mn5FXfKXP/WL mHZRgDBZ4V7GawkZk/2JjWr5KYPWiuHYHfY7X7kg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stanley Chu , Bart Van Assche , Jonathan Hsu , "Martin K. Petersen" Subject: [PATCH 5.14 045/172] scsi: ufs: Fix illegal offset in UPIU event trace Date: Mon, 4 Oct 2021 14:51:35 +0200 Message-Id: <20211004125046.448203254@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004125044.945314266@linuxfoundation.org> References: <20211004125044.945314266@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: Jonathan Hsu commit e8c2da7e329ce004fee748b921e4c765dc2fa338 upstream. Fix incorrect index for UTMRD reference in ufshcd_add_tm_upiu_trace(). Link: https://lore.kernel.org/r/20210924085848.25500-1-jonathan.hsu@mediatek.com Fixes: 4b42d557a8ad ("scsi: ufs: core: Fix wrong Task Tag used in task management request UPIUs") Cc: stable@vger.kernel.org Reviewed-by: Stanley Chu Reviewed-by: Bart Van Assche Signed-off-by: Jonathan Hsu Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/ufs/ufshcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -330,8 +330,7 @@ static void ufshcd_add_query_upiu_trace( static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag, enum ufs_trace_str_t str_t) { - int off = (int)tag - hba->nutrs; - struct utp_task_req_desc *descp = &hba->utmrdl_base_addr[off]; + struct utp_task_req_desc *descp = &hba->utmrdl_base_addr[tag]; if (!trace_ufshcd_upiu_enabled()) return;