From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 883581F5FA; Thu, 11 Apr 2024 10:12:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712830377; cv=none; b=MMoGqIw8bEi6hC+qmaaLPySSkP2P0rPy9+iI8uolcsz45iJsih6PNymP16Q+w1KranC70CAn5A50lnFTvitjq26vRRRWkTGScZhYu5qhDUJJ6BcRcJpUSADjzzKj6rUfIxXpMTQZKAt+pq5pgaY0v7kD9hsqhZ8ccK2Wi+aQ568= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712830377; c=relaxed/simple; bh=p0a6Ww7dgFsXnQwt3S46vHtasTMF2pAkjE3n+Ir7yRo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oX9jiw9Lc4NzZ7cbDgSJrpzgBi4cN6hWmpliV5wcPRxwHMx2d8M5dnHeLlLE3AZyhrl4JTU5tHicCKL+d+lNBoIMit7Tncn3fGlo/GFBugJBfonQ/sWS3mRgGifh9OxLhke+edRQqvatXtPdSnZGr6GRLpcDCTBtlJIPB4UuuCM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BQfgeJrc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="BQfgeJrc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9124C433F1; Thu, 11 Apr 2024 10:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712830377; bh=p0a6Ww7dgFsXnQwt3S46vHtasTMF2pAkjE3n+Ir7yRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BQfgeJrcLcbyx9/qYey17OG1BX3HVgMOKkGcpD+WF8/is3Eh6CXe1Q3KuZeg+LTmg tw+BlksDL9EoDSTPyXc9SjC8kO8aVy+Sen1g6zgAtQDgsB96rI93rMM0pZTrTP7n+4 C5pZqXkWhMB5UcvU4iN8doTXruyHGlOIH1I6ZV30= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Aleksandr Burakov , Helge Deller , Sasha Levin Subject: [PATCH 6.8 124/143] fbdev: viafb: fix typo in hw_bitblt_1 and hw_bitblt_2 Date: Thu, 11 Apr 2024 11:56:32 +0200 Message-ID: <20240411095424.638148999@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240411095420.903937140@linuxfoundation.org> References: <20240411095420.903937140@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aleksandr Burakov [ Upstream commit bc87bb342f106a0402186bcb588fcbe945dced4b ] There are some actions with value 'tmp' but 'dst_addr' is checked instead. It is obvious that a copy-paste error was made here and the value of variable 'tmp' should be checked here. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Aleksandr Burakov Signed-off-by: Helge Deller Signed-off-by: Sasha Levin --- drivers/video/fbdev/via/accel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/via/accel.c b/drivers/video/fbdev/via/accel.c index 0a1bc7a4d7853..1e04026f08091 100644 --- a/drivers/video/fbdev/via/accel.c +++ b/drivers/video/fbdev/via/accel.c @@ -115,7 +115,7 @@ static int hw_bitblt_1(void __iomem *engine, u8 op, u32 width, u32 height, if (op != VIA_BITBLT_FILL) { tmp = src_mem ? 0 : src_addr; - if (dst_addr & 0xE0000007) { + if (tmp & 0xE0000007) { printk(KERN_WARNING "hw_bitblt_1: Unsupported source " "address %X\n", tmp); return -EINVAL; @@ -260,7 +260,7 @@ static int hw_bitblt_2(void __iomem *engine, u8 op, u32 width, u32 height, writel(tmp, engine + 0x18); tmp = src_mem ? 0 : src_addr; - if (dst_addr & 0xE0000007) { + if (tmp & 0xE0000007) { printk(KERN_WARNING "hw_bitblt_2: Unsupported source " "address %X\n", tmp); return -EINVAL; -- 2.43.0