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

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

diff --git a/queue-4.9/revert-scsi-aic94xx-fix-module-loading.patch b/queue-4.9/revert-scsi-aic94xx-fix-module-loading.patch
new file mode 100644 (file)
index 0000000..61cb577
--- /dev/null
@@ -0,0 +1,55 @@
+From db8f82b3327a8f0760d4505fa8506523d6052cbd Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 19 Feb 2019 10:31:07 +0100
+Subject: Revert "scsi: aic94xx: fix module loading"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit d26358590bb2be063453412cfeec5afefe55d030 which is
+commit 42caa0edabd6a0a392ec36a5f0943924e4954311 upstream.
+
+It's not needed in the 4.9.y tree, my fault for backporting it that far.
+
+Reported-by: James Bottomley <James.Bottomley@HansenPartnership.com>
+Cc: 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(aic_revision, S_IRUGO, asd_show_dev_rev, NULL);
++static DEVICE_ATTR(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_aic_revision);
++      err = device_create_file(&asd_ha->pcidev->dev, &dev_attr_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_aic_revision);
++      device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision);
+       return err;
+ }
+ static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha)
+ {
+-      device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
++      device_remove_file(&asd_ha->pcidev->dev, &dev_attr_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 124d1f8ee0e6944533d873113bcde01b2278344c..e22527d23db44f42a0a9d240fb0a6e4afc93f642 100644 (file)
@@ -56,3 +56,5 @@ usb-dwc2-remove-unnecessary-kfree.patch
 netfilter-nf_tables-fix-mismatch-in-big-endian-system.patch
 pinctrl-msm-fix-gpio-hog-related-boot-issues.patch
 mm-stop-leaking-pagetables.patch
+uapi-if_ether.h-move-__uapi_def_ethhdr-libc-define.patch
+revert-scsi-aic94xx-fix-module-loading.patch
diff --git a/queue-4.9/uapi-if_ether.h-move-__uapi_def_ethhdr-libc-define.patch b/queue-4.9/uapi-if_ether.h-move-__uapi_def_ethhdr-libc-define.patch
new file mode 100644 (file)
index 0000000..4997085
--- /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
+@@ -140,6 +139,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
+@@ -263,10 +263,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 */