Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3033455pxb; Mon, 18 Oct 2021 07:01:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0oGUgE2uPrzzjEsjwwATs/pnIy8za5MRuBp4VZq7b4D94M+Qoq4iIIwSY/nWH6eUiHYtQ X-Received: by 2002:a63:2484:: with SMTP id k126mr23836042pgk.297.1634565668710; Mon, 18 Oct 2021 07:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634565668; cv=none; d=google.com; s=arc-20160816; b=no6seZL9zklm5rVlFFH/KIOIr3gJwn6P1a6NaMTn+Qdr1KwuMAbl5RYWB6axGUu8Q9 7CXRdOHkoqkH2/QmtW8eCl3Af32gE+WJumHePUyWvaaWTvbfewWLVwmOv2vMLz8e1Wpb q7nsH5xRYuAkwPhleAFMSpoUaOD7hRTVY2HmOPs9wtygfmQuMjurpwQQqBRidOkweh1W d6FyawjijGtYfrVScd+MsvKMQVTwCrEpXMDRttC0KpDg6f83EvYE+RYTchz1XRgCAbzz kLmd0XOCAaTC0yYgwU4EXMbkUUdBoMXcoo9jtyCitFYd9Uscp4p8hdOLWpUwURddI33g PiFg== 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=iF2Q/1RJxNDVgWIL2/bfa0uW+rfY1ct9IQXKvW5LwlY=; b=iSmgLTCf5OzKXoxIlLcFbnrCYx2JvddaOZZtgtS2xt+4VW9CkknSkMIQNcSN6KHZZH sF+x3gBFm8EVM73QYM1ksslomTPt/g0oMXNP2z/4APC8mAKPgUTNmBVinjFnbbsXlxwu yjC9h8uHXAOu9ngYMhQxYX/7wL7QKNisdUkdnHR9nHHvn25yzohKF3mJnCUc+StjBr/w KdeUMw1megGMGbjnc6sqi5eQlKOMT8Dy5UDNmbZ6D83nha/2U09atFUypZu6gowJWoOL 698nU/QPCycMG37RDRWlOcT/2P3JHE4EjfOWwN8PwL49iWRtCiB6KYBKohxPmia7KhZF Sy/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oWzfQAh9; 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 z12si6314685pfh.257.2021.10.18.07.00.55; Mon, 18 Oct 2021 07:01:08 -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=oWzfQAh9; 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 S234125AbhJROB4 (ORCPT + 99 others); Mon, 18 Oct 2021 10:01:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:40798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234170AbhJRN75 (ORCPT ); Mon, 18 Oct 2021 09:59:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EE18061A53; Mon, 18 Oct 2021 13:42:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634564523; bh=8pbmoMm1XhlbrHMxJD1caV5O4QJWhfMAtEFJXtpu3+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oWzfQAh9i5asq743nKiLPOPCDj5AUMnzKIMXL3pXuj1hoebLNbf8NaEh6vVmF2HkT k/2LDPlO0Ycq0+/76xn8FUv/pQ/jr+Rm/610S82s5Iuf9iYNCNmAu9AosT+jkXpD7m 3llMH3z4MBy3YoFN+B/1ggvv9zg9AlI8AunOZaaU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vadim Pasternak , Hans de Goede Subject: [PATCH 5.14 122/151] platform/mellanox: mlxreg-io: Fix read access of n-bytes size attributes Date: Mon, 18 Oct 2021 15:25:01 +0200 Message-Id: <20211018132344.639382497@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132340.682786018@linuxfoundation.org> References: <20211018132340.682786018@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: Vadim Pasternak commit db9cc7d6f95e7d89b0ce57e785cfd9d67a7505d8 upstream. Fix shift argument for function rol32(). It should be provided in bits, while was provided in bytes. Fixes: 86148190a7db ("platform/mellanox: mlxreg-io: Add support for complex attributes") Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20210927142214.2613929-3-vadimp@nvidia.com Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman --- drivers/platform/mellanox/mlxreg-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/platform/mellanox/mlxreg-io.c +++ b/drivers/platform/mellanox/mlxreg-io.c @@ -98,7 +98,7 @@ mlxreg_io_get_reg(void *regmap, struct m if (ret) goto access_error; - *regval |= rol32(val, regsize * i); + *regval |= rol32(val, regsize * i * 8); } }