From: Greg Kroah-Hartman Date: Tue, 19 Feb 2019 09:33:56 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v3.18.135~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8eca29ccd2726d0b5eeaf5867874cd0406c39392;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: revert-scsi-aic94xx-fix-module-loading.patch uapi-if_ether.h-move-__uapi_def_ethhdr-libc-define.patch --- 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 index 00000000000..61cb577fe7e --- /dev/null +++ b/queue-4.9/revert-scsi-aic94xx-fix-module-loading.patch @@ -0,0 +1,55 @@ +From db8f82b3327a8f0760d4505fa8506523d6052cbd Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Tue, 19 Feb 2019 10:31:07 +0100 +Subject: Revert "scsi: aic94xx: fix module loading" + +From: Greg Kroah-Hartman + +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 +Cc: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + 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); diff --git a/queue-4.9/series b/queue-4.9/series index 124d1f8ee0e..e22527d23db 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -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 index 00000000000..49970859ee7 --- /dev/null +++ b/queue-4.9/uapi-if_ether.h-move-__uapi_def_ethhdr-libc-define.patch @@ -0,0 +1,87 @@ +From da360299b6734135a5f66d7db458dcc7801c826a Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Mon, 12 Feb 2018 23:59:51 +0100 +Subject: uapi/if_ether.h: move __UAPI_DEF_ETHHDR libc define + +From: Hauke Mehrtens + +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 +#include +#include + +int main(void) +{ + return 0; +} + +Fixes: 6926e041a892 ("uapi/if_ether.h: prevent redefinition of struct ethhdr") +Reported-by: Guillaume Nault +Cc: # 4.15 +Signed-off-by: Hauke Mehrtens +Signed-off-by: David S. Miller +Cc: Sudip Mukherjee +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +-#include + + /* + * 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 */