From: Greg Kroah-Hartman Date: Fri, 27 Nov 2020 13:25:57 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v4.4.247~35^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab7acf39c7e80bdb50270e13c8c3cb203fd1c86e;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: pci-add-device-even-if-driver-attach-failed.patch wireless-use-linux-stddef.h-instead-of-stddef.h.patch --- diff --git a/queue-4.14/pci-add-device-even-if-driver-attach-failed.patch b/queue-4.14/pci-add-device-even-if-driver-attach-failed.patch new file mode 100644 index 00000000000..7a339846ad4 --- /dev/null +++ b/queue-4.14/pci-add-device-even-if-driver-attach-failed.patch @@ -0,0 +1,47 @@ +From 2194bc7c39610be7cabe7456c5f63a570604f015 Mon Sep 17 00:00:00 2001 +From: Rajat Jain +Date: Mon, 6 Jul 2020 16:32:40 -0700 +Subject: PCI: Add device even if driver attach failed + +From: Rajat Jain + +commit 2194bc7c39610be7cabe7456c5f63a570604f015 upstream. + +device_attach() returning failure indicates a driver error while trying to +probe the device. In such a scenario, the PCI device should still be added +in the system and be visible to the user. + +When device_attach() fails, merely warn about it and keep the PCI device in +the system. + +This partially reverts ab1a187bba5c ("PCI: Check device_attach() return +value always"). + +Link: https://lore.kernel.org/r/20200706233240.3245512-1-rajatja@google.com +Signed-off-by: Rajat Jain +Signed-off-by: Bjorn Helgaas +Reviewed-by: Greg Kroah-Hartman +Cc: stable@vger.kernel.org # v4.6+ +[sudip: use dev_warn] +Signed-off-by: Sudip Mukherjee +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pci/bus.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +--- a/drivers/pci/bus.c ++++ b/drivers/pci/bus.c +@@ -324,12 +324,8 @@ void pci_bus_add_device(struct pci_dev * + + dev->match_driver = true; + retval = device_attach(&dev->dev); +- if (retval < 0 && retval != -EPROBE_DEFER) { ++ if (retval < 0 && retval != -EPROBE_DEFER) + dev_warn(&dev->dev, "device attach failed (%d)\n", retval); +- pci_proc_detach_device(dev); +- pci_remove_sysfs_dev_files(dev); +- return; +- } + + dev->is_added = 1; + } diff --git a/queue-4.14/series b/queue-4.14/series index 8dc2bb307fe..4b1329bd2ec 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -1,2 +1,4 @@ perf-event-check-ref_reloc_sym-before-using-it.patch mm-userfaultfd-do-not-access-vma-vm_mm-after-calling-handle_userfault.patch +wireless-use-linux-stddef.h-instead-of-stddef.h.patch +pci-add-device-even-if-driver-attach-failed.patch diff --git a/queue-4.14/wireless-use-linux-stddef.h-instead-of-stddef.h.patch b/queue-4.14/wireless-use-linux-stddef.h-instead-of-stddef.h.patch new file mode 100644 index 00000000000..c795973f9c0 --- /dev/null +++ b/queue-4.14/wireless-use-linux-stddef.h-instead-of-stddef.h.patch @@ -0,0 +1,39 @@ +From 1b9ae0c92925ac40489be526d67d0010d0724ce0 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Thu, 21 May 2020 22:14:22 +0200 +Subject: wireless: Use linux/stddef.h instead of stddef.h + +From: Hauke Mehrtens + +commit 1b9ae0c92925ac40489be526d67d0010d0724ce0 upstream. + +When compiling inside the kernel include linux/stddef.h instead of +stddef.h. When I compile this header file in backports for power PC I +run into a conflict with ptrdiff_t. I was unable to reproduce this in +mainline kernel. I still would like to fix this problem in the kernel. + +Fixes: 6989310f5d43 ("wireless: Use offsetof instead of custom macro.") +Signed-off-by: Hauke Mehrtens +Link: https://lore.kernel.org/r/20200521201422.16493-1-hauke@hauke-m.de +Signed-off-by: Johannes Berg +Signed-off-by: Greg Kroah-Hartman + +--- + include/uapi/linux/wireless.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/include/uapi/linux/wireless.h ++++ b/include/uapi/linux/wireless.h +@@ -74,7 +74,11 @@ + #include /* for "struct sockaddr" et al */ + #include /* for IFNAMSIZ and co... */ + +-#include /* for offsetof */ ++#ifdef __KERNEL__ ++# include /* for offsetof */ ++#else ++# include /* for offsetof */ ++#endif + + /***************************** VERSION *****************************/ + /*