Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3550184pxj; Mon, 24 May 2021 09:10:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzE1KmXsUGN+T7pDYslakq+030ciNwpM2Plg/1hz+AOFovT9KFi4YtQDYaOEZ7WpFVeqlz+ X-Received: by 2002:a6b:630c:: with SMTP id p12mr15351844iog.124.1621872603481; Mon, 24 May 2021 09:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621872603; cv=none; d=google.com; s=arc-20160816; b=L2iG4Q4CtDBJrXyu/adQIHcph9/2tF+dm1UbIeYnCCzuI424dqPbZoePxcfpr4wQuf WBkrtBSW4KZ15e00AOeJDj4QigkD1VL+56sfxTE80ofR/mI9WVHEj0pM6/6v+T08j1pK g6yFYdGVKWNMVCq5s/JMYLpUkiiTxz0vQF9k1i2TQORn5cRA6kE62kbiV7ntaT7vnkjY pdWEszaWtMPoOFjNH/U5g5Llv0QfhF42adiClKRFB7DiKe1v4jXDUozwUnVI0oN6INRy z+DbytpE5RatkYFDsT9NCY6NPzJObo/PIOE954THLluaEk6Du26c7Po1uSBkBePjEgk0 7XAA== 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=+av96qQPv/GO6w4PgA0FMlnHUXZMfPmYvsBkpMxGkxs=; b=oD+HXiVEGzMFNSk8xW3n75mNm3IlmYWLpUVRw8PtY/tYhhhz0Q3GVLdW3l+r7Ud2Nv cofgjIJFRivudPxw9Xp8Kzh+kxRXJ49eIvbElG7oWPBtleE8AdRik6Tjge3dkUUV5OJc rk+WTpCYmWgi2vpqKEN8Aj9hEQ+dtXudTZ7Sa7+DvPiJBlXzCfRPQ+A/iZ+N/J4l2wwZ jmSUBN9SDBAKnHDn7Hu554xeT3FqangAYYhSmReJWh1PBeqbjeEaFTGHR2RkebwQivT7 6A3fk6Yi31HF2oB285juwl0Gq5gc787u7GrdcOGjCDQBA8sPBbWr1qLxes/fZFv3tKul Mmsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=blKaLiJL; 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 q8si14105368ior.12.2021.05.24.09.09.50; Mon, 24 May 2021 09:10:03 -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=blKaLiJL; 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 S238327AbhEXQKA (ORCPT + 99 others); Mon, 24 May 2021 12:10:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:47356 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235899AbhEXQBt (ORCPT ); Mon, 24 May 2021 12:01:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 39C706199E; Mon, 24 May 2021 15:46:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621871217; bh=3QGc/LvIFFdbXuhpfjbxySzcVz5xSVM25npG30qL/VU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=blKaLiJL+tNnBt2yu2BWvCyTSbysfcoah2HT5BgKe7Xl305xa07HqCahOuKRjMVL0 YRMuIz0AM+N7rRrAEdvzntlofV1b8G/AjDxpE2dlXXw11K9Xwo8243UVA7B7cyNmHr rVXU7ipwsQMX3JtBYx0tgdlzzNcl4CtvF3FNVUIU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kangjie Lu , Aditya Pakki , Finn Thain , Bartlomiej Zolnierkiewicz , Rob Herring Subject: [PATCH 5.12 100/127] Revert "video: imsttfb: fix potential NULL pointer dereferences" Date: Mon, 24 May 2021 17:26:57 +0200 Message-Id: <20210524152338.243548237@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152334.857620285@linuxfoundation.org> References: <20210524152334.857620285@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: Greg Kroah-Hartman commit ed04fe8a0e87d7b5ea17d47f4ac9ec962b24814a upstream. This reverts commit 1d84353d205a953e2381044953b7fa31c8c9702d. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit here, while technically correct, did not fully handle all of the reported issues that the commit stated it was fixing, so revert it until it can be "fixed" fully. Note, ioremap() probably will never fail for old hardware like this, and if anyone actually used this hardware (a PowerMac era PCI display card), they would not be using fbdev anymore. Cc: Kangjie Lu Cc: Aditya Pakki Cc: Finn Thain Cc: Bartlomiej Zolnierkiewicz Reviewed-by: Rob Herring Fixes: 1d84353d205a ("video: imsttfb: fix potential NULL pointer dereferences") Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-67-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/imsttfb.c | 5 ----- 1 file changed, 5 deletions(-) --- a/drivers/video/fbdev/imsttfb.c +++ b/drivers/video/fbdev/imsttfb.c @@ -1512,11 +1512,6 @@ static int imsttfb_probe(struct pci_dev info->fix.smem_start = addr; info->screen_base = (__u8 *)ioremap(addr, par->ramdac == IBM ? 0x400000 : 0x800000); - if (!info->screen_base) { - release_mem_region(addr, size); - framebuffer_release(info); - return -ENOMEM; - } info->fix.mmio_start = addr + 0x800000; par->dc_regs = ioremap(addr + 0x800000, 0x1000); par->cmap_regs_phys = addr + 0x840000;