Merge ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:bug-1855825/address-interface-change-in-linux-skbuff.h/eoan into ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/eoan

Proposed by You-Sheng Yang
Status: Merged
Merged at revision: bbcd1bba27184188ef84b8b568d82742c6a2b076
Proposed branch: ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:bug-1855825/address-interface-change-in-linux-skbuff.h/eoan
Merge into: ~vicamo/ubuntu/+source/backport-iwlwifi-dkms/+git/backport-iwlwifi-dkms:ubuntu/eoan
Diff against target: 133 lines (+111/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch (+103/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
You-Sheng Yang Approve
Review via email: mp+376636@code.launchpad.net
To post a comment you must log in.
Revision history for this message
You-Sheng Yang (vicamo) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 565258d..577b3f0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
1backport-iwlwifi-dkms (7906-0ubuntu3) eoan; urgency=critical
2
3 * debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch
4 - Fix system hang on connecting to WiFi base station. (LP: #1855825)
5
6 -- You-Sheng Yang <vicamo.yang@canonical.com> Wed, 11 Dec 2019 16:20:39 +0800
7
1backport-iwlwifi-dkms (7906-0ubuntu2~19.10.1) eoan; urgency=low8backport-iwlwifi-dkms (7906-0ubuntu2~19.10.1) eoan; urgency=low
29
3 * debian/patches/0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch10 * debian/patches/0006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch
diff --git a/debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch b/debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch
4new file mode 10064411new file mode 100644
index 0000000..a3427d4
--- /dev/null
+++ b/debian/patches/0006-backport-address-interface-change-in-linux-skbuff.h-.patch
@@ -0,0 +1,103 @@
1From b13b11f8c71e4ca320a38185dbfba59bfc08e15e Mon Sep 17 00:00:00 2001
2From: You-Sheng Yang <vicamo.yang@canonical.com>
3Date: Tue, 10 Dec 2019 17:35:29 +0800
4Subject: [PATCH] backport: address interface change in linux/skbuff.h since
5 5.3.10
6
7Commit 9d0b402125a6 ("net/flow_dissector: switch to siphash") introduces
8interface changes for skb_get_hash_perturb() and struct
9fq_codel_sched_data. Since this DKMS package carries its own version of
10backported definitions of aforementioned data types, it results in
11abnormal behavior and in some cases it simply hang the whole system
12while connecting to WiFi base stations.
13
14This change synchronizes changed data types while maintaining the
15compatibility to previous releases.
16
17Closes: vicamo/backport-iwlwifi-dkms#7
18Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
19---
20 include/net/fq.h | 15 +++++++++++++++
21 include/net/fq_impl.h | 30 ++++++++++++++++++++++++++++++
22 2 files changed, 45 insertions(+)
23
24diff --git a/include/net/fq.h b/include/net/fq.h
25index ac944a686..76e4446be 100644
26--- a/include/net/fq.h
27+++ b/include/net/fq.h
28@@ -70,7 +70,22 @@ struct fq {
29 struct list_head backlogs;
30 spinlock_t lock;
31 u32 flows_cnt;
32+#if LINUX_VERSION_IS_GEQ(5,3,10) || \
33+ LINUX_VERSION_IN_RANGE(4,19,83,5,0,0) || \
34+ LINUX_VERSION_IN_RANGE(4,14,153,4,15,0) || \
35+ LINUX_VERSION_IN_RANGE(4,9,200,4,10,0) || \
36+ LINUX_VERSION_IN_RANGE(4,4,200,4,5,0) || \
37+ (UTS_UBUNTU_RELEASE_ABI && \
38+ (((LINUX_VERSION_CODE == KERNEL_VERSION(5,0,21)) && \
39+ (((UTS_UBUNTU_RELEASE_ABI >= 38) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
40+ (UTS_UBUNTU_RELEASE_ABI >= 1032))) || \
41+ ((LINUX_VERSION_CODE == KERNEL_VERSION(4,15,18)) && \
42+ (((UTS_UBUNTU_RELEASE_ABI >= 73) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
43+ (UTS_UBUNTU_RELEASE_ABI >= 1066)))))
44+ siphash_key_t perturbation;
45+#else
46 u32 perturbation;
47+#endif
48 u32 limit;
49 u32 memory_limit;
50 u32 memory_usage;
51diff --git a/include/net/fq_impl.h b/include/net/fq_impl.h
52index be7c0fab3..3d4e8f45b 100644
53--- a/include/net/fq_impl.h
54+++ b/include/net/fq_impl.h
55@@ -118,7 +118,22 @@ static struct fq_flow *fq_flow_classify(struct fq *fq,
56
57 lockdep_assert_held(&fq->lock);
58
59+#if LINUX_VERSION_IS_GEQ(5,3,10) || \
60+ LINUX_VERSION_IN_RANGE(4,19,83,5,0,0) || \
61+ LINUX_VERSION_IN_RANGE(4,14,153,4,15,0) || \
62+ LINUX_VERSION_IN_RANGE(4,9,200,4,10,0) || \
63+ LINUX_VERSION_IN_RANGE(4,4,200,4,5,0) || \
64+ (UTS_UBUNTU_RELEASE_ABI && \
65+ (((LINUX_VERSION_CODE == KERNEL_VERSION(5,0,21)) && \
66+ (((UTS_UBUNTU_RELEASE_ABI >= 38) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
67+ (UTS_UBUNTU_RELEASE_ABI >= 1032))) || \
68+ ((LINUX_VERSION_CODE == KERNEL_VERSION(4,15,18)) && \
69+ (((UTS_UBUNTU_RELEASE_ABI >= 73) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
70+ (UTS_UBUNTU_RELEASE_ABI >= 1066)))))
71+ hash = skb_get_hash_perturb(skb, &fq->perturbation);
72+#else
73 hash = skb_get_hash_perturb(skb, fq->perturbation);
74+#endif
75 idx = reciprocal_scale(hash, fq->flows_cnt);
76 flow = &fq->flows[idx];
77
78@@ -307,7 +322,22 @@ static int fq_init(struct fq *fq, int flows_cnt)
79 INIT_LIST_HEAD(&fq->backlogs);
80 spin_lock_init(&fq->lock);
81 fq->flows_cnt = max_t(u32, flows_cnt, 1);
82+#if LINUX_VERSION_IS_GEQ(5,3,10) || \
83+ LINUX_VERSION_IN_RANGE(4,19,83,5,0,0) || \
84+ LINUX_VERSION_IN_RANGE(4,14,153,4,15,0) || \
85+ LINUX_VERSION_IN_RANGE(4,9,200,4,10,0) || \
86+ LINUX_VERSION_IN_RANGE(4,4,200,4,5,0) || \
87+ (UTS_UBUNTU_RELEASE_ABI && \
88+ (((LINUX_VERSION_CODE == KERNEL_VERSION(5,0,21)) && \
89+ (((UTS_UBUNTU_RELEASE_ABI >= 38) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
90+ (UTS_UBUNTU_RELEASE_ABI >= 1032))) || \
91+ ((LINUX_VERSION_CODE == KERNEL_VERSION(4,15,18)) && \
92+ (((UTS_UBUNTU_RELEASE_ABI >= 73) && (UTS_UBUNTU_RELEASE_ABI < 1000)) || \
93+ (UTS_UBUNTU_RELEASE_ABI >= 1066)))))
94+ get_random_bytes(&fq->perturbation, sizeof(fq->perturbation));
95+#else
96 fq->perturbation = prandom_u32();
97+#endif
98 fq->quantum = 300;
99 fq->limit = 8192;
100 fq->memory_limit = 16 << 20; /* 16 MBytes */
101--
1022.24.0
103
diff --git a/debian/patches/series b/debian/patches/series
index c03ca2f..7d5bfad 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
40004-backport-fix-build-for-v5.2-kernel.patch40004-backport-fix-build-for-v5.2-kernel.patch
50005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch50005-Makefile.kernel-pass-fno-stack-clash-protection-and-.patch
60006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch60006-NOUPSTREAM-backport-rename-ktime_get_boot_ns-for-v5..patch
70006-backport-address-interface-change-in-linux-skbuff.h-.patch

Subscribers

People subscribed via source and target branches

to all changes: