From: Greg Kroah-Hartman Date: Thu, 11 May 2017 08:25:06 +0000 (+0200) Subject: 3.18-stable patches X-Git-Tag: v4.4.68~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ddd09992ef18ca792afdf706cc76c17fa52c4270;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: staging-emxx_udc-remove-incorrect-__init-annotations.patch --- diff --git a/queue-3.18/series b/queue-3.18/series index f70adf61fa7..a585b56640c 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -29,3 +29,4 @@ usb-serial-sierra-fix-bogus-alternate-setting-assumption.patch scsi-scsi_dh_emc-return-success-in-clariion_std_inquiry.patch brcmfmac-ensure-pointer-correctly-set-if-skb-data-location-changes.patch brcmfmac-make-skb-header-writable-before-use.patch +staging-emxx_udc-remove-incorrect-__init-annotations.patch diff --git a/queue-3.18/staging-emxx_udc-remove-incorrect-__init-annotations.patch b/queue-3.18/staging-emxx_udc-remove-incorrect-__init-annotations.patch new file mode 100644 index 00000000000..cf5faea4a0e --- /dev/null +++ b/queue-3.18/staging-emxx_udc-remove-incorrect-__init-annotations.patch @@ -0,0 +1,46 @@ +From 4f3445067d5f78fb8d1970b02610f85c2f377ea4 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Fri, 16 Dec 2016 10:09:39 +0100 +Subject: staging: emxx_udc: remove incorrect __init annotations + +From: Arnd Bergmann + +commit 4f3445067d5f78fb8d1970b02610f85c2f377ea4 upstream. + +The probe function is not marked __init, but some other functions +are. This leads to a warning on older compilers (e.g. gcc-4.3), +and can cause executing freed memory when built with those +compilers: + +WARNING: drivers/staging/emxx_udc/emxx_udc.o(.text+0x2d78): Section mismatch in reference from the function nbu2ss_drv_probe() to the function .init.text:nbu2ss_drv_contest_init() + +This removes the annotations. + +Fixes: 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile USB Gadget driver") +Signed-off-by: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/emxx_udc/emxx_udc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/staging/emxx_udc/emxx_udc.c ++++ b/drivers/staging/emxx_udc/emxx_udc.c +@@ -3286,7 +3286,7 @@ static void __init nbu2ss_drv_set_ep_inf + } + + /*-------------------------------------------------------------------------*/ +-static void __init nbu2ss_drv_ep_init(struct nbu2ss_udc *udc) ++static void nbu2ss_drv_ep_init(struct nbu2ss_udc *udc) + { + int i; + +@@ -3302,7 +3302,7 @@ static void __init nbu2ss_drv_ep_init(st + + /*-------------------------------------------------------------------------*/ + /* platform_driver */ +-static int __init nbu2ss_drv_contest_init( ++static int nbu2ss_drv_contest_init( + struct platform_device *pdev, + struct nbu2ss_udc *udc) + {