Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3527333pxj; Mon, 24 May 2021 08:41:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOFxoX7EFRAOupIluB0sFKfvAbrXgvWrzxXHa0BNq+13n8Khwfcumqm6Q/Hrc1G3fHj31u X-Received: by 2002:a05:6e02:1a67:: with SMTP id w7mr14228471ilv.137.1621870904130; Mon, 24 May 2021 08:41:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621870904; cv=none; d=google.com; s=arc-20160816; b=cMUIY7I/dwiHc320k5MyCo3Qkdg9G8aQpghNeoYh+XZ/jPa16pJASQBl45wAX9Vg1J eaCWI6JlizDydLP3QN+V13oFE5mzgrbQ03zkbkhTd7DiptG5HbJ4vHq3T+ms4nF2wyF6 nqzK+NxEborMAjoPIgBUANK0vEG/nSwwgqfFHUeyD00HtKDDmpNkmzEQTiLczBEfUe5y 92391M5SGhYNL8RSLzZdni1sZre2RFxQladg6JVNFisBCwspEXsgMv1rrvRm27Qe740c 2i99+Us59XL32Zj92fMhF2t9uGJpreJnpgDTdOFPHtXct+dB4rz2hrCQp0LQrNYybgf1 XnHg== 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=Ehg3I2+rmfyHV0dSGFZJAK1eboiu+8HUzvkToQn0kuY=; b=jlk3KrkalWng+cEZW8umJ8clYHiKWgyV7WXTdfP83rTZfC85wO8+4FXv3O5wpLIb+m cQHika9iKx/HDAfHO5c5xqiZaNYLxEcLulEpKQVaqk5Dua+T1xfreUHmsWKg5P4BeQtV l8MFLro6tgk3ytxHzXjtVIKAY4Mu+z4AxpwzMGqnt9ZeEg1n2ooDhHn56Hhy0g1naBiR E5r5Fo12MLBdttqtrgZa1gGD3A4BXlPiTiRZC08JmYdomySclpOydL75Zu/RCBTbvhCx 7nIM9fuPMrUq1j6XmfNHefAssZuIlcAn4sX8nsaTE6/Kab5qYVTQCwHNDxa2zrK8/01w qlSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=r0jgo2iz; 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 x11si13752476ilp.53.2021.05.24.08.41.31; Mon, 24 May 2021 08:41:44 -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=r0jgo2iz; 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 S233758AbhEXPmJ (ORCPT + 99 others); Mon, 24 May 2021 11:42:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:56262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233767AbhEXPiW (ORCPT ); Mon, 24 May 2021 11:38:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 42B9C61429; Mon, 24 May 2021 15:33:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870407; bh=iLjv2BpjEpxLxEfUWOFHpbFCb3/nWsauqU8ooJ9BEsU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r0jgo2iz/zRpw9zJpw87KeA3w1zVtVFkaZCEE0gSRUBkPkloXYfGofuy3/VLpcTMo bynwHyfPTRDNNkqRt9164W3uGHWZyVL0z/MJp2DlyCASuk87XgqLOUlFu1e9bb9ewD shgQljBbD4WNJSNBHUsaTSeMPLEDRgyJ0t9rsCUw= 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 4.14 20/37] Revert "video: imsttfb: fix potential NULL pointer dereferences" Date: Mon, 24 May 2021 17:25:24 +0200 Message-Id: <20210524152324.871453534@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152324.199089755@linuxfoundation.org> References: <20210524152324.199089755@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 @@ -1516,11 +1516,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;