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

Subscribers

People subscribed via source and target branches

to all changes: