]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Feb 2019 09:33:37 +0000 (10:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Feb 2019 09:33:37 +0000 (10:33 +0100)
added patches:
uapi-if_ether.h-move-__uapi_def_ethhdr-libc-define.patch

queue-4.4/scsi-aic94xx-fix-module-loading.patch [deleted file]
queue-4.4/series
queue-4.4/uapi-if_ether.h-move-__uapi_def_ethhdr-libc-define.patch [new file with mode: 0644]

diff --git a/queue-4.4/scsi-aic94xx-fix-module-loading.patch b/queue-4.4/scsi-aic94xx-fix-module-loading.patch
deleted file mode 100644 (file)
index 58dd575..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-From 42caa0edabd6a0a392ec36a5f0943924e4954311 Mon Sep 17 00:00:00 2001
-From: James Bottomley <James.Bottomley@HansenPartnership.com>
-Date: Wed, 30 Jan 2019 16:42:12 -0800
-Subject: scsi: aic94xx: fix module loading
-
-From: James Bottomley <James.Bottomley@HansenPartnership.com>
-
-commit 42caa0edabd6a0a392ec36a5f0943924e4954311 upstream.
-
-The aic94xx driver is currently failing to load with errors like
-
-sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:03.0/0000:02:00.3/0000:07:02.0/revision'
-
-Because the PCI code had recently added a file named 'revision' to every
-PCI device.  Fix this by renaming the aic94xx revision file to
-aic_revision.  This is safe to do for us because as far as I can tell,
-there's nothing in userspace relying on the current aic94xx revision file
-so it can be renamed without breaking anything.
-
-Fixes: 702ed3be1b1b (PCI: Create revision file in sysfs)
-Cc: stable@vger.kernel.org
-Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/scsi/aic94xx/aic94xx_init.c |    8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
---- a/drivers/scsi/aic94xx/aic94xx_init.c
-+++ b/drivers/scsi/aic94xx/aic94xx_init.c
-@@ -281,7 +281,7 @@ static ssize_t asd_show_dev_rev(struct d
-       return snprintf(buf, PAGE_SIZE, "%s\n",
-                       asd_dev_rev[asd_ha->revision_id]);
- }
--static DEVICE_ATTR(revision, S_IRUGO, asd_show_dev_rev, NULL);
-+static DEVICE_ATTR(aic_revision, S_IRUGO, asd_show_dev_rev, NULL);
- static ssize_t asd_show_dev_bios_build(struct device *dev,
-                                      struct device_attribute *attr,char *buf)
-@@ -478,7 +478,7 @@ static int asd_create_dev_attrs(struct a
- {
-       int err;
--      err = device_create_file(&asd_ha->pcidev->dev, &dev_attr_revision);
-+      err = device_create_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
-       if (err)
-               return err;
-@@ -500,13 +500,13 @@ err_update_bios:
- err_biosb:
-       device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build);
- err_rev:
--      device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision);
-+      device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
-       return err;
- }
- static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha)
- {
--      device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision);
-+      device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
-       device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build);
-       device_remove_file(&asd_ha->pcidev->dev, &dev_attr_pcba_sn);
-       device_remove_file(&asd_ha->pcidev->dev, &dev_attr_update_bios);
index afde94f3fa1dffc32879f8f4d7eb3c0ec00b1abd..0abbcf1bccb37c8c31f35ec7af147f62474d6a61 100644 (file)
@@ -88,7 +88,6 @@ fuse-handle-zero-sized-retrieve-correctly.patch
 dmaengine-imx-dma-fix-wrong-callback-invoke.patch
 usb-phy-am335x-fix-race-condition-in-_probe.patch
 usb-gadget-udc-net2272-fix-bitwise-and-boolean-operations.patch
-scsi-aic94xx-fix-module-loading.patch
 kvm-x86-work-around-leak-of-uninitialized-stack-contents-cve-2019-7222.patch
 kvm-nvmx-unconditionally-cancel-preemption-timer-in-free_nested-cve-2019-7221.patch
 perf-x86-intel-uncore-add-node-id-mask.patch
@@ -141,3 +140,4 @@ ch9200-use-skb_cow_head-to-deal-with-cloned-skbs.patch
 kaweth-use-skb_cow_head-to-deal-with-cloned-skbs.patch
 usb-dwc2-remove-unnecessary-kfree.patch
 pinctrl-msm-fix-gpio-hog-related-boot-issues.patch
+uapi-if_ether.h-move-__uapi_def_ethhdr-libc-define.patch
diff --git a/queue-4.4/uapi-if_ether.h-move-__uapi_def_ethhdr-libc-define.patch b/queue-4.4/uapi-if_ether.h-move-__uapi_def_ethhdr-libc-define.patch
new file mode 100644 (file)
index 0000000..2fa43ce
--- /dev/null
@@ -0,0 +1,87 @@
+From da360299b6734135a5f66d7db458dcc7801c826a Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Mon, 12 Feb 2018 23:59:51 +0100
+Subject: uapi/if_ether.h: move __UAPI_DEF_ETHHDR libc define
+
+From: Hauke Mehrtens <hauke@hauke-m.de>
+
+commit da360299b6734135a5f66d7db458dcc7801c826a upstream.
+
+This fixes a compile problem of some user space applications by not
+including linux/libc-compat.h in uapi/if_ether.h.
+
+linux/libc-compat.h checks which "features" the header files, included
+from the libc, provide to make the Linux kernel uapi header files only
+provide no conflicting structures and enums. If a user application mixes
+kernel headers and libc headers it could happen that linux/libc-compat.h
+gets included too early where not all other libc headers are included
+yet. Then the linux/libc-compat.h would not prevent all the
+redefinitions and we run into compile problems.
+This patch removes the include of linux/libc-compat.h from
+uapi/if_ether.h to fix the recently introduced case, but not all as this
+is more or less impossible.
+
+It is no problem to do the check directly in the if_ether.h file and not
+in libc-compat.h as this does not need any fancy glibc header detection
+as glibc never provided struct ethhdr and should define
+__UAPI_DEF_ETHHDR by them self when they will provide this.
+
+The following test program did not compile correctly any more:
+
+#include <linux/if_ether.h>
+#include <netinet/in.h>
+#include <linux/in.h>
+
+int main(void)
+{
+       return 0;
+}
+
+Fixes: 6926e041a892 ("uapi/if_ether.h: prevent redefinition of struct ethhdr")
+Reported-by: Guillaume Nault <g.nault@alphalink.fr>
+Cc: <stable@vger.kernel.org> # 4.15
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/uapi/linux/if_ether.h    |    6 +++++-
+ include/uapi/linux/libc-compat.h |    6 ------
+ 2 files changed, 5 insertions(+), 7 deletions(-)
+
+--- a/include/uapi/linux/if_ether.h
++++ b/include/uapi/linux/if_ether.h
+@@ -22,7 +22,6 @@
+ #define _UAPI_LINUX_IF_ETHER_H
+ #include <linux/types.h>
+-#include <linux/libc-compat.h>
+ /*
+  *    IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
+@@ -137,6 +136,11 @@
+  *    This is an Ethernet frame header.
+  */
++/* allow libcs like musl to deactivate this, glibc does not implement this. */
++#ifndef __UAPI_DEF_ETHHDR
++#define __UAPI_DEF_ETHHDR             1
++#endif
++
+ #if __UAPI_DEF_ETHHDR
+ struct ethhdr {
+       unsigned char   h_dest[ETH_ALEN];       /* destination eth addr */
+--- a/include/uapi/linux/libc-compat.h
++++ b/include/uapi/linux/libc-compat.h
+@@ -184,10 +184,4 @@
+ #endif /* __GLIBC__ */
+-/* Definitions for if_ether.h */
+-/* allow libcs like musl to deactivate this, glibc does not implement this. */
+-#ifndef __UAPI_DEF_ETHHDR
+-#define __UAPI_DEF_ETHHDR             1
+-#endif
+-
+ #endif /* _UAPI_LIBC_COMPAT_H */