Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-17 16:45:05 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-17 16:45:09 +0200
commitf7c1154a6e0953603fba6ee3b42a5ec38700cb87 (patch)
treeaa9a4bd7ecbd81d9e39e0e11f106bfe907a5b291
parent1cc02e28f32ac464eeff7559565a36140d3d2b25 (diff)
appletalk: Fix compile regression (bsc#1051510).
-rw-r--r--patches.fixes/appletalk-Fix-compile-regression.patch71
-rw-r--r--series.conf1
2 files changed, 72 insertions, 0 deletions
diff --git a/patches.fixes/appletalk-Fix-compile-regression.patch b/patches.fixes/appletalk-Fix-compile-regression.patch
new file mode 100644
index 0000000000..bb0bdee640
--- /dev/null
+++ b/patches.fixes/appletalk-Fix-compile-regression.patch
@@ -0,0 +1,71 @@
+From 27da0d2ef998e222a876c0cec72aa7829a626266 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Wed, 6 Mar 2019 11:52:36 +0100
+Subject: [PATCH] appletalk: Fix compile regression
+Git-commit: 27da0d2ef998e222a876c0cec72aa7829a626266
+Patch-mainline: v5.1-rc1
+References: bsc#1051510
+
+A bugfix just broke compilation of appletalk when CONFIG_SYSCTL
+is disabled:
+
+In file included from net/appletalk/ddp.c:65:
+Net/appletalk/ddp.c: In function 'atalk_init':
+include/linux/atalk.h:164:34: error: expected expression before 'do'
+ #define atalk_register_sysctl() do { } while(0)
+ ^~
+net/appletalk/ddp.c:1934:7: note: in expansion of macro 'atalk_register_sysctl'
+ rc = atalk_register_sysctl();
+
+This is easier to avoid by using conventional inline functions
+as stubs rather than macros. The header already has inline
+functions for other purposes, so I'm changing over all the
+macros for consistency.
+
+Fixes: 6377f787aeb9 ("appletalk: Fix use-after-free in atalk_proc_exit")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ include/linux/atalk.h | 18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/include/linux/atalk.h b/include/linux/atalk.h
+index 5a90f28d5ff2..d5cfc0b15b76 100644
+--- a/include/linux/atalk.h
++++ b/include/linux/atalk.h
+@@ -161,16 +161,26 @@ extern int sysctl_aarp_resolve_time;
+ extern int atalk_register_sysctl(void);
+ extern void atalk_unregister_sysctl(void);
+ #else
+-#define atalk_register_sysctl() do { } while(0)
+-#define atalk_unregister_sysctl() do { } while(0)
++static inline int atalk_register_sysctl(void)
++{
++ return 0;
++}
++static inline void atalk_unregister_sysctl(void)
++{
++}
+ #endif
+
+ #ifdef CONFIG_PROC_FS
+ extern int atalk_proc_init(void);
+ extern void atalk_proc_exit(void);
+ #else
+-#define atalk_proc_init() ({ 0; })
+-#define atalk_proc_exit() do { } while(0)
++static inline int atalk_proc_init(void)
++{
++ return 0;
++}
++static inline void atalk_proc_exit(void)
++{
++}
+ #endif /* CONFIG_PROC_FS */
+
+ #endif /* __LINUX_ATALK_H__ */
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index d8ea1df412..e55fa6b14d 100644
--- a/series.conf
+++ b/series.conf
@@ -21446,6 +21446,7 @@
patches.drivers/tpm-Fix-some-name-collisions-with-drivers-char-tpm.h.patch
patches.fixes/tipc-fix-RDM-DGRAM-connect-regression.patch
patches.fixes/0001-ipv4-route-fail-early-when-inet-dev-is-missing.patch
+ patches.fixes/appletalk-Fix-compile-regression.patch
patches.suse/net-hsr-fix-memory-leak-in-hsr_dev_finalize.patch
patches.suse/ravb-Decrease-TxFIFO-depth-of-Q3-and-Q2-to-one.patch
patches.drivers/enic-fix-build-warning-without-CONFIG_CPUMASK_OFFSTA.patch