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 7A1521442F7; Thu, 11 Apr 2024 10:06:41 +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=1712830001; cv=none; b=kZfWqAp8H2Dz5GLbMDyEiS6tfrjd/lgxsfHiYDvz1X1OWXnehcfD9CwgCV9O8f51fADFDpKa2gOtAewNb9IXaDUbymq47W4ENwwZTeucppY/CUPk04M/XaM+vzV2JicsUlfTTFBXt9XPzKByD4wO/ty61//oLIJcxqU5qBQ3BsY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712830001; c=relaxed/simple; bh=axUJJLVbi0xeJaeNcWa6ws5tMw9E+iSQdz8GBBsf/dA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pNZaoMWZOisCAd7HCHAxaRDiB8gYBiDUhUKLc1OABUwiWBW9SvsxnoeO0dytWk5mm5CFCcJkhEGiHFpXqD72SsQxOHCOcU8pqqhmzy84s/KeQESmK2z2sjJ2fNh580EloEzhE/kZ/je/4A7xBO1qPAbNugn1cbchG7EGUG+RfS4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PGxhsnBs; 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="PGxhsnBs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F29F4C43390; Thu, 11 Apr 2024 10:06:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712830001; bh=axUJJLVbi0xeJaeNcWa6ws5tMw9E+iSQdz8GBBsf/dA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PGxhsnBs+NhftOsGDvdCpFrbYnZ0LSWxp9vNcVRC+YObRutqVelcMGEvMVF7eRf4e czSbq0WpJ6t7GP3KHBNxXeFyvToNshT6WKqVXPNiw85jCarkA5xvMBjDa7dew4lYFT +8rRsfy7zIub4HUDbp7A57UWvQ8kRaHBK8jdWCpg= 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 4.19 165/175] fbdev: viafb: fix typo in hw_bitblt_1 and hw_bitblt_2 Date: Thu, 11 Apr 2024 11:56:28 +0200 Message-ID: <20240411095424.531709761@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240411095419.532012976@linuxfoundation.org> References: <20240411095419.532012976@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 4.19-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 eb3615c69987e..f542b01568df9 100644 --- a/drivers/video/fbdev/via/accel.c +++ b/drivers/video/fbdev/via/accel.c @@ -129,7 +129,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; @@ -274,7 +274,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