FAILED: patch "[PATCH] PCI: Allow release of resources that were never assigned" failed to apply to 4.15-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 4.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
c37406e05d1e541df40b8b81c4bd40753fcaf414Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <[email protected]>
Date: Mon, 26 Feb 2018 14:51:13 -0600
Subject: [PATCH] PCI: Allow release of resources that were never assigned
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It is entirely possible that the BIOS wasn't able to assign resources to a device. In this case don't crash in pci_release_resource() when we try to resize the resource.
drivers/pci/setup-res.c +4 -0
@@ -401,6 +401,10 @@ void pci_release_resource(struct pci_dev *dev, int resno)struct resource *res = dev->resource + resno;pci_info (dev,"BAR %d: releasing %pR\n" , resno, res); + +if (!res->parent) +return ; +release_resource (res); res->end =resource_size (res) -1 ; res->start =0 ;