aboutsummaryrefslogtreecommitdiffstats
path: root/main/dahdi-linux-vanilla/linux-4.11.patch
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-02-01 20:55:22 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-02-01 20:55:22 +0000
commita89bb38a6765a19ffc5d6ae4397d2af2cbe6f221 (patch)
tree2d7ce7f3eeeacbe1ae10459a7adacc5742858019 /main/dahdi-linux-vanilla/linux-4.11.patch
parent4815c17138e1cbc9593e8d630c6d1d71c14e69ae (diff)
downloadaports-a89bb38a6765a19ffc5d6ae4397d2af2cbe6f221.tar.bz2
aports-a89bb38a6765a19ffc5d6ae4397d2af2cbe6f221.tar.xz
main/dahdi-linux-vanilla: new aport (replacing dahdi-linux-hardened)
Diffstat (limited to 'main/dahdi-linux-vanilla/linux-4.11.patch')
-rw-r--r--main/dahdi-linux-vanilla/linux-4.11.patch141
1 files changed, 141 insertions, 0 deletions
diff --git a/main/dahdi-linux-vanilla/linux-4.11.patch b/main/dahdi-linux-vanilla/linux-4.11.patch
new file mode 100644
index 0000000000..2a8cb60ced
--- /dev/null
+++ b/main/dahdi-linux-vanilla/linux-4.11.patch
@@ -0,0 +1,141 @@
+diff -ur dahdi-linux-2.11.1/drivers/dahdi/dahdi-base.c dahdi-linux-2.11.1-4.11/drivers/dahdi/dahdi-base.c
+--- dahdi-linux-2.11.1/drivers/dahdi/dahdi-base.c 2016-03-01 23:03:59.000000000 +0100
++++ dahdi-linux-2.11.1-4.11/drivers/dahdi/dahdi-base.c 2017-05-09 20:34:45.170079849 +0200
+@@ -47,6 +47,9 @@
+ #include <linux/kmod.h>
+ #include <linux/moduleparam.h>
+ #include <linux/sched.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
++#include <linux/sched/signal.h>
++#endif
+ #include <linux/list.h>
+ #include <linux/delay.h>
+ #include <linux/mutex.h>
+diff -ur dahdi-linux-2.11.1/drivers/dahdi/dahdi_dynamic.c dahdi-linux-2.11.1-4.11/drivers/dahdi/dahdi_dynamic.c
+--- dahdi-linux-2.11.1/drivers/dahdi/dahdi_dynamic.c 2016-03-01 23:03:59.000000000 +0100
++++ dahdi-linux-2.11.1-4.11/drivers/dahdi/dahdi_dynamic.c 2017-05-09 20:38:03.809649973 +0200
+@@ -467,7 +467,11 @@
+
+ /* We shouldn't have more than the two references at this point. If
+ * we do, there are probably channels that are still opened. */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)
+ if (atomic_read(&d->kref.refcount) > 2) {
++#else
++ if (kref_read(&d->kref) > 2) {
++#endif
+ dynamic_put(d);
+ return -EBUSY;
+ }
+diff -ur dahdi-linux-2.11.1/drivers/dahdi/wcaxx-base.c dahdi-linux-2.11.1-4.11/drivers/dahdi/wcaxx-base.c
+--- dahdi-linux-2.11.1/drivers/dahdi/wcaxx-base.c 2016-03-01 23:03:59.000000000 +0100
++++ dahdi-linux-2.11.1-4.11/drivers/dahdi/wcaxx-base.c 2017-05-09 20:39:05.690553708 +0200
+@@ -28,6 +28,9 @@
+ #include <linux/init.h>
+ #include <linux/pci.h>
+ #include <linux/sched.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
++#include <linux/sched/signal.h>
++#endif
+ #include <linux/workqueue.h>
+ #include <linux/delay.h>
+ #include <linux/moduleparam.h>
+diff -ur dahdi-linux-2.11.1/drivers/dahdi/wctc4xxp/base.c dahdi-linux-2.11.1-4.11/drivers/dahdi/wctc4xxp/base.c
+--- dahdi-linux-2.11.1/drivers/dahdi/wctc4xxp/base.c 2016-03-01 23:03:59.000000000 +0100
++++ dahdi-linux-2.11.1-4.11/drivers/dahdi/wctc4xxp/base.c 2017-05-09 20:40:14.041864392 +0200
+@@ -26,6 +26,10 @@
+ #include <linux/slab.h>
+ #include <linux/kmod.h>
+ #include <linux/sched.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
++#include <linux/sched/signal.h>
++#endif
+ #include <linux/pci.h>
+ #include <linux/interrupt.h>
+ #include <linux/delay.h>
+diff -ur dahdi-linux-2.11.1/drivers/dahdi/wctdm24xxp/base.c dahdi-linux-2.11.1-4.11/drivers/dahdi/wctdm24xxp/base.c
+--- dahdi-linux-2.11.1/drivers/dahdi/wctdm24xxp/base.c 2016-03-01 23:03:59.000000000 +0100
++++ dahdi-linux-2.11.1-4.11/drivers/dahdi/wctdm24xxp/base.c 2017-05-09 20:39:47.343067209 +0200
+@@ -44,6 +44,9 @@
+ #include <linux/init.h>
+ #include <linux/pci.h>
+ #include <linux/sched.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
++#include <linux/sched/signal.h>
++#endif
+ #include <linux/interrupt.h>
+ #include <linux/workqueue.h>
+ #include <linux/delay.h>
+diff -ur dahdi-linux-2.11.1/drivers/dahdi/wcte12xp/base.c dahdi-linux-2.11.1-4.11/drivers/dahdi/wcte12xp/base.c
+--- dahdi-linux-2.11.1/drivers/dahdi/wcte12xp/base.c 2016-03-01 23:03:59.000000000 +0100
++++ dahdi-linux-2.11.1-4.11/drivers/dahdi/wcte12xp/base.c 2017-05-09 20:40:31.216160114 +0200
+@@ -40,6 +40,10 @@
+ #include <linux/workqueue.h>
+ #include <linux/delay.h>
+ #include <linux/sched.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
++#include <linux/sched/signal.h>
++#endif
+ #include <linux/slab.h>
+
+ #include <stdbool.h>
+diff -ur dahdi-linux-2.11.1/drivers/dahdi/wcte43x-base.c dahdi-linux-2.11.1-4.11/drivers/dahdi/wcte43x-base.c
+--- dahdi-linux-2.11.1/drivers/dahdi/wcte43x-base.c 2016-03-01 23:03:59.000000000 +0100
++++ dahdi-linux-2.11.1-4.11/drivers/dahdi/wcte43x-base.c 2017-05-09 20:38:38.996830549 +0200
+@@ -33,6 +33,10 @@
+ #include <linux/workqueue.h>
+ #include <linux/delay.h>
+ #include <linux/sched.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
++#include <linux/sched/signal.h>
++#endif
+ #include <linux/crc32.h>
+ #include <linux/slab.h>
+
+diff -ur dahdi-linux-2.11.1/drivers/dahdi/xpp/xbus-core.c dahdi-linux-2.11.1-4.11/drivers/dahdi/xpp/xbus-core.c
+--- dahdi-linux-2.11.1/drivers/dahdi/xpp/xbus-core.c 2016-03-01 23:03:59.000000000 +0100
++++ dahdi-linux-2.11.1-4.11/drivers/dahdi/xpp/xbus-core.c 2017-05-09 20:41:27.973007253 +0200
+@@ -244,7 +244,11 @@
+ {
+ struct kref *kref = &xbus->kref;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)
+ return atomic_read(&kref->refcount);
++#else
++ return kref_read(kref);
++#endif
+ }
+
+ /*------------------------- Frame Handling ------------------------*/
+diff -ur dahdi-linux-2.11.1/drivers/dahdi/xpp/xbus-sysfs.c dahdi-linux-2.11.1-4.11/drivers/dahdi/xpp/xbus-sysfs.c
+--- dahdi-linux-2.11.1/drivers/dahdi/xpp/xbus-sysfs.c 2016-03-01 23:03:59.000000000 +0100
++++ dahdi-linux-2.11.1-4.11/drivers/dahdi/xpp/xbus-sysfs.c 2017-05-09 20:42:09.972886067 +0200
+@@ -974,7 +974,11 @@
+ return;
+ }
+ XBUS_DBG(DEVICES, xbus, "going to unregister: refcount=%d\n",
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)
+ atomic_read(&astribank->kobj.kref.refcount));
++#else
++ kref_read(&astribank->kobj.kref));
++#endif
+ BUG_ON(dev_get_drvdata(astribank) != xbus);
+ device_unregister(astribank);
+ dev_set_drvdata(astribank, NULL);
+diff -ur dahdi-linux-2.11.1/drivers/dahdi/xpp/xpp_dahdi.c dahdi-linux-2.11.1-4.11/drivers/dahdi/xpp/xpp_dahdi.c
+--- dahdi-linux-2.11.1/drivers/dahdi/xpp/xpp_dahdi.c 2016-03-01 23:03:59.000000000 +0100
++++ dahdi-linux-2.11.1-4.11/drivers/dahdi/xpp/xpp_dahdi.c 2017-05-09 20:42:55.336485638 +0200
+@@ -124,7 +124,11 @@
+ {
+ struct kref *kref = &xpd->kref;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0)
+ return atomic_read(&kref->refcount);
++#else
++ return kref_read(kref);
++#endif
+ }
+
+ xpd_t *get_xpd(const char *msg, xpd_t *xpd)