1 |
commit: c4181dc6ce2cfbd67ab78a5e9e23474e0a2e5c71 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 5 17:05:05 2020 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 5 17:05:05 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=c4181dc6 |
7 |
|
8 |
Linuxpatch 4.19.102 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1101_linux-4.19.102.patch | 2428 +++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 2432 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 2399ee7..0d9cae4 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -443,6 +443,10 @@ Patch: 1100_linux-4.19.101.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 4.19.101 |
23 |
|
24 |
+Patch: 1101_linux-4.19.102.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 4.19.102 |
27 |
+ |
28 |
Patch: 1500_XATTR_USER_PREFIX.patch |
29 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
30 |
Desc: Support for namespace user.pax.* on tmpfs. |
31 |
|
32 |
diff --git a/1101_linux-4.19.102.patch b/1101_linux-4.19.102.patch |
33 |
new file mode 100644 |
34 |
index 0000000..ade97ea |
35 |
--- /dev/null |
36 |
+++ b/1101_linux-4.19.102.patch |
37 |
@@ -0,0 +1,2428 @@ |
38 |
+diff --git a/Documentation/ABI/testing/sysfs-class-devfreq b/Documentation/ABI/testing/sysfs-class-devfreq |
39 |
+index ee39acacf6f8..335595a79866 100644 |
40 |
+--- a/Documentation/ABI/testing/sysfs-class-devfreq |
41 |
++++ b/Documentation/ABI/testing/sysfs-class-devfreq |
42 |
+@@ -7,6 +7,13 @@ Description: |
43 |
+ The name of devfreq object denoted as ... is same as the |
44 |
+ name of device using devfreq. |
45 |
+ |
46 |
++What: /sys/class/devfreq/.../name |
47 |
++Date: November 2019 |
48 |
++Contact: Chanwoo Choi <cw00.choi@×××××××.com> |
49 |
++Description: |
50 |
++ The /sys/class/devfreq/.../name shows the name of device |
51 |
++ of the corresponding devfreq object. |
52 |
++ |
53 |
+ What: /sys/class/devfreq/.../governor |
54 |
+ Date: September 2011 |
55 |
+ Contact: MyungJoo Ham <myungjoo.ham@×××××××.com> |
56 |
+diff --git a/Makefile b/Makefile |
57 |
+index ca186bcc02ba..597a14e2127b 100644 |
58 |
+--- a/Makefile |
59 |
++++ b/Makefile |
60 |
+@@ -1,7 +1,7 @@ |
61 |
+ # SPDX-License-Identifier: GPL-2.0 |
62 |
+ VERSION = 4 |
63 |
+ PATCHLEVEL = 19 |
64 |
+-SUBLEVEL = 101 |
65 |
++SUBLEVEL = 102 |
66 |
+ EXTRAVERSION = |
67 |
+ NAME = "People's Front" |
68 |
+ |
69 |
+diff --git a/arch/arm/boot/dts/am335x-boneblack-common.dtsi b/arch/arm/boot/dts/am335x-boneblack-common.dtsi |
70 |
+index 21bc1173fa6b..cb4267edde63 100644 |
71 |
+--- a/arch/arm/boot/dts/am335x-boneblack-common.dtsi |
72 |
++++ b/arch/arm/boot/dts/am335x-boneblack-common.dtsi |
73 |
+@@ -131,6 +131,11 @@ |
74 |
+ }; |
75 |
+ |
76 |
+ / { |
77 |
++ memory@80000000 { |
78 |
++ device_type = "memory"; |
79 |
++ reg = <0x80000000 0x20000000>; /* 512 MB */ |
80 |
++ }; |
81 |
++ |
82 |
+ clk_mcasp0_fixed: clk_mcasp0_fixed { |
83 |
+ #clock-cells = <0>; |
84 |
+ compatible = "fixed-clock"; |
85 |
+diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts |
86 |
+index 12735cf9674b..b6950eee550b 100644 |
87 |
+--- a/arch/arm/boot/dts/am43x-epos-evm.dts |
88 |
++++ b/arch/arm/boot/dts/am43x-epos-evm.dts |
89 |
+@@ -839,6 +839,7 @@ |
90 |
+ pinctrl-names = "default", "sleep"; |
91 |
+ pinctrl-0 = <&spi0_pins_default>; |
92 |
+ pinctrl-1 = <&spi0_pins_sleep>; |
93 |
++ ti,pindir-d0-out-d1-in = <1>; |
94 |
+ }; |
95 |
+ |
96 |
+ &spi1 { |
97 |
+@@ -846,6 +847,7 @@ |
98 |
+ pinctrl-names = "default", "sleep"; |
99 |
+ pinctrl-0 = <&spi1_pins_default>; |
100 |
+ pinctrl-1 = <&spi1_pins_sleep>; |
101 |
++ ti,pindir-d0-out-d1-in = <1>; |
102 |
+ }; |
103 |
+ |
104 |
+ &usb2_phy1 { |
105 |
+diff --git a/arch/arm/boot/dts/am571x-idk.dts b/arch/arm/boot/dts/am571x-idk.dts |
106 |
+index bf4163eb6b2a..510f61d20b6d 100644 |
107 |
+--- a/arch/arm/boot/dts/am571x-idk.dts |
108 |
++++ b/arch/arm/boot/dts/am571x-idk.dts |
109 |
+@@ -93,10 +93,6 @@ |
110 |
+ gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>; |
111 |
+ }; |
112 |
+ |
113 |
+-&pcie1_ep { |
114 |
+- gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; |
115 |
+-}; |
116 |
+- |
117 |
+ &mmc1 { |
118 |
+ pinctrl-names = "default", "hs"; |
119 |
+ pinctrl-0 = <&mmc1_pins_default_no_clk_pu>; |
120 |
+diff --git a/arch/arm/boot/dts/am572x-idk-common.dtsi b/arch/arm/boot/dts/am572x-idk-common.dtsi |
121 |
+index 784639ddf451..8a7d34c8ae11 100644 |
122 |
+--- a/arch/arm/boot/dts/am572x-idk-common.dtsi |
123 |
++++ b/arch/arm/boot/dts/am572x-idk-common.dtsi |
124 |
+@@ -71,10 +71,6 @@ |
125 |
+ gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; |
126 |
+ }; |
127 |
+ |
128 |
+-&pcie1_ep { |
129 |
+- gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; |
130 |
+-}; |
131 |
+- |
132 |
+ &mailbox5 { |
133 |
+ status = "okay"; |
134 |
+ mbox_ipu1_ipc3x: mbox_ipu1_ipc3x { |
135 |
+diff --git a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi |
136 |
+index d53532b47947..0051b2e05c2d 100644 |
137 |
+--- a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi |
138 |
++++ b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi |
139 |
+@@ -32,6 +32,27 @@ |
140 |
+ reg = <0x0 0x80000000 0x0 0x80000000>; |
141 |
+ }; |
142 |
+ |
143 |
++ main_12v0: fixedregulator-main_12v0 { |
144 |
++ /* main supply */ |
145 |
++ compatible = "regulator-fixed"; |
146 |
++ regulator-name = "main_12v0"; |
147 |
++ regulator-min-microvolt = <12000000>; |
148 |
++ regulator-max-microvolt = <12000000>; |
149 |
++ regulator-always-on; |
150 |
++ regulator-boot-on; |
151 |
++ }; |
152 |
++ |
153 |
++ evm_5v0: fixedregulator-evm_5v0 { |
154 |
++ /* Output of TPS54531D */ |
155 |
++ compatible = "regulator-fixed"; |
156 |
++ regulator-name = "evm_5v0"; |
157 |
++ regulator-min-microvolt = <5000000>; |
158 |
++ regulator-max-microvolt = <5000000>; |
159 |
++ vin-supply = <&main_12v0>; |
160 |
++ regulator-always-on; |
161 |
++ regulator-boot-on; |
162 |
++ }; |
163 |
++ |
164 |
+ vdd_3v3: fixedregulator-vdd_3v3 { |
165 |
+ compatible = "regulator-fixed"; |
166 |
+ regulator-name = "vdd_3v3"; |
167 |
+@@ -550,10 +571,6 @@ |
168 |
+ gpios = <&gpio2 8 GPIO_ACTIVE_LOW>; |
169 |
+ }; |
170 |
+ |
171 |
+-&pcie1_ep { |
172 |
+- gpios = <&gpio2 8 GPIO_ACTIVE_LOW>; |
173 |
+-}; |
174 |
+- |
175 |
+ &mcasp3 { |
176 |
+ #sound-dai-cells = <0>; |
177 |
+ assigned-clocks = <&l4per_clkctrl DRA7_MCASP3_CLKCTRL 24>; |
178 |
+diff --git a/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts b/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts |
179 |
+index e5f0645e53a7..7e74ba83f809 100644 |
180 |
+--- a/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts |
181 |
++++ b/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts |
182 |
+@@ -90,7 +90,7 @@ |
183 |
+ initial-mode = <1>; /* initialize in HUB mode */ |
184 |
+ disabled-ports = <1>; |
185 |
+ intn-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */ |
186 |
+- reset-gpios = <&pio 4 16 GPIO_ACTIVE_HIGH>; /* PE16 */ |
187 |
++ reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */ |
188 |
+ connect-gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */ |
189 |
+ refclk-frequency = <19200000>; |
190 |
+ }; |
191 |
+diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S |
192 |
+index 82a942894fc0..83e463c05dcd 100644 |
193 |
+--- a/arch/arm/kernel/hyp-stub.S |
194 |
++++ b/arch/arm/kernel/hyp-stub.S |
195 |
+@@ -159,10 +159,9 @@ ARM_BE8(orr r7, r7, #(1 << 25)) @ HSCTLR.EE |
196 |
+ #if !defined(ZIMAGE) && defined(CONFIG_ARM_ARCH_TIMER) |
197 |
+ @ make CNTP_* and CNTPCT accessible from PL1 |
198 |
+ mrc p15, 0, r7, c0, c1, 1 @ ID_PFR1 |
199 |
+- lsr r7, #16 |
200 |
+- and r7, #0xf |
201 |
+- cmp r7, #1 |
202 |
+- bne 1f |
203 |
++ ubfx r7, r7, #16, #4 |
204 |
++ teq r7, #0 |
205 |
++ beq 1f |
206 |
+ mrc p15, 4, r7, c14, c1, 0 @ CNTHCTL |
207 |
+ orr r7, r7, #3 @ PL1PCEN | PL1PCTEN |
208 |
+ mcr p15, 4, r7, c14, c1, 0 @ CNTHCTL |
209 |
+diff --git a/arch/arm64/boot/Makefile b/arch/arm64/boot/Makefile |
210 |
+index 1f012c506434..cd3414898d10 100644 |
211 |
+--- a/arch/arm64/boot/Makefile |
212 |
++++ b/arch/arm64/boot/Makefile |
213 |
+@@ -16,7 +16,7 @@ |
214 |
+ |
215 |
+ OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S |
216 |
+ |
217 |
+-targets := Image Image.gz |
218 |
++targets := Image Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo |
219 |
+ |
220 |
+ $(obj)/Image: vmlinux FORCE |
221 |
+ $(call if_changed,objcopy) |
222 |
+diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c |
223 |
+index a1a5e4c59e6b..4d5ad9cb0f69 100644 |
224 |
+--- a/arch/parisc/kernel/drivers.c |
225 |
++++ b/arch/parisc/kernel/drivers.c |
226 |
+@@ -868,8 +868,8 @@ static void print_parisc_device(struct parisc_device *dev) |
227 |
+ static int count; |
228 |
+ |
229 |
+ print_pa_hwpath(dev, hw_path); |
230 |
+- pr_info("%d. %s at 0x%px [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", |
231 |
+- ++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type, |
232 |
++ pr_info("%d. %s at %pap [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", |
233 |
++ ++count, dev->name, &(dev->hpa.start), hw_path, dev->id.hw_type, |
234 |
+ dev->id.hversion_rev, dev->id.hversion, dev->id.sversion); |
235 |
+ |
236 |
+ if (dev->num_addrs) { |
237 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi |
238 |
+index e1a961f05dcd..baa0c503e741 100644 |
239 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi |
240 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi |
241 |
+@@ -63,6 +63,7 @@ fman@400000 { |
242 |
+ #size-cells = <0>; |
243 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
244 |
+ reg = <0xe1000 0x1000>; |
245 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
246 |
+ |
247 |
+ pcsphy0: ethernet-phy@0 { |
248 |
+ reg = <0x0>; |
249 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi |
250 |
+index c288f3c6c637..93095600e808 100644 |
251 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi |
252 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi |
253 |
+@@ -60,6 +60,7 @@ fman@400000 { |
254 |
+ #size-cells = <0>; |
255 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
256 |
+ reg = <0xf1000 0x1000>; |
257 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
258 |
+ |
259 |
+ pcsphy6: ethernet-phy@0 { |
260 |
+ reg = <0x0>; |
261 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi |
262 |
+index 94f3e7175012..ff4bd38f0645 100644 |
263 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi |
264 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi |
265 |
+@@ -63,6 +63,7 @@ fman@400000 { |
266 |
+ #size-cells = <0>; |
267 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
268 |
+ reg = <0xe3000 0x1000>; |
269 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
270 |
+ |
271 |
+ pcsphy1: ethernet-phy@0 { |
272 |
+ reg = <0x0>; |
273 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi |
274 |
+index 94a76982d214..1fa38ed6f59e 100644 |
275 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi |
276 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi |
277 |
+@@ -60,6 +60,7 @@ fman@400000 { |
278 |
+ #size-cells = <0>; |
279 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
280 |
+ reg = <0xf3000 0x1000>; |
281 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
282 |
+ |
283 |
+ pcsphy7: ethernet-phy@0 { |
284 |
+ reg = <0x0>; |
285 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi |
286 |
+index b5ff5f71c6b8..a8cc9780c0c4 100644 |
287 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi |
288 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi |
289 |
+@@ -59,6 +59,7 @@ fman@400000 { |
290 |
+ #size-cells = <0>; |
291 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
292 |
+ reg = <0xe1000 0x1000>; |
293 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
294 |
+ |
295 |
+ pcsphy0: ethernet-phy@0 { |
296 |
+ reg = <0x0>; |
297 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi |
298 |
+index ee44182c6348..8b8bd70c9382 100644 |
299 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi |
300 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi |
301 |
+@@ -59,6 +59,7 @@ fman@400000 { |
302 |
+ #size-cells = <0>; |
303 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
304 |
+ reg = <0xe3000 0x1000>; |
305 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
306 |
+ |
307 |
+ pcsphy1: ethernet-phy@0 { |
308 |
+ reg = <0x0>; |
309 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi |
310 |
+index f05f0d775039..619c880b54d8 100644 |
311 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi |
312 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi |
313 |
+@@ -59,6 +59,7 @@ fman@400000 { |
314 |
+ #size-cells = <0>; |
315 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
316 |
+ reg = <0xe5000 0x1000>; |
317 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
318 |
+ |
319 |
+ pcsphy2: ethernet-phy@0 { |
320 |
+ reg = <0x0>; |
321 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi |
322 |
+index a9114ec51075..d7ebb73a400d 100644 |
323 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi |
324 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi |
325 |
+@@ -59,6 +59,7 @@ fman@400000 { |
326 |
+ #size-cells = <0>; |
327 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
328 |
+ reg = <0xe7000 0x1000>; |
329 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
330 |
+ |
331 |
+ pcsphy3: ethernet-phy@0 { |
332 |
+ reg = <0x0>; |
333 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi |
334 |
+index 44dd00ac7367..b151d696a069 100644 |
335 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi |
336 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi |
337 |
+@@ -59,6 +59,7 @@ fman@400000 { |
338 |
+ #size-cells = <0>; |
339 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
340 |
+ reg = <0xe9000 0x1000>; |
341 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
342 |
+ |
343 |
+ pcsphy4: ethernet-phy@0 { |
344 |
+ reg = <0x0>; |
345 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi |
346 |
+index 5b1b84b58602..adc0ae0013a3 100644 |
347 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi |
348 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi |
349 |
+@@ -59,6 +59,7 @@ fman@400000 { |
350 |
+ #size-cells = <0>; |
351 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
352 |
+ reg = <0xeb000 0x1000>; |
353 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
354 |
+ |
355 |
+ pcsphy5: ethernet-phy@0 { |
356 |
+ reg = <0x0>; |
357 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi |
358 |
+index 0e1daaef9e74..435047e0e250 100644 |
359 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi |
360 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi |
361 |
+@@ -60,6 +60,7 @@ fman@500000 { |
362 |
+ #size-cells = <0>; |
363 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
364 |
+ reg = <0xf1000 0x1000>; |
365 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
366 |
+ |
367 |
+ pcsphy14: ethernet-phy@0 { |
368 |
+ reg = <0x0>; |
369 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi |
370 |
+index 68c5ef779266..c098657cca0a 100644 |
371 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi |
372 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi |
373 |
+@@ -60,6 +60,7 @@ fman@500000 { |
374 |
+ #size-cells = <0>; |
375 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
376 |
+ reg = <0xf3000 0x1000>; |
377 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
378 |
+ |
379 |
+ pcsphy15: ethernet-phy@0 { |
380 |
+ reg = <0x0>; |
381 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi |
382 |
+index 605363cc1117..9d06824815f3 100644 |
383 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi |
384 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi |
385 |
+@@ -59,6 +59,7 @@ fman@500000 { |
386 |
+ #size-cells = <0>; |
387 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
388 |
+ reg = <0xe1000 0x1000>; |
389 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
390 |
+ |
391 |
+ pcsphy8: ethernet-phy@0 { |
392 |
+ reg = <0x0>; |
393 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi |
394 |
+index 1955dfa13634..70e947730c4b 100644 |
395 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi |
396 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi |
397 |
+@@ -59,6 +59,7 @@ fman@500000 { |
398 |
+ #size-cells = <0>; |
399 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
400 |
+ reg = <0xe3000 0x1000>; |
401 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
402 |
+ |
403 |
+ pcsphy9: ethernet-phy@0 { |
404 |
+ reg = <0x0>; |
405 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi |
406 |
+index 2c1476454ee0..ad96e6529595 100644 |
407 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi |
408 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi |
409 |
+@@ -59,6 +59,7 @@ fman@500000 { |
410 |
+ #size-cells = <0>; |
411 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
412 |
+ reg = <0xe5000 0x1000>; |
413 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
414 |
+ |
415 |
+ pcsphy10: ethernet-phy@0 { |
416 |
+ reg = <0x0>; |
417 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi |
418 |
+index b8b541ff5fb0..034bc4b71f7a 100644 |
419 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi |
420 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi |
421 |
+@@ -59,6 +59,7 @@ fman@500000 { |
422 |
+ #size-cells = <0>; |
423 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
424 |
+ reg = <0xe7000 0x1000>; |
425 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
426 |
+ |
427 |
+ pcsphy11: ethernet-phy@0 { |
428 |
+ reg = <0x0>; |
429 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi |
430 |
+index 4b2cfddd1b15..93ca23d82b39 100644 |
431 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi |
432 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi |
433 |
+@@ -59,6 +59,7 @@ fman@500000 { |
434 |
+ #size-cells = <0>; |
435 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
436 |
+ reg = <0xe9000 0x1000>; |
437 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
438 |
+ |
439 |
+ pcsphy12: ethernet-phy@0 { |
440 |
+ reg = <0x0>; |
441 |
+diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi |
442 |
+index 0a52ddf7cc17..23b3117a2fd2 100644 |
443 |
+--- a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi |
444 |
++++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi |
445 |
+@@ -59,6 +59,7 @@ fman@500000 { |
446 |
+ #size-cells = <0>; |
447 |
+ compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio"; |
448 |
+ reg = <0xeb000 0x1000>; |
449 |
++ fsl,erratum-a011043; /* must ignore read errors */ |
450 |
+ |
451 |
+ pcsphy13: ethernet-phy@0 { |
452 |
+ reg = <0x0>; |
453 |
+diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile |
454 |
+index eed1c137f618..87f71a6cd3ef 100644 |
455 |
+--- a/arch/riscv/kernel/vdso/Makefile |
456 |
++++ b/arch/riscv/kernel/vdso/Makefile |
457 |
+@@ -55,7 +55,8 @@ quiet_cmd_vdsold = VDSOLD $@ |
458 |
+ cmd_vdsold = $(CC) $(KBUILD_CFLAGS) $(call cc-option, -no-pie) -nostdlib -nostartfiles $(SYSCFLAGS_$(@F)) \ |
459 |
+ -Wl,-T,$(filter-out FORCE,$^) -o $@.tmp && \ |
460 |
+ $(CROSS_COMPILE)objcopy \ |
461 |
+- $(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@ |
462 |
++ $(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@ && \ |
463 |
++ rm $@.tmp |
464 |
+ |
465 |
+ # install commands for the unstripped file |
466 |
+ quiet_cmd_vdso_install = INSTALL $@ |
467 |
+diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c |
468 |
+index 841a0246eb89..11c5accfa4db 100644 |
469 |
+--- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c |
470 |
++++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c |
471 |
+@@ -2005,7 +2005,7 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type, |
472 |
+ |
473 |
+ if (rdt_mon_capable) { |
474 |
+ ret = mongroup_create_dir(rdtgroup_default.kn, |
475 |
+- NULL, "mon_groups", |
476 |
++ &rdtgroup_default, "mon_groups", |
477 |
+ &kn_mongrp); |
478 |
+ if (ret) { |
479 |
+ dentry = ERR_PTR(ret); |
480 |
+@@ -2167,7 +2167,11 @@ static void free_all_child_rdtgrp(struct rdtgroup *rdtgrp) |
481 |
+ list_for_each_entry_safe(sentry, stmp, head, mon.crdtgrp_list) { |
482 |
+ free_rmid(sentry->mon.rmid); |
483 |
+ list_del(&sentry->mon.crdtgrp_list); |
484 |
+- kfree(sentry); |
485 |
++ |
486 |
++ if (atomic_read(&sentry->waitcount) != 0) |
487 |
++ sentry->flags = RDT_DELETED; |
488 |
++ else |
489 |
++ kfree(sentry); |
490 |
+ } |
491 |
+ } |
492 |
+ |
493 |
+@@ -2205,7 +2209,11 @@ static void rmdir_all_sub(void) |
494 |
+ |
495 |
+ kernfs_remove(rdtgrp->kn); |
496 |
+ list_del(&rdtgrp->rdtgroup_list); |
497 |
+- kfree(rdtgrp); |
498 |
++ |
499 |
++ if (atomic_read(&rdtgrp->waitcount) != 0) |
500 |
++ rdtgrp->flags = RDT_DELETED; |
501 |
++ else |
502 |
++ kfree(rdtgrp); |
503 |
+ } |
504 |
+ /* Notify online CPUs to update per cpu storage and PQR_ASSOC MSR */ |
505 |
+ update_closid_rmid(cpu_online_mask, &rdtgroup_default); |
506 |
+@@ -2407,7 +2415,7 @@ static int mkdir_mondata_all(struct kernfs_node *parent_kn, |
507 |
+ /* |
508 |
+ * Create the mon_data directory first. |
509 |
+ */ |
510 |
+- ret = mongroup_create_dir(parent_kn, NULL, "mon_data", &kn); |
511 |
++ ret = mongroup_create_dir(parent_kn, prgrp, "mon_data", &kn); |
512 |
+ if (ret) |
513 |
+ return ret; |
514 |
+ |
515 |
+@@ -2560,7 +2568,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn, |
516 |
+ uint files = 0; |
517 |
+ int ret; |
518 |
+ |
519 |
+- prdtgrp = rdtgroup_kn_lock_live(prgrp_kn); |
520 |
++ prdtgrp = rdtgroup_kn_lock_live(parent_kn); |
521 |
+ rdt_last_cmd_clear(); |
522 |
+ if (!prdtgrp) { |
523 |
+ ret = -ENODEV; |
524 |
+@@ -2635,7 +2643,7 @@ static int mkdir_rdt_prepare(struct kernfs_node *parent_kn, |
525 |
+ kernfs_activate(kn); |
526 |
+ |
527 |
+ /* |
528 |
+- * The caller unlocks the prgrp_kn upon success. |
529 |
++ * The caller unlocks the parent_kn upon success. |
530 |
+ */ |
531 |
+ return 0; |
532 |
+ |
533 |
+@@ -2646,7 +2654,7 @@ out_destroy: |
534 |
+ out_free_rgrp: |
535 |
+ kfree(rdtgrp); |
536 |
+ out_unlock: |
537 |
+- rdtgroup_kn_unlock(prgrp_kn); |
538 |
++ rdtgroup_kn_unlock(parent_kn); |
539 |
+ return ret; |
540 |
+ } |
541 |
+ |
542 |
+@@ -2684,7 +2692,7 @@ static int rdtgroup_mkdir_mon(struct kernfs_node *parent_kn, |
543 |
+ */ |
544 |
+ list_add_tail(&rdtgrp->mon.crdtgrp_list, &prgrp->mon.crdtgrp_list); |
545 |
+ |
546 |
+- rdtgroup_kn_unlock(prgrp_kn); |
547 |
++ rdtgroup_kn_unlock(parent_kn); |
548 |
+ return ret; |
549 |
+ } |
550 |
+ |
551 |
+@@ -2727,7 +2735,7 @@ static int rdtgroup_mkdir_ctrl_mon(struct kernfs_node *parent_kn, |
552 |
+ * Create an empty mon_groups directory to hold the subset |
553 |
+ * of tasks and cpus to monitor. |
554 |
+ */ |
555 |
+- ret = mongroup_create_dir(kn, NULL, "mon_groups", NULL); |
556 |
++ ret = mongroup_create_dir(kn, rdtgrp, "mon_groups", NULL); |
557 |
+ if (ret) { |
558 |
+ rdt_last_cmd_puts("kernfs subdir error\n"); |
559 |
+ goto out_del_list; |
560 |
+@@ -2743,7 +2751,7 @@ out_id_free: |
561 |
+ out_common_fail: |
562 |
+ mkdir_rdt_prepare_clean(rdtgrp); |
563 |
+ out_unlock: |
564 |
+- rdtgroup_kn_unlock(prgrp_kn); |
565 |
++ rdtgroup_kn_unlock(parent_kn); |
566 |
+ return ret; |
567 |
+ } |
568 |
+ |
569 |
+@@ -2869,13 +2877,13 @@ static int rdtgroup_rmdir_ctrl(struct kernfs_node *kn, struct rdtgroup *rdtgrp, |
570 |
+ closid_free(rdtgrp->closid); |
571 |
+ free_rmid(rdtgrp->mon.rmid); |
572 |
+ |
573 |
++ rdtgroup_ctrl_remove(kn, rdtgrp); |
574 |
++ |
575 |
+ /* |
576 |
+ * Free all the child monitor group rmids. |
577 |
+ */ |
578 |
+ free_all_child_rdtgrp(rdtgrp); |
579 |
+ |
580 |
+- rdtgroup_ctrl_remove(kn, rdtgrp); |
581 |
+- |
582 |
+ return 0; |
583 |
+ } |
584 |
+ |
585 |
+diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c |
586 |
+index a5718c0a3dc4..1348541da463 100644 |
587 |
+--- a/crypto/pcrypt.c |
588 |
++++ b/crypto/pcrypt.c |
589 |
+@@ -505,11 +505,12 @@ err: |
590 |
+ |
591 |
+ static void __exit pcrypt_exit(void) |
592 |
+ { |
593 |
++ crypto_unregister_template(&pcrypt_tmpl); |
594 |
++ |
595 |
+ pcrypt_fini_padata(&pencrypt); |
596 |
+ pcrypt_fini_padata(&pdecrypt); |
597 |
+ |
598 |
+ kset_unregister(pcrypt_kset); |
599 |
+- crypto_unregister_template(&pcrypt_tmpl); |
600 |
+ } |
601 |
+ |
602 |
+ module_init(pcrypt_init); |
603 |
+diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c |
604 |
+index 67549ce88cc9..774748497ace 100644 |
605 |
+--- a/drivers/char/ttyprintk.c |
606 |
++++ b/drivers/char/ttyprintk.c |
607 |
+@@ -18,10 +18,11 @@ |
608 |
+ #include <linux/serial.h> |
609 |
+ #include <linux/tty.h> |
610 |
+ #include <linux/module.h> |
611 |
++#include <linux/spinlock.h> |
612 |
+ |
613 |
+ struct ttyprintk_port { |
614 |
+ struct tty_port port; |
615 |
+- struct mutex port_write_mutex; |
616 |
++ spinlock_t spinlock; |
617 |
+ }; |
618 |
+ |
619 |
+ static struct ttyprintk_port tpk_port; |
620 |
+@@ -100,11 +101,12 @@ static int tpk_open(struct tty_struct *tty, struct file *filp) |
621 |
+ static void tpk_close(struct tty_struct *tty, struct file *filp) |
622 |
+ { |
623 |
+ struct ttyprintk_port *tpkp = tty->driver_data; |
624 |
++ unsigned long flags; |
625 |
+ |
626 |
+- mutex_lock(&tpkp->port_write_mutex); |
627 |
++ spin_lock_irqsave(&tpkp->spinlock, flags); |
628 |
+ /* flush tpk_printk buffer */ |
629 |
+ tpk_printk(NULL, 0); |
630 |
+- mutex_unlock(&tpkp->port_write_mutex); |
631 |
++ spin_unlock_irqrestore(&tpkp->spinlock, flags); |
632 |
+ |
633 |
+ tty_port_close(&tpkp->port, tty, filp); |
634 |
+ } |
635 |
+@@ -116,13 +118,14 @@ static int tpk_write(struct tty_struct *tty, |
636 |
+ const unsigned char *buf, int count) |
637 |
+ { |
638 |
+ struct ttyprintk_port *tpkp = tty->driver_data; |
639 |
++ unsigned long flags; |
640 |
+ int ret; |
641 |
+ |
642 |
+ |
643 |
+ /* exclusive use of tpk_printk within this tty */ |
644 |
+- mutex_lock(&tpkp->port_write_mutex); |
645 |
++ spin_lock_irqsave(&tpkp->spinlock, flags); |
646 |
+ ret = tpk_printk(buf, count); |
647 |
+- mutex_unlock(&tpkp->port_write_mutex); |
648 |
++ spin_unlock_irqrestore(&tpkp->spinlock, flags); |
649 |
+ |
650 |
+ return ret; |
651 |
+ } |
652 |
+@@ -172,7 +175,7 @@ static int __init ttyprintk_init(void) |
653 |
+ { |
654 |
+ int ret = -ENOMEM; |
655 |
+ |
656 |
+- mutex_init(&tpk_port.port_write_mutex); |
657 |
++ spin_lock_init(&tpk_port.spinlock); |
658 |
+ |
659 |
+ ttyprintk_driver = tty_alloc_driver(1, |
660 |
+ TTY_DRIVER_RESET_TERMIOS | |
661 |
+diff --git a/drivers/clk/mmp/clk-of-mmp2.c b/drivers/clk/mmp/clk-of-mmp2.c |
662 |
+index d083b860f083..10689d8cd386 100644 |
663 |
+--- a/drivers/clk/mmp/clk-of-mmp2.c |
664 |
++++ b/drivers/clk/mmp/clk-of-mmp2.c |
665 |
+@@ -134,7 +134,7 @@ static DEFINE_SPINLOCK(ssp3_lock); |
666 |
+ static const char *ssp_parent_names[] = {"vctcxo_4", "vctcxo_2", "vctcxo", "pll1_16"}; |
667 |
+ |
668 |
+ static DEFINE_SPINLOCK(timer_lock); |
669 |
+-static const char *timer_parent_names[] = {"clk32", "vctcxo_2", "vctcxo_4", "vctcxo"}; |
670 |
++static const char *timer_parent_names[] = {"clk32", "vctcxo_4", "vctcxo_2", "vctcxo"}; |
671 |
+ |
672 |
+ static DEFINE_SPINLOCK(reset_lock); |
673 |
+ |
674 |
+diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c b/drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c |
675 |
+index 8d05d4f1f8a1..28b84c701a7d 100644 |
676 |
+--- a/drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c |
677 |
++++ b/drivers/clk/sunxi-ng/ccu-sun50i-h6-r.c |
678 |
+@@ -23,9 +23,9 @@ |
679 |
+ */ |
680 |
+ |
681 |
+ static const char * const ar100_r_apb2_parents[] = { "osc24M", "osc32k", |
682 |
+- "pll-periph0", "iosc" }; |
683 |
++ "iosc", "pll-periph0" }; |
684 |
+ static const struct ccu_mux_var_prediv ar100_r_apb2_predivs[] = { |
685 |
+- { .index = 2, .shift = 0, .width = 5 }, |
686 |
++ { .index = 3, .shift = 0, .width = 5 }, |
687 |
+ }; |
688 |
+ |
689 |
+ static struct ccu_div ar100_clk = { |
690 |
+diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c |
691 |
+index 1229bfb3180e..8122d0e0d4c4 100644 |
692 |
+--- a/drivers/devfreq/devfreq.c |
693 |
++++ b/drivers/devfreq/devfreq.c |
694 |
+@@ -1014,6 +1014,14 @@ err_out: |
695 |
+ } |
696 |
+ EXPORT_SYMBOL(devfreq_remove_governor); |
697 |
+ |
698 |
++static ssize_t name_show(struct device *dev, |
699 |
++ struct device_attribute *attr, char *buf) |
700 |
++{ |
701 |
++ struct devfreq *devfreq = to_devfreq(dev); |
702 |
++ return sprintf(buf, "%s\n", dev_name(devfreq->dev.parent)); |
703 |
++} |
704 |
++static DEVICE_ATTR_RO(name); |
705 |
++ |
706 |
+ static ssize_t governor_show(struct device *dev, |
707 |
+ struct device_attribute *attr, char *buf) |
708 |
+ { |
709 |
+@@ -1330,6 +1338,7 @@ static ssize_t trans_stat_show(struct device *dev, |
710 |
+ static DEVICE_ATTR_RO(trans_stat); |
711 |
+ |
712 |
+ static struct attribute *devfreq_attrs[] = { |
713 |
++ &dev_attr_name.attr, |
714 |
+ &dev_attr_governor.attr, |
715 |
+ &dev_attr_available_governors.attr, |
716 |
+ &dev_attr_cur_freq.attr, |
717 |
+diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c |
718 |
+index ae7540b765e1..aa12fd266389 100644 |
719 |
+--- a/drivers/media/radio/si470x/radio-si470x-i2c.c |
720 |
++++ b/drivers/media/radio/si470x/radio-si470x-i2c.c |
721 |
+@@ -483,10 +483,10 @@ static int si470x_i2c_remove(struct i2c_client *client) |
722 |
+ |
723 |
+ free_irq(client->irq, radio); |
724 |
+ video_unregister_device(&radio->videodev); |
725 |
+- kfree(radio); |
726 |
+ |
727 |
+ v4l2_ctrl_handler_free(&radio->hdl); |
728 |
+ v4l2_device_unregister(&radio->v4l2_dev); |
729 |
++ kfree(radio); |
730 |
+ return 0; |
731 |
+ } |
732 |
+ |
733 |
+diff --git a/drivers/media/usb/dvb-usb/af9005.c b/drivers/media/usb/dvb-usb/af9005.c |
734 |
+index 25871979123f..d2737460c9d3 100644 |
735 |
+--- a/drivers/media/usb/dvb-usb/af9005.c |
736 |
++++ b/drivers/media/usb/dvb-usb/af9005.c |
737 |
+@@ -563,7 +563,7 @@ static int af9005_boot_packet(struct usb_device *udev, int type, u8 *reply, |
738 |
+ u8 *buf, int size) |
739 |
+ { |
740 |
+ u16 checksum; |
741 |
+- int act_len, i, ret; |
742 |
++ int act_len = 0, i, ret; |
743 |
+ |
744 |
+ memset(buf, 0, size); |
745 |
+ buf[0] = (u8) (FW_BULKOUT_SIZE & 0xff); |
746 |
+diff --git a/drivers/media/usb/dvb-usb/digitv.c b/drivers/media/usb/dvb-usb/digitv.c |
747 |
+index 49b9d63e5885..e66df4fd1a29 100644 |
748 |
+--- a/drivers/media/usb/dvb-usb/digitv.c |
749 |
++++ b/drivers/media/usb/dvb-usb/digitv.c |
750 |
+@@ -233,18 +233,22 @@ static struct rc_map_table rc_map_digitv_table[] = { |
751 |
+ |
752 |
+ static int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state) |
753 |
+ { |
754 |
+- int i; |
755 |
++ int ret, i; |
756 |
+ u8 key[5]; |
757 |
+ u8 b[4] = { 0 }; |
758 |
+ |
759 |
+ *event = 0; |
760 |
+ *state = REMOTE_NO_KEY_PRESSED; |
761 |
+ |
762 |
+- digitv_ctrl_msg(d,USB_READ_REMOTE,0,NULL,0,&key[1],4); |
763 |
++ ret = digitv_ctrl_msg(d, USB_READ_REMOTE, 0, NULL, 0, &key[1], 4); |
764 |
++ if (ret) |
765 |
++ return ret; |
766 |
+ |
767 |
+ /* Tell the device we've read the remote. Not sure how necessary |
768 |
+ this is, but the Nebula SDK does it. */ |
769 |
+- digitv_ctrl_msg(d,USB_WRITE_REMOTE,0,b,4,NULL,0); |
770 |
++ ret = digitv_ctrl_msg(d, USB_WRITE_REMOTE, 0, b, 4, NULL, 0); |
771 |
++ if (ret) |
772 |
++ return ret; |
773 |
+ |
774 |
+ /* if something is inside the buffer, simulate key press */ |
775 |
+ if (key[1] != 0) |
776 |
+diff --git a/drivers/media/usb/dvb-usb/dvb-usb-urb.c b/drivers/media/usb/dvb-usb/dvb-usb-urb.c |
777 |
+index c1b4e94a37f8..2aabf90d8697 100644 |
778 |
+--- a/drivers/media/usb/dvb-usb/dvb-usb-urb.c |
779 |
++++ b/drivers/media/usb/dvb-usb/dvb-usb-urb.c |
780 |
+@@ -12,7 +12,7 @@ |
781 |
+ int dvb_usb_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf, |
782 |
+ u16 rlen, int delay_ms) |
783 |
+ { |
784 |
+- int actlen,ret = -ENOMEM; |
785 |
++ int actlen = 0, ret = -ENOMEM; |
786 |
+ |
787 |
+ if (!d || wbuf == NULL || wlen == 0) |
788 |
+ return -EINVAL; |
789 |
+diff --git a/drivers/media/usb/dvb-usb/vp7045.c b/drivers/media/usb/dvb-usb/vp7045.c |
790 |
+index e2c8a8530554..445d3e4c3de5 100644 |
791 |
+--- a/drivers/media/usb/dvb-usb/vp7045.c |
792 |
++++ b/drivers/media/usb/dvb-usb/vp7045.c |
793 |
+@@ -99,10 +99,14 @@ static int vp7045_power_ctrl(struct dvb_usb_device *d, int onoff) |
794 |
+ |
795 |
+ static int vp7045_rc_query(struct dvb_usb_device *d) |
796 |
+ { |
797 |
++ int ret; |
798 |
+ u8 key; |
799 |
+- vp7045_usb_op(d,RC_VAL_READ,NULL,0,&key,1,20); |
800 |
+ |
801 |
+- deb_rc("remote query key: %x %d\n",key,key); |
802 |
++ ret = vp7045_usb_op(d, RC_VAL_READ, NULL, 0, &key, 1, 20); |
803 |
++ if (ret) |
804 |
++ return ret; |
805 |
++ |
806 |
++ deb_rc("remote query key: %x\n", key); |
807 |
+ |
808 |
+ if (key != 0x44) { |
809 |
+ /* |
810 |
+@@ -118,15 +122,18 @@ static int vp7045_rc_query(struct dvb_usb_device *d) |
811 |
+ |
812 |
+ static int vp7045_read_eeprom(struct dvb_usb_device *d,u8 *buf, int len, int offset) |
813 |
+ { |
814 |
+- int i = 0; |
815 |
+- u8 v,br[2]; |
816 |
++ int i, ret; |
817 |
++ u8 v, br[2]; |
818 |
+ for (i=0; i < len; i++) { |
819 |
+ v = offset + i; |
820 |
+- vp7045_usb_op(d,GET_EE_VALUE,&v,1,br,2,5); |
821 |
++ ret = vp7045_usb_op(d, GET_EE_VALUE, &v, 1, br, 2, 5); |
822 |
++ if (ret) |
823 |
++ return ret; |
824 |
++ |
825 |
+ buf[i] = br[1]; |
826 |
+ } |
827 |
+- deb_info("VP7045 EEPROM read (offs: %d, len: %d) : ",offset, i); |
828 |
+- debug_dump(buf,i,deb_info); |
829 |
++ deb_info("VP7045 EEPROM read (offs: %d, len: %d) : ", offset, i); |
830 |
++ debug_dump(buf, i, deb_info); |
831 |
+ return 0; |
832 |
+ } |
833 |
+ |
834 |
+diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c |
835 |
+index b12356c533a6..c9a2b29a60a5 100644 |
836 |
+--- a/drivers/media/usb/gspca/gspca.c |
837 |
++++ b/drivers/media/usb/gspca/gspca.c |
838 |
+@@ -1473,7 +1473,7 @@ int gspca_dev_probe2(struct usb_interface *intf, |
839 |
+ pr_err("couldn't kzalloc gspca struct\n"); |
840 |
+ return -ENOMEM; |
841 |
+ } |
842 |
+- gspca_dev->usb_buf = kmalloc(USB_BUF_SZ, GFP_KERNEL); |
843 |
++ gspca_dev->usb_buf = kzalloc(USB_BUF_SZ, GFP_KERNEL); |
844 |
+ if (!gspca_dev->usb_buf) { |
845 |
+ pr_err("out of memory\n"); |
846 |
+ ret = -ENOMEM; |
847 |
+diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c |
848 |
+index 02a4187d81bd..c93609007670 100644 |
849 |
+--- a/drivers/net/dsa/bcm_sf2.c |
850 |
++++ b/drivers/net/dsa/bcm_sf2.c |
851 |
+@@ -72,7 +72,7 @@ static void bcm_sf2_imp_setup(struct dsa_switch *ds, int port) |
852 |
+ |
853 |
+ /* Force link status for IMP port */ |
854 |
+ reg = core_readl(priv, offset); |
855 |
+- reg |= (MII_SW_OR | LINK_STS); |
856 |
++ reg |= (MII_SW_OR | LINK_STS | GMII_SPEED_UP_2G); |
857 |
+ core_writel(priv, reg, offset); |
858 |
+ |
859 |
+ /* Enable Broadcast, Multicast, Unicast forwarding to IMP port */ |
860 |
+diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c |
861 |
+index 2f61175f5655..5cf85a89016e 100644 |
862 |
+--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c |
863 |
++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c |
864 |
+@@ -8215,11 +8215,23 @@ static bool bnxt_fltr_match(struct bnxt_ntuple_filter *f1, |
865 |
+ struct flow_keys *keys1 = &f1->fkeys; |
866 |
+ struct flow_keys *keys2 = &f2->fkeys; |
867 |
+ |
868 |
+- if (keys1->addrs.v4addrs.src == keys2->addrs.v4addrs.src && |
869 |
+- keys1->addrs.v4addrs.dst == keys2->addrs.v4addrs.dst && |
870 |
+- keys1->ports.ports == keys2->ports.ports && |
871 |
+- keys1->basic.ip_proto == keys2->basic.ip_proto && |
872 |
+- keys1->basic.n_proto == keys2->basic.n_proto && |
873 |
++ if (keys1->basic.n_proto != keys2->basic.n_proto || |
874 |
++ keys1->basic.ip_proto != keys2->basic.ip_proto) |
875 |
++ return false; |
876 |
++ |
877 |
++ if (keys1->basic.n_proto == htons(ETH_P_IP)) { |
878 |
++ if (keys1->addrs.v4addrs.src != keys2->addrs.v4addrs.src || |
879 |
++ keys1->addrs.v4addrs.dst != keys2->addrs.v4addrs.dst) |
880 |
++ return false; |
881 |
++ } else { |
882 |
++ if (memcmp(&keys1->addrs.v6addrs.src, &keys2->addrs.v6addrs.src, |
883 |
++ sizeof(keys1->addrs.v6addrs.src)) || |
884 |
++ memcmp(&keys1->addrs.v6addrs.dst, &keys2->addrs.v6addrs.dst, |
885 |
++ sizeof(keys1->addrs.v6addrs.dst))) |
886 |
++ return false; |
887 |
++ } |
888 |
++ |
889 |
++ if (keys1->ports.ports == keys2->ports.ports && |
890 |
+ keys1->control.flags == keys2->control.flags && |
891 |
+ ether_addr_equal(f1->src_mac_addr, f2->src_mac_addr) && |
892 |
+ ether_addr_equal(f1->dst_mac_addr, f2->dst_mac_addr)) |
893 |
+diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c |
894 |
+index d320e9afab88..4af6e6ffc5df 100644 |
895 |
+--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c |
896 |
++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c |
897 |
+@@ -70,8 +70,7 @@ static void *seq_tab_start(struct seq_file *seq, loff_t *pos) |
898 |
+ static void *seq_tab_next(struct seq_file *seq, void *v, loff_t *pos) |
899 |
+ { |
900 |
+ v = seq_tab_get_idx(seq->private, *pos + 1); |
901 |
+- if (v) |
902 |
+- ++*pos; |
903 |
++ ++(*pos); |
904 |
+ return v; |
905 |
+ } |
906 |
+ |
907 |
+diff --git a/drivers/net/ethernet/chelsio/cxgb4/l2t.c b/drivers/net/ethernet/chelsio/cxgb4/l2t.c |
908 |
+index 301c4df8a566..986277744611 100644 |
909 |
+--- a/drivers/net/ethernet/chelsio/cxgb4/l2t.c |
910 |
++++ b/drivers/net/ethernet/chelsio/cxgb4/l2t.c |
911 |
+@@ -683,8 +683,7 @@ static void *l2t_seq_start(struct seq_file *seq, loff_t *pos) |
912 |
+ static void *l2t_seq_next(struct seq_file *seq, void *v, loff_t *pos) |
913 |
+ { |
914 |
+ v = l2t_get_idx(seq, *pos); |
915 |
+- if (v) |
916 |
+- ++*pos; |
917 |
++ ++(*pos); |
918 |
+ return v; |
919 |
+ } |
920 |
+ |
921 |
+diff --git a/drivers/net/ethernet/freescale/fman/fman_memac.c b/drivers/net/ethernet/freescale/fman/fman_memac.c |
922 |
+index 41c6fa200e74..e1901874c19f 100644 |
923 |
+--- a/drivers/net/ethernet/freescale/fman/fman_memac.c |
924 |
++++ b/drivers/net/ethernet/freescale/fman/fman_memac.c |
925 |
+@@ -110,7 +110,7 @@ do { \ |
926 |
+ /* Interface Mode Register (IF_MODE) */ |
927 |
+ |
928 |
+ #define IF_MODE_MASK 0x00000003 /* 30-31 Mask on i/f mode bits */ |
929 |
+-#define IF_MODE_XGMII 0x00000000 /* 30-31 XGMII (10G) interface */ |
930 |
++#define IF_MODE_10G 0x00000000 /* 30-31 10G interface */ |
931 |
+ #define IF_MODE_GMII 0x00000002 /* 30-31 GMII (1G) interface */ |
932 |
+ #define IF_MODE_RGMII 0x00000004 |
933 |
+ #define IF_MODE_RGMII_AUTO 0x00008000 |
934 |
+@@ -440,7 +440,7 @@ static int init(struct memac_regs __iomem *regs, struct memac_cfg *cfg, |
935 |
+ tmp = 0; |
936 |
+ switch (phy_if) { |
937 |
+ case PHY_INTERFACE_MODE_XGMII: |
938 |
+- tmp |= IF_MODE_XGMII; |
939 |
++ tmp |= IF_MODE_10G; |
940 |
+ break; |
941 |
+ default: |
942 |
+ tmp |= IF_MODE_GMII; |
943 |
+diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c |
944 |
+index e03b30c60dcf..c82c85ef5fb3 100644 |
945 |
+--- a/drivers/net/ethernet/freescale/xgmac_mdio.c |
946 |
++++ b/drivers/net/ethernet/freescale/xgmac_mdio.c |
947 |
+@@ -49,6 +49,7 @@ struct tgec_mdio_controller { |
948 |
+ struct mdio_fsl_priv { |
949 |
+ struct tgec_mdio_controller __iomem *mdio_base; |
950 |
+ bool is_little_endian; |
951 |
++ bool has_a011043; |
952 |
+ }; |
953 |
+ |
954 |
+ static u32 xgmac_read32(void __iomem *regs, |
955 |
+@@ -226,7 +227,8 @@ static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum) |
956 |
+ return ret; |
957 |
+ |
958 |
+ /* Return all Fs if nothing was there */ |
959 |
+- if (xgmac_read32(®s->mdio_stat, endian) & MDIO_STAT_RD_ER) { |
960 |
++ if ((xgmac_read32(®s->mdio_stat, endian) & MDIO_STAT_RD_ER) && |
961 |
++ !priv->has_a011043) { |
962 |
+ dev_err(&bus->dev, |
963 |
+ "Error while reading PHY%d reg at %d.%hhu\n", |
964 |
+ phy_id, dev_addr, regnum); |
965 |
+@@ -274,6 +276,9 @@ static int xgmac_mdio_probe(struct platform_device *pdev) |
966 |
+ priv->is_little_endian = of_property_read_bool(pdev->dev.of_node, |
967 |
+ "little-endian"); |
968 |
+ |
969 |
++ priv->has_a011043 = of_property_read_bool(pdev->dev.of_node, |
970 |
++ "fsl,erratum-a011043"); |
971 |
++ |
972 |
+ ret = of_mdiobus_register(bus, np); |
973 |
+ if (ret) { |
974 |
+ dev_err(&pdev->dev, "cannot register MDIO bus\n"); |
975 |
+diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c |
976 |
+index bafdcf70a353..fdab974b245b 100644 |
977 |
+--- a/drivers/net/ethernet/intel/igb/e1000_82575.c |
978 |
++++ b/drivers/net/ethernet/intel/igb/e1000_82575.c |
979 |
+@@ -530,7 +530,7 @@ static s32 igb_set_sfp_media_type_82575(struct e1000_hw *hw) |
980 |
+ dev_spec->module_plugged = true; |
981 |
+ if (eth_flags->e1000_base_lx || eth_flags->e1000_base_sx) { |
982 |
+ hw->phy.media_type = e1000_media_type_internal_serdes; |
983 |
+- } else if (eth_flags->e100_base_fx) { |
984 |
++ } else if (eth_flags->e100_base_fx || eth_flags->e100_base_lx) { |
985 |
+ dev_spec->sgmii_active = true; |
986 |
+ hw->phy.media_type = e1000_media_type_internal_serdes; |
987 |
+ } else if (eth_flags->e1000_base_t) { |
988 |
+@@ -657,14 +657,10 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw) |
989 |
+ break; |
990 |
+ } |
991 |
+ |
992 |
+- /* do not change link mode for 100BaseFX */ |
993 |
+- if (dev_spec->eth_flags.e100_base_fx) |
994 |
+- break; |
995 |
+- |
996 |
+ /* change current link mode setting */ |
997 |
+ ctrl_ext &= ~E1000_CTRL_EXT_LINK_MODE_MASK; |
998 |
+ |
999 |
+- if (hw->phy.media_type == e1000_media_type_copper) |
1000 |
++ if (dev_spec->sgmii_active) |
1001 |
+ ctrl_ext |= E1000_CTRL_EXT_LINK_MODE_SGMII; |
1002 |
+ else |
1003 |
+ ctrl_ext |= E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES; |
1004 |
+diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c |
1005 |
+index 5acf3b743876..50954e444985 100644 |
1006 |
+--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c |
1007 |
++++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c |
1008 |
+@@ -181,7 +181,7 @@ static int igb_get_link_ksettings(struct net_device *netdev, |
1009 |
+ advertising &= ~ADVERTISED_1000baseKX_Full; |
1010 |
+ } |
1011 |
+ } |
1012 |
+- if (eth_flags->e100_base_fx) { |
1013 |
++ if (eth_flags->e100_base_fx || eth_flags->e100_base_lx) { |
1014 |
+ supported |= SUPPORTED_100baseT_Full; |
1015 |
+ advertising |= ADVERTISED_100baseT_Full; |
1016 |
+ } |
1017 |
+diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |
1018 |
+index 51cd58fbab69..8177276500f5 100644 |
1019 |
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |
1020 |
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |
1021 |
+@@ -5189,7 +5189,7 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter) |
1022 |
+ struct ixgbe_hw *hw = &adapter->hw; |
1023 |
+ struct hlist_node *node2; |
1024 |
+ struct ixgbe_fdir_filter *filter; |
1025 |
+- u64 action; |
1026 |
++ u8 queue; |
1027 |
+ |
1028 |
+ spin_lock(&adapter->fdir_perfect_lock); |
1029 |
+ |
1030 |
+@@ -5198,17 +5198,34 @@ static void ixgbe_fdir_filter_restore(struct ixgbe_adapter *adapter) |
1031 |
+ |
1032 |
+ hlist_for_each_entry_safe(filter, node2, |
1033 |
+ &adapter->fdir_filter_list, fdir_node) { |
1034 |
+- action = filter->action; |
1035 |
+- if (action != IXGBE_FDIR_DROP_QUEUE && action != 0) |
1036 |
+- action = |
1037 |
+- (action >> ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF) - 1; |
1038 |
++ if (filter->action == IXGBE_FDIR_DROP_QUEUE) { |
1039 |
++ queue = IXGBE_FDIR_DROP_QUEUE; |
1040 |
++ } else { |
1041 |
++ u32 ring = ethtool_get_flow_spec_ring(filter->action); |
1042 |
++ u8 vf = ethtool_get_flow_spec_ring_vf(filter->action); |
1043 |
++ |
1044 |
++ if (!vf && (ring >= adapter->num_rx_queues)) { |
1045 |
++ e_err(drv, "FDIR restore failed without VF, ring: %u\n", |
1046 |
++ ring); |
1047 |
++ continue; |
1048 |
++ } else if (vf && |
1049 |
++ ((vf > adapter->num_vfs) || |
1050 |
++ ring >= adapter->num_rx_queues_per_pool)) { |
1051 |
++ e_err(drv, "FDIR restore failed with VF, vf: %hhu, ring: %u\n", |
1052 |
++ vf, ring); |
1053 |
++ continue; |
1054 |
++ } |
1055 |
++ |
1056 |
++ /* Map the ring onto the absolute queue index */ |
1057 |
++ if (!vf) |
1058 |
++ queue = adapter->rx_ring[ring]->reg_idx; |
1059 |
++ else |
1060 |
++ queue = ((vf - 1) * |
1061 |
++ adapter->num_rx_queues_per_pool) + ring; |
1062 |
++ } |
1063 |
+ |
1064 |
+ ixgbe_fdir_write_perfect_filter_82599(hw, |
1065 |
+- &filter->filter, |
1066 |
+- filter->sw_idx, |
1067 |
+- (action == IXGBE_FDIR_DROP_QUEUE) ? |
1068 |
+- IXGBE_FDIR_DROP_QUEUE : |
1069 |
+- adapter->rx_ring[action]->reg_idx); |
1070 |
++ &filter->filter, filter->sw_idx, queue); |
1071 |
+ } |
1072 |
+ |
1073 |
+ spin_unlock(&adapter->fdir_perfect_lock); |
1074 |
+diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |
1075 |
+index 4093a9c52c18..a10756f0b0d8 100644 |
1076 |
+--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |
1077 |
++++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |
1078 |
+@@ -2066,11 +2066,6 @@ static int ixgbevf_write_uc_addr_list(struct net_device *netdev) |
1079 |
+ struct ixgbe_hw *hw = &adapter->hw; |
1080 |
+ int count = 0; |
1081 |
+ |
1082 |
+- if ((netdev_uc_count(netdev)) > 10) { |
1083 |
+- pr_err("Too many unicast filters - No Space\n"); |
1084 |
+- return -ENOSPC; |
1085 |
+- } |
1086 |
+- |
1087 |
+ if (!netdev_uc_empty(netdev)) { |
1088 |
+ struct netdev_hw_addr *ha; |
1089 |
+ |
1090 |
+diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c |
1091 |
+index a496390b8632..07f9067affc6 100644 |
1092 |
+--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c |
1093 |
++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c |
1094 |
+@@ -2043,6 +2043,7 @@ static void qlcnic_83xx_exec_template_cmd(struct qlcnic_adapter *p_dev, |
1095 |
+ break; |
1096 |
+ } |
1097 |
+ entry += p_hdr->size; |
1098 |
++ cond_resched(); |
1099 |
+ } |
1100 |
+ p_dev->ahw->reset.seq_index = index; |
1101 |
+ } |
1102 |
+diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c |
1103 |
+index afa10a163da1..f34ae8c75bc5 100644 |
1104 |
+--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c |
1105 |
++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c |
1106 |
+@@ -703,6 +703,7 @@ static u32 qlcnic_read_memory_test_agent(struct qlcnic_adapter *adapter, |
1107 |
+ addr += 16; |
1108 |
+ reg_read -= 16; |
1109 |
+ ret += 16; |
1110 |
++ cond_resched(); |
1111 |
+ } |
1112 |
+ out: |
1113 |
+ mutex_unlock(&adapter->ahw->mem_lock); |
1114 |
+@@ -1383,6 +1384,7 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter) |
1115 |
+ buf_offset += entry->hdr.cap_size; |
1116 |
+ entry_offset += entry->hdr.offset; |
1117 |
+ buffer = fw_dump->data + buf_offset; |
1118 |
++ cond_resched(); |
1119 |
+ } |
1120 |
+ |
1121 |
+ fw_dump->clr = 1; |
1122 |
+diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c |
1123 |
+index b55fd76348f9..13c8788e3b6b 100644 |
1124 |
+--- a/drivers/net/usb/qmi_wwan.c |
1125 |
++++ b/drivers/net/usb/qmi_wwan.c |
1126 |
+@@ -999,6 +999,7 @@ static const struct usb_device_id products[] = { |
1127 |
+ {QMI_QUIRK_QUECTEL_DYNCFG(0x2c7c, 0x0125)}, /* Quectel EC25, EC20 R2.0 Mini PCIe */ |
1128 |
+ {QMI_QUIRK_QUECTEL_DYNCFG(0x2c7c, 0x0306)}, /* Quectel EP06/EG06/EM06 */ |
1129 |
+ {QMI_QUIRK_QUECTEL_DYNCFG(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */ |
1130 |
++ {QMI_QUIRK_QUECTEL_DYNCFG(0x2c7c, 0x0800)}, /* Quectel RM500Q-GL */ |
1131 |
+ |
1132 |
+ /* 3. Combined interface devices matching on interface number */ |
1133 |
+ {QMI_FIXED_INTF(0x0408, 0xea42, 4)}, /* Yota / Megafon M100-1 */ |
1134 |
+diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c |
1135 |
+index db817d3c2bb8..c5c188dc6626 100644 |
1136 |
+--- a/drivers/net/usb/r8152.c |
1137 |
++++ b/drivers/net/usb/r8152.c |
1138 |
+@@ -5259,6 +5259,11 @@ static int rtl8152_probe(struct usb_interface *intf, |
1139 |
+ |
1140 |
+ intf->needs_remote_wakeup = 1; |
1141 |
+ |
1142 |
++ if (!rtl_can_wakeup(tp)) |
1143 |
++ __rtl_set_wol(tp, 0); |
1144 |
++ else |
1145 |
++ tp->saved_wolopts = __rtl_get_wol(tp); |
1146 |
++ |
1147 |
+ tp->rtl_ops.init(tp); |
1148 |
+ queue_delayed_work(system_long_wq, &tp->hw_phy_work, 0); |
1149 |
+ set_ethernet_addr(tp); |
1150 |
+@@ -5272,10 +5277,6 @@ static int rtl8152_probe(struct usb_interface *intf, |
1151 |
+ goto out1; |
1152 |
+ } |
1153 |
+ |
1154 |
+- if (!rtl_can_wakeup(tp)) |
1155 |
+- __rtl_set_wol(tp, 0); |
1156 |
+- |
1157 |
+- tp->saved_wolopts = __rtl_get_wol(tp); |
1158 |
+ if (tp->saved_wolopts) |
1159 |
+ device_set_wakeup_enable(&udev->dev, true); |
1160 |
+ else |
1161 |
+diff --git a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c |
1162 |
+index 5512c7f73fce..c3fe9bfff812 100644 |
1163 |
+--- a/drivers/net/wireless/cisco/airo.c |
1164 |
++++ b/drivers/net/wireless/cisco/airo.c |
1165 |
+@@ -7786,16 +7786,8 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp) { |
1166 |
+ case AIROGVLIST: ridcode = RID_APLIST; break; |
1167 |
+ case AIROGDRVNAM: ridcode = RID_DRVNAME; break; |
1168 |
+ case AIROGEHTENC: ridcode = RID_ETHERENCAP; break; |
1169 |
+- case AIROGWEPKTMP: ridcode = RID_WEP_TEMP; |
1170 |
+- /* Only super-user can read WEP keys */ |
1171 |
+- if (!capable(CAP_NET_ADMIN)) |
1172 |
+- return -EPERM; |
1173 |
+- break; |
1174 |
+- case AIROGWEPKNV: ridcode = RID_WEP_PERM; |
1175 |
+- /* Only super-user can read WEP keys */ |
1176 |
+- if (!capable(CAP_NET_ADMIN)) |
1177 |
+- return -EPERM; |
1178 |
+- break; |
1179 |
++ case AIROGWEPKTMP: ridcode = RID_WEP_TEMP; break; |
1180 |
++ case AIROGWEPKNV: ridcode = RID_WEP_PERM; break; |
1181 |
+ case AIROGSTAT: ridcode = RID_STATUS; break; |
1182 |
+ case AIROGSTATSD32: ridcode = RID_STATSDELTA; break; |
1183 |
+ case AIROGSTATSC32: ridcode = RID_STATS; break; |
1184 |
+@@ -7809,7 +7801,13 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp) { |
1185 |
+ return -EINVAL; |
1186 |
+ } |
1187 |
+ |
1188 |
+- if ((iobuf = kmalloc(RIDSIZE, GFP_KERNEL)) == NULL) |
1189 |
++ if (ridcode == RID_WEP_TEMP || ridcode == RID_WEP_PERM) { |
1190 |
++ /* Only super-user can read WEP keys */ |
1191 |
++ if (!capable(CAP_NET_ADMIN)) |
1192 |
++ return -EPERM; |
1193 |
++ } |
1194 |
++ |
1195 |
++ if ((iobuf = kzalloc(RIDSIZE, GFP_KERNEL)) == NULL) |
1196 |
+ return -ENOMEM; |
1197 |
+ |
1198 |
+ PC4500_readrid(ai,ridcode,iobuf,RIDSIZE, 1); |
1199 |
+diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c |
1200 |
+index b850cca9853c..a6e64787a345 100644 |
1201 |
+--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c |
1202 |
++++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c |
1203 |
+@@ -217,6 +217,34 @@ enum iwl_nvm_channel_flags { |
1204 |
+ NVM_CHANNEL_DC_HIGH = BIT(12), |
1205 |
+ }; |
1206 |
+ |
1207 |
++/** |
1208 |
++ * enum iwl_reg_capa_flags - global flags applied for the whole regulatory |
1209 |
++ * domain. |
1210 |
++ * @REG_CAPA_BF_CCD_LOW_BAND: Beam-forming or Cyclic Delay Diversity in the |
1211 |
++ * 2.4Ghz band is allowed. |
1212 |
++ * @REG_CAPA_BF_CCD_HIGH_BAND: Beam-forming or Cyclic Delay Diversity in the |
1213 |
++ * 5Ghz band is allowed. |
1214 |
++ * @REG_CAPA_160MHZ_ALLOWED: 11ac channel with a width of 160Mhz is allowed |
1215 |
++ * for this regulatory domain (valid only in 5Ghz). |
1216 |
++ * @REG_CAPA_80MHZ_ALLOWED: 11ac channel with a width of 80Mhz is allowed |
1217 |
++ * for this regulatory domain (valid only in 5Ghz). |
1218 |
++ * @REG_CAPA_MCS_8_ALLOWED: 11ac with MCS 8 is allowed. |
1219 |
++ * @REG_CAPA_MCS_9_ALLOWED: 11ac with MCS 9 is allowed. |
1220 |
++ * @REG_CAPA_40MHZ_FORBIDDEN: 11n channel with a width of 40Mhz is forbidden |
1221 |
++ * for this regulatory domain (valid only in 5Ghz). |
1222 |
++ * @REG_CAPA_DC_HIGH_ENABLED: DC HIGH allowed. |
1223 |
++ */ |
1224 |
++enum iwl_reg_capa_flags { |
1225 |
++ REG_CAPA_BF_CCD_LOW_BAND = BIT(0), |
1226 |
++ REG_CAPA_BF_CCD_HIGH_BAND = BIT(1), |
1227 |
++ REG_CAPA_160MHZ_ALLOWED = BIT(2), |
1228 |
++ REG_CAPA_80MHZ_ALLOWED = BIT(3), |
1229 |
++ REG_CAPA_MCS_8_ALLOWED = BIT(4), |
1230 |
++ REG_CAPA_MCS_9_ALLOWED = BIT(5), |
1231 |
++ REG_CAPA_40MHZ_FORBIDDEN = BIT(7), |
1232 |
++ REG_CAPA_DC_HIGH_ENABLED = BIT(9), |
1233 |
++}; |
1234 |
++ |
1235 |
+ static inline void iwl_nvm_print_channel_flags(struct device *dev, u32 level, |
1236 |
+ int chan, u16 flags) |
1237 |
+ { |
1238 |
+@@ -923,6 +951,7 @@ IWL_EXPORT_SYMBOL(iwl_parse_nvm_data); |
1239 |
+ |
1240 |
+ static u32 iwl_nvm_get_regdom_bw_flags(const u8 *nvm_chan, |
1241 |
+ int ch_idx, u16 nvm_flags, |
1242 |
++ u16 cap_flags, |
1243 |
+ const struct iwl_cfg *cfg) |
1244 |
+ { |
1245 |
+ u32 flags = NL80211_RRF_NO_HT40; |
1246 |
+@@ -966,6 +995,20 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u8 *nvm_chan, |
1247 |
+ (flags & NL80211_RRF_NO_IR)) |
1248 |
+ flags |= NL80211_RRF_GO_CONCURRENT; |
1249 |
+ |
1250 |
++ /* |
1251 |
++ * cap_flags is per regulatory domain so apply it for every channel |
1252 |
++ */ |
1253 |
++ if (ch_idx >= NUM_2GHZ_CHANNELS) { |
1254 |
++ if (cap_flags & REG_CAPA_40MHZ_FORBIDDEN) |
1255 |
++ flags |= NL80211_RRF_NO_HT40; |
1256 |
++ |
1257 |
++ if (!(cap_flags & REG_CAPA_80MHZ_ALLOWED)) |
1258 |
++ flags |= NL80211_RRF_NO_80MHZ; |
1259 |
++ |
1260 |
++ if (!(cap_flags & REG_CAPA_160MHZ_ALLOWED)) |
1261 |
++ flags |= NL80211_RRF_NO_160MHZ; |
1262 |
++ } |
1263 |
++ |
1264 |
+ return flags; |
1265 |
+ } |
1266 |
+ |
1267 |
+@@ -977,7 +1020,7 @@ struct regdb_ptrs { |
1268 |
+ struct ieee80211_regdomain * |
1269 |
+ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, |
1270 |
+ int num_of_ch, __le32 *channels, u16 fw_mcc, |
1271 |
+- u16 geo_info) |
1272 |
++ u16 geo_info, u16 cap) |
1273 |
+ { |
1274 |
+ int ch_idx; |
1275 |
+ u16 ch_flags; |
1276 |
+@@ -1038,7 +1081,8 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, |
1277 |
+ } |
1278 |
+ |
1279 |
+ reg_rule_flags = iwl_nvm_get_regdom_bw_flags(nvm_chan, ch_idx, |
1280 |
+- ch_flags, cfg); |
1281 |
++ ch_flags, cap, |
1282 |
++ cfg); |
1283 |
+ |
1284 |
+ /* we can't continue the same rule */ |
1285 |
+ if (ch_idx == 0 || prev_reg_rule_flags != reg_rule_flags || |
1286 |
+diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h |
1287 |
+index 234d1009a9de..a9bdd4aa01c7 100644 |
1288 |
+--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h |
1289 |
++++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h |
1290 |
+@@ -7,7 +7,7 @@ |
1291 |
+ * |
1292 |
+ * Copyright(c) 2008 - 2015 Intel Corporation. All rights reserved. |
1293 |
+ * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
1294 |
+- * Copyright(c) 2018 Intel Corporation |
1295 |
++ * Copyright(c) 2018 - 2019 Intel Corporation |
1296 |
+ * |
1297 |
+ * This program is free software; you can redistribute it and/or modify |
1298 |
+ * it under the terms of version 2 of the GNU General Public License as |
1299 |
+@@ -34,7 +34,7 @@ |
1300 |
+ * |
1301 |
+ * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved. |
1302 |
+ * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
1303 |
+- * Copyright(c) 2018 Intel Corporation |
1304 |
++ * Copyright(c) 2018 - 2019 Intel Corporation |
1305 |
+ * All rights reserved. |
1306 |
+ * |
1307 |
+ * Redistribution and use in source and binary forms, with or without |
1308 |
+@@ -108,7 +108,7 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, |
1309 |
+ struct ieee80211_regdomain * |
1310 |
+ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, |
1311 |
+ int num_of_ch, __le32 *channels, u16 fw_mcc, |
1312 |
+- u16 geo_info); |
1313 |
++ u16 geo_info, u16 cap); |
1314 |
+ |
1315 |
+ /** |
1316 |
+ * struct iwl_nvm_section - describes an NVM section in memory. |
1317 |
+diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c |
1318 |
+index 476c44db0e64..58653598db14 100644 |
1319 |
+--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c |
1320 |
++++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c |
1321 |
+@@ -317,7 +317,8 @@ struct ieee80211_regdomain *iwl_mvm_get_regdomain(struct wiphy *wiphy, |
1322 |
+ __le32_to_cpu(resp->n_channels), |
1323 |
+ resp->channels, |
1324 |
+ __le16_to_cpu(resp->mcc), |
1325 |
+- __le16_to_cpu(resp->geo_info)); |
1326 |
++ __le16_to_cpu(resp->geo_info), |
1327 |
++ __le16_to_cpu(resp->cap)); |
1328 |
+ /* Store the return source id */ |
1329 |
+ src_id = resp->source_id; |
1330 |
+ kfree(resp); |
1331 |
+diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c |
1332 |
+index 5733e440ecaf..81cc1044532d 100644 |
1333 |
+--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c |
1334 |
++++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c |
1335 |
+@@ -1129,6 +1129,12 @@ static void rsi_disconnect(struct sdio_func *pfunction) |
1336 |
+ rsi_mac80211_detach(adapter); |
1337 |
+ mdelay(10); |
1338 |
+ |
1339 |
++ if (IS_ENABLED(CONFIG_RSI_COEX) && adapter->priv->coex_mode > 1 && |
1340 |
++ adapter->priv->bt_adapter) { |
1341 |
++ rsi_bt_ops.detach(adapter->priv->bt_adapter); |
1342 |
++ adapter->priv->bt_adapter = NULL; |
1343 |
++ } |
1344 |
++ |
1345 |
+ /* Reset Chip */ |
1346 |
+ rsi_reset_chip(adapter); |
1347 |
+ |
1348 |
+@@ -1305,6 +1311,12 @@ static int rsi_freeze(struct device *dev) |
1349 |
+ rsi_dbg(ERR_ZONE, |
1350 |
+ "##### Device can not wake up through WLAN\n"); |
1351 |
+ |
1352 |
++ if (IS_ENABLED(CONFIG_RSI_COEX) && common->coex_mode > 1 && |
1353 |
++ common->bt_adapter) { |
1354 |
++ rsi_bt_ops.detach(common->bt_adapter); |
1355 |
++ common->bt_adapter = NULL; |
1356 |
++ } |
1357 |
++ |
1358 |
+ ret = rsi_sdio_disable_interrupts(pfunction); |
1359 |
+ |
1360 |
+ if (sdev->write_fail) |
1361 |
+@@ -1352,6 +1364,12 @@ static void rsi_shutdown(struct device *dev) |
1362 |
+ if (rsi_config_wowlan(adapter, wowlan)) |
1363 |
+ rsi_dbg(ERR_ZONE, "Failed to configure WoWLAN\n"); |
1364 |
+ |
1365 |
++ if (IS_ENABLED(CONFIG_RSI_COEX) && adapter->priv->coex_mode > 1 && |
1366 |
++ adapter->priv->bt_adapter) { |
1367 |
++ rsi_bt_ops.detach(adapter->priv->bt_adapter); |
1368 |
++ adapter->priv->bt_adapter = NULL; |
1369 |
++ } |
1370 |
++ |
1371 |
+ rsi_sdio_disable_interrupts(sdev->pfunction); |
1372 |
+ |
1373 |
+ if (sdev->write_fail) |
1374 |
+diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c |
1375 |
+index 90eb749e2b61..54106646445a 100644 |
1376 |
+--- a/drivers/net/wireless/rsi/rsi_91x_usb.c |
1377 |
++++ b/drivers/net/wireless/rsi/rsi_91x_usb.c |
1378 |
+@@ -291,6 +291,15 @@ out: |
1379 |
+ dev_kfree_skb(rx_cb->rx_skb); |
1380 |
+ } |
1381 |
+ |
1382 |
++static void rsi_rx_urb_kill(struct rsi_hw *adapter, u8 ep_num) |
1383 |
++{ |
1384 |
++ struct rsi_91x_usbdev *dev = (struct rsi_91x_usbdev *)adapter->rsi_dev; |
1385 |
++ struct rx_usb_ctrl_block *rx_cb = &dev->rx_cb[ep_num - 1]; |
1386 |
++ struct urb *urb = rx_cb->rx_urb; |
1387 |
++ |
1388 |
++ usb_kill_urb(urb); |
1389 |
++} |
1390 |
++ |
1391 |
+ /** |
1392 |
+ * rsi_rx_urb_submit() - This function submits the given URB to the USB stack. |
1393 |
+ * @adapter: Pointer to the adapter structure. |
1394 |
+@@ -791,10 +800,13 @@ static int rsi_probe(struct usb_interface *pfunction, |
1395 |
+ if (adapter->priv->coex_mode > 1) { |
1396 |
+ status = rsi_rx_urb_submit(adapter, BT_EP, GFP_KERNEL); |
1397 |
+ if (status) |
1398 |
+- goto err1; |
1399 |
++ goto err_kill_wlan_urb; |
1400 |
+ } |
1401 |
+ |
1402 |
+ return 0; |
1403 |
++ |
1404 |
++err_kill_wlan_urb: |
1405 |
++ rsi_rx_urb_kill(adapter, WLAN_EP); |
1406 |
+ err1: |
1407 |
+ rsi_deinit_usb_interface(adapter); |
1408 |
+ err: |
1409 |
+@@ -818,6 +830,17 @@ static void rsi_disconnect(struct usb_interface *pfunction) |
1410 |
+ return; |
1411 |
+ |
1412 |
+ rsi_mac80211_detach(adapter); |
1413 |
++ |
1414 |
++ if (IS_ENABLED(CONFIG_RSI_COEX) && adapter->priv->coex_mode > 1 && |
1415 |
++ adapter->priv->bt_adapter) { |
1416 |
++ rsi_bt_ops.detach(adapter->priv->bt_adapter); |
1417 |
++ adapter->priv->bt_adapter = NULL; |
1418 |
++ } |
1419 |
++ |
1420 |
++ if (adapter->priv->coex_mode > 1) |
1421 |
++ rsi_rx_urb_kill(adapter, BT_EP); |
1422 |
++ rsi_rx_urb_kill(adapter, WLAN_EP); |
1423 |
++ |
1424 |
+ rsi_reset_card(adapter); |
1425 |
+ rsi_deinit_usb_interface(adapter); |
1426 |
+ rsi_91x_deinit(adapter); |
1427 |
+diff --git a/drivers/platform/x86/gpd-pocket-fan.c b/drivers/platform/x86/gpd-pocket-fan.c |
1428 |
+index 73eb1572b966..b471b86c28fe 100644 |
1429 |
+--- a/drivers/platform/x86/gpd-pocket-fan.c |
1430 |
++++ b/drivers/platform/x86/gpd-pocket-fan.c |
1431 |
+@@ -127,7 +127,7 @@ static int gpd_pocket_fan_probe(struct platform_device *pdev) |
1432 |
+ int i; |
1433 |
+ |
1434 |
+ for (i = 0; i < ARRAY_SIZE(temp_limits); i++) { |
1435 |
+- if (temp_limits[i] < 40000 || temp_limits[i] > 70000) { |
1436 |
++ if (temp_limits[i] < 20000 || temp_limits[i] > 90000) { |
1437 |
+ dev_err(&pdev->dev, "Invalid temp-limit %d (must be between 40000 and 70000)\n", |
1438 |
+ temp_limits[i]); |
1439 |
+ temp_limits[0] = TEMP_LIMIT0_DEFAULT; |
1440 |
+diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c |
1441 |
+index 8cbd3c9f0b4c..73ffc16ec022 100644 |
1442 |
+--- a/drivers/scsi/fnic/fnic_scsi.c |
1443 |
++++ b/drivers/scsi/fnic/fnic_scsi.c |
1444 |
+@@ -446,6 +446,9 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc, void (*done)(struct scsi_ |
1445 |
+ if (unlikely(fnic_chk_state_flags_locked(fnic, FNIC_FLAGS_IO_BLOCKED))) |
1446 |
+ return SCSI_MLQUEUE_HOST_BUSY; |
1447 |
+ |
1448 |
++ if (unlikely(fnic_chk_state_flags_locked(fnic, FNIC_FLAGS_FWRESET))) |
1449 |
++ return SCSI_MLQUEUE_HOST_BUSY; |
1450 |
++ |
1451 |
+ rport = starget_to_rport(scsi_target(sc->device)); |
1452 |
+ if (!rport) { |
1453 |
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, |
1454 |
+diff --git a/drivers/soc/ti/wkup_m3_ipc.c b/drivers/soc/ti/wkup_m3_ipc.c |
1455 |
+index f5cb8c0af09f..c1fda6acb670 100644 |
1456 |
+--- a/drivers/soc/ti/wkup_m3_ipc.c |
1457 |
++++ b/drivers/soc/ti/wkup_m3_ipc.c |
1458 |
+@@ -426,6 +426,8 @@ static void wkup_m3_rproc_boot_thread(struct wkup_m3_ipc *m3_ipc) |
1459 |
+ ret = rproc_boot(m3_ipc->rproc); |
1460 |
+ if (ret) |
1461 |
+ dev_err(dev, "rproc_boot failed\n"); |
1462 |
++ else |
1463 |
++ m3_ipc_state = m3_ipc; |
1464 |
+ |
1465 |
+ do_exit(0); |
1466 |
+ } |
1467 |
+@@ -512,8 +514,6 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev) |
1468 |
+ goto err_put_rproc; |
1469 |
+ } |
1470 |
+ |
1471 |
+- m3_ipc_state = m3_ipc; |
1472 |
+- |
1473 |
+ return 0; |
1474 |
+ |
1475 |
+ err_put_rproc: |
1476 |
+diff --git a/drivers/tee/optee/Kconfig b/drivers/tee/optee/Kconfig |
1477 |
+index 3c59e19029be..3c1ec4e9ed29 100644 |
1478 |
+--- a/drivers/tee/optee/Kconfig |
1479 |
++++ b/drivers/tee/optee/Kconfig |
1480 |
+@@ -2,6 +2,7 @@ |
1481 |
+ config OPTEE |
1482 |
+ tristate "OP-TEE" |
1483 |
+ depends on HAVE_ARM_SMCCC |
1484 |
++ depends on MMU |
1485 |
+ help |
1486 |
+ This implements the OP-TEE Trusted Execution Environment (TEE) |
1487 |
+ driver. |
1488 |
+diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c |
1489 |
+index ddbad8d50949..db4002ecbaca 100644 |
1490 |
+--- a/fs/btrfs/super.c |
1491 |
++++ b/fs/btrfs/super.c |
1492 |
+@@ -2167,7 +2167,15 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf) |
1493 |
+ */ |
1494 |
+ thresh = SZ_4M; |
1495 |
+ |
1496 |
+- if (!mixed && total_free_meta - thresh < block_rsv->size) |
1497 |
++ /* |
1498 |
++ * We only want to claim there's no available space if we can no longer |
1499 |
++ * allocate chunks for our metadata profile and our global reserve will |
1500 |
++ * not fit in the free metadata space. If we aren't ->full then we |
1501 |
++ * still can allocate chunks and thus are fine using the currently |
1502 |
++ * calculated f_bavail. |
1503 |
++ */ |
1504 |
++ if (!mixed && block_rsv->space_info->full && |
1505 |
++ total_free_meta - thresh < block_rsv->size) |
1506 |
+ buf->f_bavail = 0; |
1507 |
+ |
1508 |
+ buf->f_type = BTRFS_SUPER_MAGIC; |
1509 |
+diff --git a/fs/ext4/super.c b/fs/ext4/super.c |
1510 |
+index 1a8d57fe0b1a..32d8bdf683bb 100644 |
1511 |
+--- a/fs/ext4/super.c |
1512 |
++++ b/fs/ext4/super.c |
1513 |
+@@ -1842,6 +1842,13 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token, |
1514 |
+ arg = JBD2_DEFAULT_MAX_COMMIT_AGE; |
1515 |
+ sbi->s_commit_interval = HZ * arg; |
1516 |
+ } else if (token == Opt_debug_want_extra_isize) { |
1517 |
++ if ((arg & 1) || |
1518 |
++ (arg < 4) || |
1519 |
++ (arg > (sbi->s_inode_size - EXT4_GOOD_OLD_INODE_SIZE))) { |
1520 |
++ ext4_msg(sb, KERN_ERR, |
1521 |
++ "Invalid want_extra_isize %d", arg); |
1522 |
++ return -1; |
1523 |
++ } |
1524 |
+ sbi->s_want_extra_isize = arg; |
1525 |
+ } else if (token == Opt_max_batch_time) { |
1526 |
+ sbi->s_max_batch_time = arg; |
1527 |
+@@ -3513,40 +3520,6 @@ int ext4_calculate_overhead(struct super_block *sb) |
1528 |
+ return 0; |
1529 |
+ } |
1530 |
+ |
1531 |
+-static void ext4_clamp_want_extra_isize(struct super_block *sb) |
1532 |
+-{ |
1533 |
+- struct ext4_sb_info *sbi = EXT4_SB(sb); |
1534 |
+- struct ext4_super_block *es = sbi->s_es; |
1535 |
+- unsigned def_extra_isize = sizeof(struct ext4_inode) - |
1536 |
+- EXT4_GOOD_OLD_INODE_SIZE; |
1537 |
+- |
1538 |
+- if (sbi->s_inode_size == EXT4_GOOD_OLD_INODE_SIZE) { |
1539 |
+- sbi->s_want_extra_isize = 0; |
1540 |
+- return; |
1541 |
+- } |
1542 |
+- if (sbi->s_want_extra_isize < 4) { |
1543 |
+- sbi->s_want_extra_isize = def_extra_isize; |
1544 |
+- if (ext4_has_feature_extra_isize(sb)) { |
1545 |
+- if (sbi->s_want_extra_isize < |
1546 |
+- le16_to_cpu(es->s_want_extra_isize)) |
1547 |
+- sbi->s_want_extra_isize = |
1548 |
+- le16_to_cpu(es->s_want_extra_isize); |
1549 |
+- if (sbi->s_want_extra_isize < |
1550 |
+- le16_to_cpu(es->s_min_extra_isize)) |
1551 |
+- sbi->s_want_extra_isize = |
1552 |
+- le16_to_cpu(es->s_min_extra_isize); |
1553 |
+- } |
1554 |
+- } |
1555 |
+- /* Check if enough inode space is available */ |
1556 |
+- if ((sbi->s_want_extra_isize > sbi->s_inode_size) || |
1557 |
+- (EXT4_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize > |
1558 |
+- sbi->s_inode_size)) { |
1559 |
+- sbi->s_want_extra_isize = def_extra_isize; |
1560 |
+- ext4_msg(sb, KERN_INFO, |
1561 |
+- "required extra inode space not available"); |
1562 |
+- } |
1563 |
+-} |
1564 |
+- |
1565 |
+ static void ext4_set_resv_clusters(struct super_block *sb) |
1566 |
+ { |
1567 |
+ ext4_fsblk_t resv_clusters; |
1568 |
+@@ -3754,6 +3727,65 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) |
1569 |
+ */ |
1570 |
+ sbi->s_li_wait_mult = EXT4_DEF_LI_WAIT_MULT; |
1571 |
+ |
1572 |
++ if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV) { |
1573 |
++ sbi->s_inode_size = EXT4_GOOD_OLD_INODE_SIZE; |
1574 |
++ sbi->s_first_ino = EXT4_GOOD_OLD_FIRST_INO; |
1575 |
++ } else { |
1576 |
++ sbi->s_inode_size = le16_to_cpu(es->s_inode_size); |
1577 |
++ sbi->s_first_ino = le32_to_cpu(es->s_first_ino); |
1578 |
++ if (sbi->s_first_ino < EXT4_GOOD_OLD_FIRST_INO) { |
1579 |
++ ext4_msg(sb, KERN_ERR, "invalid first ino: %u", |
1580 |
++ sbi->s_first_ino); |
1581 |
++ goto failed_mount; |
1582 |
++ } |
1583 |
++ if ((sbi->s_inode_size < EXT4_GOOD_OLD_INODE_SIZE) || |
1584 |
++ (!is_power_of_2(sbi->s_inode_size)) || |
1585 |
++ (sbi->s_inode_size > blocksize)) { |
1586 |
++ ext4_msg(sb, KERN_ERR, |
1587 |
++ "unsupported inode size: %d", |
1588 |
++ sbi->s_inode_size); |
1589 |
++ goto failed_mount; |
1590 |
++ } |
1591 |
++ /* |
1592 |
++ * i_atime_extra is the last extra field available for |
1593 |
++ * [acm]times in struct ext4_inode. Checking for that |
1594 |
++ * field should suffice to ensure we have extra space |
1595 |
++ * for all three. |
1596 |
++ */ |
1597 |
++ if (sbi->s_inode_size >= offsetof(struct ext4_inode, i_atime_extra) + |
1598 |
++ sizeof(((struct ext4_inode *)0)->i_atime_extra)) { |
1599 |
++ sb->s_time_gran = 1; |
1600 |
++ } else { |
1601 |
++ sb->s_time_gran = NSEC_PER_SEC; |
1602 |
++ } |
1603 |
++ } |
1604 |
++ if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE) { |
1605 |
++ sbi->s_want_extra_isize = sizeof(struct ext4_inode) - |
1606 |
++ EXT4_GOOD_OLD_INODE_SIZE; |
1607 |
++ if (ext4_has_feature_extra_isize(sb)) { |
1608 |
++ unsigned v, max = (sbi->s_inode_size - |
1609 |
++ EXT4_GOOD_OLD_INODE_SIZE); |
1610 |
++ |
1611 |
++ v = le16_to_cpu(es->s_want_extra_isize); |
1612 |
++ if (v > max) { |
1613 |
++ ext4_msg(sb, KERN_ERR, |
1614 |
++ "bad s_want_extra_isize: %d", v); |
1615 |
++ goto failed_mount; |
1616 |
++ } |
1617 |
++ if (sbi->s_want_extra_isize < v) |
1618 |
++ sbi->s_want_extra_isize = v; |
1619 |
++ |
1620 |
++ v = le16_to_cpu(es->s_min_extra_isize); |
1621 |
++ if (v > max) { |
1622 |
++ ext4_msg(sb, KERN_ERR, |
1623 |
++ "bad s_min_extra_isize: %d", v); |
1624 |
++ goto failed_mount; |
1625 |
++ } |
1626 |
++ if (sbi->s_want_extra_isize < v) |
1627 |
++ sbi->s_want_extra_isize = v; |
1628 |
++ } |
1629 |
++ } |
1630 |
++ |
1631 |
+ if (sbi->s_es->s_mount_opts[0]) { |
1632 |
+ char *s_mount_opts = kstrndup(sbi->s_es->s_mount_opts, |
1633 |
+ sizeof(sbi->s_es->s_mount_opts), |
1634 |
+@@ -3955,29 +3987,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) |
1635 |
+ has_huge_files); |
1636 |
+ sb->s_maxbytes = ext4_max_size(sb->s_blocksize_bits, has_huge_files); |
1637 |
+ |
1638 |
+- if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV) { |
1639 |
+- sbi->s_inode_size = EXT4_GOOD_OLD_INODE_SIZE; |
1640 |
+- sbi->s_first_ino = EXT4_GOOD_OLD_FIRST_INO; |
1641 |
+- } else { |
1642 |
+- sbi->s_inode_size = le16_to_cpu(es->s_inode_size); |
1643 |
+- sbi->s_first_ino = le32_to_cpu(es->s_first_ino); |
1644 |
+- if (sbi->s_first_ino < EXT4_GOOD_OLD_FIRST_INO) { |
1645 |
+- ext4_msg(sb, KERN_ERR, "invalid first ino: %u", |
1646 |
+- sbi->s_first_ino); |
1647 |
+- goto failed_mount; |
1648 |
+- } |
1649 |
+- if ((sbi->s_inode_size < EXT4_GOOD_OLD_INODE_SIZE) || |
1650 |
+- (!is_power_of_2(sbi->s_inode_size)) || |
1651 |
+- (sbi->s_inode_size > blocksize)) { |
1652 |
+- ext4_msg(sb, KERN_ERR, |
1653 |
+- "unsupported inode size: %d", |
1654 |
+- sbi->s_inode_size); |
1655 |
+- goto failed_mount; |
1656 |
+- } |
1657 |
+- if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE) |
1658 |
+- sb->s_time_gran = 1 << (EXT4_EPOCH_BITS - 2); |
1659 |
+- } |
1660 |
+- |
1661 |
+ sbi->s_desc_size = le16_to_cpu(es->s_desc_size); |
1662 |
+ if (ext4_has_feature_64bit(sb)) { |
1663 |
+ if (sbi->s_desc_size < EXT4_MIN_DESC_SIZE_64BIT || |
1664 |
+@@ -4421,8 +4430,6 @@ no_journal: |
1665 |
+ } else if (ret) |
1666 |
+ goto failed_mount4a; |
1667 |
+ |
1668 |
+- ext4_clamp_want_extra_isize(sb); |
1669 |
+- |
1670 |
+ ext4_set_resv_clusters(sb); |
1671 |
+ |
1672 |
+ err = ext4_setup_system_zone(sb); |
1673 |
+@@ -5207,8 +5214,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) |
1674 |
+ goto restore_opts; |
1675 |
+ } |
1676 |
+ |
1677 |
+- ext4_clamp_want_extra_isize(sb); |
1678 |
+- |
1679 |
+ if ((old_opts.s_mount_opt & EXT4_MOUNT_JOURNAL_CHECKSUM) ^ |
1680 |
+ test_opt(sb, JOURNAL_CHECKSUM)) { |
1681 |
+ ext4_msg(sb, KERN_ERR, "changing journal_checksum " |
1682 |
+diff --git a/fs/namei.c b/fs/namei.c |
1683 |
+index 2aad8042a05b..c00a7e1da4c0 100644 |
1684 |
+--- a/fs/namei.c |
1685 |
++++ b/fs/namei.c |
1686 |
+@@ -3259,8 +3259,8 @@ static int do_last(struct nameidata *nd, |
1687 |
+ struct file *file, const struct open_flags *op) |
1688 |
+ { |
1689 |
+ struct dentry *dir = nd->path.dentry; |
1690 |
+- kuid_t dir_uid = dir->d_inode->i_uid; |
1691 |
+- umode_t dir_mode = dir->d_inode->i_mode; |
1692 |
++ kuid_t dir_uid = nd->inode->i_uid; |
1693 |
++ umode_t dir_mode = nd->inode->i_mode; |
1694 |
+ int open_flag = op->open_flag; |
1695 |
+ bool will_truncate = (open_flag & O_TRUNC) != 0; |
1696 |
+ bool got_write = false; |
1697 |
+diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c |
1698 |
+index a3507490be6e..6280efeceb0a 100644 |
1699 |
+--- a/fs/reiserfs/super.c |
1700 |
++++ b/fs/reiserfs/super.c |
1701 |
+@@ -629,6 +629,7 @@ static void reiserfs_put_super(struct super_block *s) |
1702 |
+ reiserfs_write_unlock(s); |
1703 |
+ mutex_destroy(&REISERFS_SB(s)->lock); |
1704 |
+ destroy_workqueue(REISERFS_SB(s)->commit_wq); |
1705 |
++ kfree(REISERFS_SB(s)->s_jdev); |
1706 |
+ kfree(s->s_fs_info); |
1707 |
+ s->s_fs_info = NULL; |
1708 |
+ } |
1709 |
+@@ -2243,6 +2244,7 @@ error_unlocked: |
1710 |
+ kfree(qf_names[j]); |
1711 |
+ } |
1712 |
+ #endif |
1713 |
++ kfree(sbi->s_jdev); |
1714 |
+ kfree(sbi); |
1715 |
+ |
1716 |
+ s->s_fs_info = NULL; |
1717 |
+diff --git a/include/linux/sched.h b/include/linux/sched.h |
1718 |
+index 20f5ba262cc0..0530de9a4efc 100644 |
1719 |
+--- a/include/linux/sched.h |
1720 |
++++ b/include/linux/sched.h |
1721 |
+@@ -1843,11 +1843,11 @@ static inline void rseq_migrate(struct task_struct *t) |
1722 |
+ |
1723 |
+ /* |
1724 |
+ * If parent process has a registered restartable sequences area, the |
1725 |
+- * child inherits. Only applies when forking a process, not a thread. |
1726 |
++ * child inherits. Unregister rseq for a clone with CLONE_VM set. |
1727 |
+ */ |
1728 |
+ static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) |
1729 |
+ { |
1730 |
+- if (clone_flags & CLONE_THREAD) { |
1731 |
++ if (clone_flags & CLONE_VM) { |
1732 |
+ t->rseq = NULL; |
1733 |
+ t->rseq_len = 0; |
1734 |
+ t->rseq_sig = 0; |
1735 |
+diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h |
1736 |
+index 1fa2e72ff7a6..ae936cd5567e 100644 |
1737 |
+--- a/include/net/cfg80211.h |
1738 |
++++ b/include/net/cfg80211.h |
1739 |
+@@ -3050,6 +3050,9 @@ struct cfg80211_external_auth_params { |
1740 |
+ * |
1741 |
+ * @start_radar_detection: Start radar detection in the driver. |
1742 |
+ * |
1743 |
++ * @end_cac: End running CAC, probably because a related CAC |
1744 |
++ * was finished on another phy. |
1745 |
++ * |
1746 |
+ * @update_ft_ies: Provide updated Fast BSS Transition information to the |
1747 |
+ * driver. If the SME is in the driver/firmware, this information can be |
1748 |
+ * used in building Authentication and Reassociation Request frames. |
1749 |
+@@ -3364,6 +3367,8 @@ struct cfg80211_ops { |
1750 |
+ struct net_device *dev, |
1751 |
+ struct cfg80211_chan_def *chandef, |
1752 |
+ u32 cac_time_ms); |
1753 |
++ void (*end_cac)(struct wiphy *wiphy, |
1754 |
++ struct net_device *dev); |
1755 |
+ int (*update_ft_ies)(struct wiphy *wiphy, struct net_device *dev, |
1756 |
+ struct cfg80211_update_ft_ies_params *ftie); |
1757 |
+ int (*crit_proto_start)(struct wiphy *wiphy, |
1758 |
+diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c |
1759 |
+index 78ef274b036e..08bd40d90066 100644 |
1760 |
+--- a/kernel/cgroup/cgroup.c |
1761 |
++++ b/kernel/cgroup/cgroup.c |
1762 |
+@@ -2940,8 +2940,6 @@ static int cgroup_apply_control_enable(struct cgroup *cgrp) |
1763 |
+ for_each_subsys(ss, ssid) { |
1764 |
+ struct cgroup_subsys_state *css = cgroup_css(dsct, ss); |
1765 |
+ |
1766 |
+- WARN_ON_ONCE(css && percpu_ref_is_dying(&css->refcnt)); |
1767 |
+- |
1768 |
+ if (!(cgroup_ss_mask(dsct) & (1 << ss->id))) |
1769 |
+ continue; |
1770 |
+ |
1771 |
+@@ -2951,6 +2949,8 @@ static int cgroup_apply_control_enable(struct cgroup *cgrp) |
1772 |
+ return PTR_ERR(css); |
1773 |
+ } |
1774 |
+ |
1775 |
++ WARN_ON_ONCE(percpu_ref_is_dying(&css->refcnt)); |
1776 |
++ |
1777 |
+ if (css_visible(css)) { |
1778 |
+ ret = css_populate_dir(css); |
1779 |
+ if (ret) |
1780 |
+@@ -2986,11 +2986,11 @@ static void cgroup_apply_control_disable(struct cgroup *cgrp) |
1781 |
+ for_each_subsys(ss, ssid) { |
1782 |
+ struct cgroup_subsys_state *css = cgroup_css(dsct, ss); |
1783 |
+ |
1784 |
+- WARN_ON_ONCE(css && percpu_ref_is_dying(&css->refcnt)); |
1785 |
+- |
1786 |
+ if (!css) |
1787 |
+ continue; |
1788 |
+ |
1789 |
++ WARN_ON_ONCE(percpu_ref_is_dying(&css->refcnt)); |
1790 |
++ |
1791 |
+ if (css->parent && |
1792 |
+ !(cgroup_ss_mask(dsct) & (1 << ss->id))) { |
1793 |
+ kill_css(css); |
1794 |
+@@ -3277,7 +3277,8 @@ static ssize_t cgroup_type_write(struct kernfs_open_file *of, char *buf, |
1795 |
+ if (strcmp(strstrip(buf), "threaded")) |
1796 |
+ return -EINVAL; |
1797 |
+ |
1798 |
+- cgrp = cgroup_kn_lock_live(of->kn, false); |
1799 |
++ /* drain dying csses before we re-apply (threaded) subtree control */ |
1800 |
++ cgrp = cgroup_kn_lock_live(of->kn, true); |
1801 |
+ if (!cgrp) |
1802 |
+ return -ENOENT; |
1803 |
+ |
1804 |
+diff --git a/mm/mempolicy.c b/mm/mempolicy.c |
1805 |
+index a4a1cab16c0f..adeb163cd661 100644 |
1806 |
+--- a/mm/mempolicy.c |
1807 |
++++ b/mm/mempolicy.c |
1808 |
+@@ -2808,6 +2808,9 @@ int mpol_parse_str(char *str, struct mempolicy **mpol) |
1809 |
+ char *flags = strchr(str, '='); |
1810 |
+ int err = 1; |
1811 |
+ |
1812 |
++ if (flags) |
1813 |
++ *flags++ = '\0'; /* terminate mode string */ |
1814 |
++ |
1815 |
+ if (nodelist) { |
1816 |
+ /* NUL-terminate mode or flags string */ |
1817 |
+ *nodelist++ = '\0'; |
1818 |
+@@ -2818,9 +2821,6 @@ int mpol_parse_str(char *str, struct mempolicy **mpol) |
1819 |
+ } else |
1820 |
+ nodes_clear(nodes); |
1821 |
+ |
1822 |
+- if (flags) |
1823 |
+- *flags++ = '\0'; /* terminate mode string */ |
1824 |
+- |
1825 |
+ for (mode = 0; mode < MPOL_MAX; mode++) { |
1826 |
+ if (!strcmp(str, policy_modes[mode])) { |
1827 |
+ break; |
1828 |
+diff --git a/mm/migrate.c b/mm/migrate.c |
1829 |
+index 593557c107d2..70f8ad4ade3f 100644 |
1830 |
+--- a/mm/migrate.c |
1831 |
++++ b/mm/migrate.c |
1832 |
+@@ -1672,7 +1672,7 @@ out_flush: |
1833 |
+ err1 = do_move_pages_to_node(mm, &pagelist, current_node); |
1834 |
+ if (!err1) |
1835 |
+ err1 = store_status(status, start, current_node, i - start); |
1836 |
+- if (!err) |
1837 |
++ if (err >= 0) |
1838 |
+ err = err1; |
1839 |
+ out: |
1840 |
+ return err; |
1841 |
+diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c |
1842 |
+index d4e2a166ae17..e506c51ff765 100644 |
1843 |
+--- a/net/bluetooth/hci_sock.c |
1844 |
++++ b/net/bluetooth/hci_sock.c |
1845 |
+@@ -831,6 +831,8 @@ static int hci_sock_release(struct socket *sock) |
1846 |
+ if (!sk) |
1847 |
+ return 0; |
1848 |
+ |
1849 |
++ lock_sock(sk); |
1850 |
++ |
1851 |
+ switch (hci_pi(sk)->channel) { |
1852 |
+ case HCI_CHANNEL_MONITOR: |
1853 |
+ atomic_dec(&monitor_promisc); |
1854 |
+@@ -878,6 +880,7 @@ static int hci_sock_release(struct socket *sock) |
1855 |
+ skb_queue_purge(&sk->sk_receive_queue); |
1856 |
+ skb_queue_purge(&sk->sk_write_queue); |
1857 |
+ |
1858 |
++ release_sock(sk); |
1859 |
+ sock_put(sk); |
1860 |
+ return 0; |
1861 |
+ } |
1862 |
+diff --git a/net/core/utils.c b/net/core/utils.c |
1863 |
+index 2a597ac7808e..60045e9fea05 100644 |
1864 |
+--- a/net/core/utils.c |
1865 |
++++ b/net/core/utils.c |
1866 |
+@@ -442,6 +442,23 @@ void inet_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb, |
1867 |
+ } |
1868 |
+ EXPORT_SYMBOL(inet_proto_csum_replace4); |
1869 |
+ |
1870 |
++/** |
1871 |
++ * inet_proto_csum_replace16 - update layer 4 header checksum field |
1872 |
++ * @sum: Layer 4 header checksum field |
1873 |
++ * @skb: sk_buff for the packet |
1874 |
++ * @from: old IPv6 address |
1875 |
++ * @to: new IPv6 address |
1876 |
++ * @pseudohdr: True if layer 4 header checksum includes pseudoheader |
1877 |
++ * |
1878 |
++ * Update layer 4 header as per the update in IPv6 src/dst address. |
1879 |
++ * |
1880 |
++ * There is no need to update skb->csum in this function, because update in two |
1881 |
++ * fields a.) IPv6 src/dst address and b.) L4 header checksum cancels each other |
1882 |
++ * for skb->csum calculation. Whereas inet_proto_csum_replace4 function needs to |
1883 |
++ * update skb->csum, because update in 3 fields a.) IPv4 src/dst address, |
1884 |
++ * b.) IPv4 Header checksum and c.) L4 header checksum results in same diff as |
1885 |
++ * L4 Header checksum for skb->csum calculation. |
1886 |
++ */ |
1887 |
+ void inet_proto_csum_replace16(__sum16 *sum, struct sk_buff *skb, |
1888 |
+ const __be32 *from, const __be32 *to, |
1889 |
+ bool pseudohdr) |
1890 |
+@@ -453,9 +470,6 @@ void inet_proto_csum_replace16(__sum16 *sum, struct sk_buff *skb, |
1891 |
+ if (skb->ip_summed != CHECKSUM_PARTIAL) { |
1892 |
+ *sum = csum_fold(csum_partial(diff, sizeof(diff), |
1893 |
+ ~csum_unfold(*sum))); |
1894 |
+- if (skb->ip_summed == CHECKSUM_COMPLETE && pseudohdr) |
1895 |
+- skb->csum = ~csum_partial(diff, sizeof(diff), |
1896 |
+- ~skb->csum); |
1897 |
+ } else if (pseudohdr) |
1898 |
+ *sum = ~csum_fold(csum_partial(diff, sizeof(diff), |
1899 |
+ csum_unfold(*sum))); |
1900 |
+diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c |
1901 |
+index 960f4faaf294..f5e5fcd90859 100644 |
1902 |
+--- a/net/ipv4/ip_vti.c |
1903 |
++++ b/net/ipv4/ip_vti.c |
1904 |
+@@ -208,8 +208,17 @@ static netdev_tx_t vti_xmit(struct sk_buff *skb, struct net_device *dev, |
1905 |
+ int mtu; |
1906 |
+ |
1907 |
+ if (!dst) { |
1908 |
+- dev->stats.tx_carrier_errors++; |
1909 |
+- goto tx_error_icmp; |
1910 |
++ struct rtable *rt; |
1911 |
++ |
1912 |
++ fl->u.ip4.flowi4_oif = dev->ifindex; |
1913 |
++ fl->u.ip4.flowi4_flags |= FLOWI_FLAG_ANYSRC; |
1914 |
++ rt = __ip_route_output_key(dev_net(dev), &fl->u.ip4); |
1915 |
++ if (IS_ERR(rt)) { |
1916 |
++ dev->stats.tx_carrier_errors++; |
1917 |
++ goto tx_error_icmp; |
1918 |
++ } |
1919 |
++ dst = &rt->dst; |
1920 |
++ skb_dst_set(skb, dst); |
1921 |
+ } |
1922 |
+ |
1923 |
+ dst_hold(dst); |
1924 |
+diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c |
1925 |
+index bfd39db3398a..67ff206b6d61 100644 |
1926 |
+--- a/net/ipv6/ip6_vti.c |
1927 |
++++ b/net/ipv6/ip6_vti.c |
1928 |
+@@ -453,8 +453,17 @@ vti6_xmit(struct sk_buff *skb, struct net_device *dev, struct flowi *fl) |
1929 |
+ int err = -1; |
1930 |
+ int mtu; |
1931 |
+ |
1932 |
+- if (!dst) |
1933 |
+- goto tx_err_link_failure; |
1934 |
++ if (!dst) { |
1935 |
++ fl->u.ip6.flowi6_oif = dev->ifindex; |
1936 |
++ fl->u.ip6.flowi6_flags |= FLOWI_FLAG_ANYSRC; |
1937 |
++ dst = ip6_route_output(dev_net(dev), NULL, &fl->u.ip6); |
1938 |
++ if (dst->error) { |
1939 |
++ dst_release(dst); |
1940 |
++ dst = NULL; |
1941 |
++ goto tx_err_link_failure; |
1942 |
++ } |
1943 |
++ skb_dst_set(skb, dst); |
1944 |
++ } |
1945 |
+ |
1946 |
+ dst_hold(dst); |
1947 |
+ dst = xfrm_lookup(t->net, dst, fl, NULL, 0); |
1948 |
+diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c |
1949 |
+index e46944500cfa..cb7076d9a769 100644 |
1950 |
+--- a/net/mac80211/cfg.c |
1951 |
++++ b/net/mac80211/cfg.c |
1952 |
+@@ -2825,6 +2825,28 @@ static int ieee80211_start_radar_detection(struct wiphy *wiphy, |
1953 |
+ return err; |
1954 |
+ } |
1955 |
+ |
1956 |
++static void ieee80211_end_cac(struct wiphy *wiphy, |
1957 |
++ struct net_device *dev) |
1958 |
++{ |
1959 |
++ struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
1960 |
++ struct ieee80211_local *local = sdata->local; |
1961 |
++ |
1962 |
++ mutex_lock(&local->mtx); |
1963 |
++ list_for_each_entry(sdata, &local->interfaces, list) { |
1964 |
++ /* it might be waiting for the local->mtx, but then |
1965 |
++ * by the time it gets it, sdata->wdev.cac_started |
1966 |
++ * will no longer be true |
1967 |
++ */ |
1968 |
++ cancel_delayed_work(&sdata->dfs_cac_timer_work); |
1969 |
++ |
1970 |
++ if (sdata->wdev.cac_started) { |
1971 |
++ ieee80211_vif_release_channel(sdata); |
1972 |
++ sdata->wdev.cac_started = false; |
1973 |
++ } |
1974 |
++ } |
1975 |
++ mutex_unlock(&local->mtx); |
1976 |
++} |
1977 |
++ |
1978 |
+ static struct cfg80211_beacon_data * |
1979 |
+ cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon) |
1980 |
+ { |
1981 |
+@@ -3848,6 +3870,7 @@ const struct cfg80211_ops mac80211_config_ops = { |
1982 |
+ #endif |
1983 |
+ .get_channel = ieee80211_cfg_get_channel, |
1984 |
+ .start_radar_detection = ieee80211_start_radar_detection, |
1985 |
++ .end_cac = ieee80211_end_cac, |
1986 |
+ .channel_switch = ieee80211_channel_switch, |
1987 |
+ .set_qos_map = ieee80211_set_qos_map, |
1988 |
+ .set_ap_chanwidth = ieee80211_set_ap_chanwidth, |
1989 |
+diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c |
1990 |
+index 6950cd0bf594..740dc9fa127c 100644 |
1991 |
+--- a/net/mac80211/mesh_hwmp.c |
1992 |
++++ b/net/mac80211/mesh_hwmp.c |
1993 |
+@@ -326,6 +326,9 @@ static u32 airtime_link_metric_get(struct ieee80211_local *local, |
1994 |
+ unsigned long fail_avg = |
1995 |
+ ewma_mesh_fail_avg_read(&sta->mesh->fail_avg); |
1996 |
+ |
1997 |
++ if (sta->mesh->plink_state != NL80211_PLINK_ESTAB) |
1998 |
++ return MAX_METRIC; |
1999 |
++ |
2000 |
+ /* Try to get rate based on HW/SW RC algorithm. |
2001 |
+ * Rate is returned in units of Kbps, correct this |
2002 |
+ * to comply with airtime calculation units |
2003 |
+diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c |
2004 |
+index b3622823bad2..ebd66e8f46b3 100644 |
2005 |
+--- a/net/mac80211/tkip.c |
2006 |
++++ b/net/mac80211/tkip.c |
2007 |
+@@ -266,9 +266,21 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm, |
2008 |
+ if ((keyid >> 6) != key->conf.keyidx) |
2009 |
+ return TKIP_DECRYPT_INVALID_KEYIDX; |
2010 |
+ |
2011 |
+- if (rx_ctx->ctx.state != TKIP_STATE_NOT_INIT && |
2012 |
+- (iv32 < rx_ctx->iv32 || |
2013 |
+- (iv32 == rx_ctx->iv32 && iv16 <= rx_ctx->iv16))) |
2014 |
++ /* Reject replays if the received TSC is smaller than or equal to the |
2015 |
++ * last received value in a valid message, but with an exception for |
2016 |
++ * the case where a new key has been set and no valid frame using that |
2017 |
++ * key has yet received and the local RSC was initialized to 0. This |
2018 |
++ * exception allows the very first frame sent by the transmitter to be |
2019 |
++ * accepted even if that transmitter were to use TSC 0 (IEEE 802.11 |
2020 |
++ * described TSC to be initialized to 1 whenever a new key is taken into |
2021 |
++ * use). |
2022 |
++ */ |
2023 |
++ if (iv32 < rx_ctx->iv32 || |
2024 |
++ (iv32 == rx_ctx->iv32 && |
2025 |
++ (iv16 < rx_ctx->iv16 || |
2026 |
++ (iv16 == rx_ctx->iv16 && |
2027 |
++ (rx_ctx->iv32 || rx_ctx->iv16 || |
2028 |
++ rx_ctx->ctx.state != TKIP_STATE_NOT_INIT))))) |
2029 |
+ return TKIP_DECRYPT_REPLAY; |
2030 |
+ |
2031 |
+ if (only_iv) { |
2032 |
+diff --git a/net/netfilter/nft_tunnel.c b/net/netfilter/nft_tunnel.c |
2033 |
+index 09441bbb0166..e5444f3ff43f 100644 |
2034 |
+--- a/net/netfilter/nft_tunnel.c |
2035 |
++++ b/net/netfilter/nft_tunnel.c |
2036 |
+@@ -235,6 +235,9 @@ static int nft_tunnel_obj_erspan_init(const struct nlattr *attr, |
2037 |
+ if (err < 0) |
2038 |
+ return err; |
2039 |
+ |
2040 |
++ if (!tb[NFTA_TUNNEL_KEY_ERSPAN_VERSION]) |
2041 |
++ return -EINVAL; |
2042 |
++ |
2043 |
+ version = ntohl(nla_get_be32(tb[NFTA_TUNNEL_KEY_ERSPAN_VERSION])); |
2044 |
+ switch (version) { |
2045 |
+ case ERSPAN_VERSION: |
2046 |
+diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h |
2047 |
+index 4cff76f33d45..a8c58aeb9dde 100644 |
2048 |
+--- a/net/wireless/rdev-ops.h |
2049 |
++++ b/net/wireless/rdev-ops.h |
2050 |
+@@ -1170,6 +1170,16 @@ rdev_start_radar_detection(struct cfg80211_registered_device *rdev, |
2051 |
+ return ret; |
2052 |
+ } |
2053 |
+ |
2054 |
++static inline void |
2055 |
++rdev_end_cac(struct cfg80211_registered_device *rdev, |
2056 |
++ struct net_device *dev) |
2057 |
++{ |
2058 |
++ trace_rdev_end_cac(&rdev->wiphy, dev); |
2059 |
++ if (rdev->ops->end_cac) |
2060 |
++ rdev->ops->end_cac(&rdev->wiphy, dev); |
2061 |
++ trace_rdev_return_void(&rdev->wiphy); |
2062 |
++} |
2063 |
++ |
2064 |
+ static inline int |
2065 |
+ rdev_set_mcast_rate(struct cfg80211_registered_device *rdev, |
2066 |
+ struct net_device *dev, |
2067 |
+diff --git a/net/wireless/reg.c b/net/wireless/reg.c |
2068 |
+index 5643bdee7198..018c60be153a 100644 |
2069 |
+--- a/net/wireless/reg.c |
2070 |
++++ b/net/wireless/reg.c |
2071 |
+@@ -2254,14 +2254,15 @@ static void update_all_wiphy_regulatory(enum nl80211_reg_initiator initiator) |
2072 |
+ |
2073 |
+ static void handle_channel_custom(struct wiphy *wiphy, |
2074 |
+ struct ieee80211_channel *chan, |
2075 |
+- const struct ieee80211_regdomain *regd) |
2076 |
++ const struct ieee80211_regdomain *regd, |
2077 |
++ u32 min_bw) |
2078 |
+ { |
2079 |
+ u32 bw_flags = 0; |
2080 |
+ const struct ieee80211_reg_rule *reg_rule = NULL; |
2081 |
+ const struct ieee80211_power_rule *power_rule = NULL; |
2082 |
+ u32 bw; |
2083 |
+ |
2084 |
+- for (bw = MHZ_TO_KHZ(20); bw >= MHZ_TO_KHZ(5); bw = bw / 2) { |
2085 |
++ for (bw = MHZ_TO_KHZ(20); bw >= min_bw; bw = bw / 2) { |
2086 |
+ reg_rule = freq_reg_info_regd(MHZ_TO_KHZ(chan->center_freq), |
2087 |
+ regd, bw); |
2088 |
+ if (!IS_ERR(reg_rule)) |
2089 |
+@@ -2317,8 +2318,14 @@ static void handle_band_custom(struct wiphy *wiphy, |
2090 |
+ if (!sband) |
2091 |
+ return; |
2092 |
+ |
2093 |
++ /* |
2094 |
++ * We currently assume that you always want at least 20 MHz, |
2095 |
++ * otherwise channel 12 might get enabled if this rule is |
2096 |
++ * compatible to US, which permits 2402 - 2472 MHz. |
2097 |
++ */ |
2098 |
+ for (i = 0; i < sband->n_channels; i++) |
2099 |
+- handle_channel_custom(wiphy, &sband->channels[i], regd); |
2100 |
++ handle_channel_custom(wiphy, &sband->channels[i], regd, |
2101 |
++ MHZ_TO_KHZ(20)); |
2102 |
+ } |
2103 |
+ |
2104 |
+ /* Used by drivers prior to wiphy registration */ |
2105 |
+@@ -3833,6 +3840,25 @@ bool regulatory_pre_cac_allowed(struct wiphy *wiphy) |
2106 |
+ return pre_cac_allowed; |
2107 |
+ } |
2108 |
+ |
2109 |
++static void cfg80211_check_and_end_cac(struct cfg80211_registered_device *rdev) |
2110 |
++{ |
2111 |
++ struct wireless_dev *wdev; |
2112 |
++ /* If we finished CAC or received radar, we should end any |
2113 |
++ * CAC running on the same channels. |
2114 |
++ * the check !cfg80211_chandef_dfs_usable contain 2 options: |
2115 |
++ * either all channels are available - those the CAC_FINISHED |
2116 |
++ * event has effected another wdev state, or there is a channel |
2117 |
++ * in unavailable state in wdev chandef - those the RADAR_DETECTED |
2118 |
++ * event has effected another wdev state. |
2119 |
++ * In both cases we should end the CAC on the wdev. |
2120 |
++ */ |
2121 |
++ list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { |
2122 |
++ if (wdev->cac_started && |
2123 |
++ !cfg80211_chandef_dfs_usable(&rdev->wiphy, &wdev->chandef)) |
2124 |
++ rdev_end_cac(rdev, wdev->netdev); |
2125 |
++ } |
2126 |
++} |
2127 |
++ |
2128 |
+ void regulatory_propagate_dfs_state(struct wiphy *wiphy, |
2129 |
+ struct cfg80211_chan_def *chandef, |
2130 |
+ enum nl80211_dfs_state dfs_state, |
2131 |
+@@ -3859,8 +3885,10 @@ void regulatory_propagate_dfs_state(struct wiphy *wiphy, |
2132 |
+ cfg80211_set_dfs_state(&rdev->wiphy, chandef, dfs_state); |
2133 |
+ |
2134 |
+ if (event == NL80211_RADAR_DETECTED || |
2135 |
+- event == NL80211_RADAR_CAC_FINISHED) |
2136 |
++ event == NL80211_RADAR_CAC_FINISHED) { |
2137 |
+ cfg80211_sched_dfs_chan_update(rdev); |
2138 |
++ cfg80211_check_and_end_cac(rdev); |
2139 |
++ } |
2140 |
+ |
2141 |
+ nl80211_radar_notify(rdev, chandef, event, NULL, GFP_KERNEL); |
2142 |
+ } |
2143 |
+diff --git a/net/wireless/trace.h b/net/wireless/trace.h |
2144 |
+index 7c73510b161f..54b0bb344cf9 100644 |
2145 |
+--- a/net/wireless/trace.h |
2146 |
++++ b/net/wireless/trace.h |
2147 |
+@@ -607,6 +607,11 @@ DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa, |
2148 |
+ TP_ARGS(wiphy, netdev) |
2149 |
+ ); |
2150 |
+ |
2151 |
++DEFINE_EVENT(wiphy_netdev_evt, rdev_end_cac, |
2152 |
++ TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), |
2153 |
++ TP_ARGS(wiphy, netdev) |
2154 |
++); |
2155 |
++ |
2156 |
+ DECLARE_EVENT_CLASS(station_add_change, |
2157 |
+ TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, |
2158 |
+ struct station_parameters *params), |
2159 |
+diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c |
2160 |
+index 5e677dac2a0c..69102fda9ebd 100644 |
2161 |
+--- a/net/wireless/wext-core.c |
2162 |
++++ b/net/wireless/wext-core.c |
2163 |
+@@ -657,7 +657,8 @@ struct iw_statistics *get_wireless_stats(struct net_device *dev) |
2164 |
+ return NULL; |
2165 |
+ } |
2166 |
+ |
2167 |
+-static int iw_handler_get_iwstats(struct net_device * dev, |
2168 |
++/* noinline to avoid a bogus warning with -O3 */ |
2169 |
++static noinline int iw_handler_get_iwstats(struct net_device * dev, |
2170 |
+ struct iw_request_info * info, |
2171 |
+ union iwreq_data * wrqu, |
2172 |
+ char * extra) |
2173 |
+diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c |
2174 |
+index 4ee512622e93..317fe9c92932 100644 |
2175 |
+--- a/net/xfrm/xfrm_interface.c |
2176 |
++++ b/net/xfrm/xfrm_interface.c |
2177 |
+@@ -268,9 +268,6 @@ xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl) |
2178 |
+ int err = -1; |
2179 |
+ int mtu; |
2180 |
+ |
2181 |
+- if (!dst) |
2182 |
+- goto tx_err_link_failure; |
2183 |
+- |
2184 |
+ dst_hold(dst); |
2185 |
+ dst = xfrm_lookup_with_ifid(xi->net, dst, fl, NULL, 0, xi->p.if_id); |
2186 |
+ if (IS_ERR(dst)) { |
2187 |
+@@ -297,7 +294,7 @@ xfrmi_xmit2(struct sk_buff *skb, struct net_device *dev, struct flowi *fl) |
2188 |
+ |
2189 |
+ mtu = dst_mtu(dst); |
2190 |
+ if (!skb->ignore_df && skb->len > mtu) { |
2191 |
+- skb_dst_update_pmtu(skb, mtu); |
2192 |
++ skb_dst_update_pmtu_no_confirm(skb, mtu); |
2193 |
+ |
2194 |
+ if (skb->protocol == htons(ETH_P_IPV6)) { |
2195 |
+ if (mtu < IPV6_MIN_MTU) |
2196 |
+@@ -343,6 +340,7 @@ static netdev_tx_t xfrmi_xmit(struct sk_buff *skb, struct net_device *dev) |
2197 |
+ { |
2198 |
+ struct xfrm_if *xi = netdev_priv(dev); |
2199 |
+ struct net_device_stats *stats = &xi->dev->stats; |
2200 |
++ struct dst_entry *dst = skb_dst(skb); |
2201 |
+ struct flowi fl; |
2202 |
+ int ret; |
2203 |
+ |
2204 |
+@@ -352,10 +350,33 @@ static netdev_tx_t xfrmi_xmit(struct sk_buff *skb, struct net_device *dev) |
2205 |
+ case htons(ETH_P_IPV6): |
2206 |
+ xfrm_decode_session(skb, &fl, AF_INET6); |
2207 |
+ memset(IP6CB(skb), 0, sizeof(*IP6CB(skb))); |
2208 |
++ if (!dst) { |
2209 |
++ fl.u.ip6.flowi6_oif = dev->ifindex; |
2210 |
++ fl.u.ip6.flowi6_flags |= FLOWI_FLAG_ANYSRC; |
2211 |
++ dst = ip6_route_output(dev_net(dev), NULL, &fl.u.ip6); |
2212 |
++ if (dst->error) { |
2213 |
++ dst_release(dst); |
2214 |
++ stats->tx_carrier_errors++; |
2215 |
++ goto tx_err; |
2216 |
++ } |
2217 |
++ skb_dst_set(skb, dst); |
2218 |
++ } |
2219 |
+ break; |
2220 |
+ case htons(ETH_P_IP): |
2221 |
+ xfrm_decode_session(skb, &fl, AF_INET); |
2222 |
+ memset(IPCB(skb), 0, sizeof(*IPCB(skb))); |
2223 |
++ if (!dst) { |
2224 |
++ struct rtable *rt; |
2225 |
++ |
2226 |
++ fl.u.ip4.flowi4_oif = dev->ifindex; |
2227 |
++ fl.u.ip4.flowi4_flags |= FLOWI_FLAG_ANYSRC; |
2228 |
++ rt = __ip_route_output_key(dev_net(dev), &fl.u.ip4); |
2229 |
++ if (IS_ERR(rt)) { |
2230 |
++ stats->tx_carrier_errors++; |
2231 |
++ goto tx_err; |
2232 |
++ } |
2233 |
++ skb_dst_set(skb, &rt->dst); |
2234 |
++ } |
2235 |
+ break; |
2236 |
+ default: |
2237 |
+ goto tx_err; |
2238 |
+@@ -566,12 +587,9 @@ static void xfrmi_dev_setup(struct net_device *dev) |
2239 |
+ { |
2240 |
+ dev->netdev_ops = &xfrmi_netdev_ops; |
2241 |
+ dev->type = ARPHRD_NONE; |
2242 |
+- dev->hard_header_len = ETH_HLEN; |
2243 |
+- dev->min_header_len = ETH_HLEN; |
2244 |
+ dev->mtu = ETH_DATA_LEN; |
2245 |
+ dev->min_mtu = ETH_MIN_MTU; |
2246 |
+- dev->max_mtu = ETH_DATA_LEN; |
2247 |
+- dev->addr_len = ETH_ALEN; |
2248 |
++ dev->max_mtu = IP_MAX_MTU; |
2249 |
+ dev->flags = IFF_NOARP; |
2250 |
+ dev->needs_free_netdev = true; |
2251 |
+ dev->priv_destructor = xfrmi_dev_free; |
2252 |
+diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c |
2253 |
+index 03923a138ef5..ca0c98240e0d 100644 |
2254 |
+--- a/security/tomoyo/common.c |
2255 |
++++ b/security/tomoyo/common.c |
2256 |
+@@ -2254,9 +2254,9 @@ static const char * const tomoyo_memory_headers[TOMOYO_MAX_MEMORY_STAT] = { |
2257 |
+ [TOMOYO_MEMORY_QUERY] = "query message:", |
2258 |
+ }; |
2259 |
+ |
2260 |
+-/* Timestamp counter for last updated. */ |
2261 |
+-static unsigned int tomoyo_stat_updated[TOMOYO_MAX_POLICY_STAT]; |
2262 |
+ /* Counter for number of updates. */ |
2263 |
++static atomic_t tomoyo_stat_updated[TOMOYO_MAX_POLICY_STAT]; |
2264 |
++/* Timestamp counter for last updated. */ |
2265 |
+ static time64_t tomoyo_stat_modified[TOMOYO_MAX_POLICY_STAT]; |
2266 |
+ |
2267 |
+ /** |
2268 |
+@@ -2268,10 +2268,7 @@ static time64_t tomoyo_stat_modified[TOMOYO_MAX_POLICY_STAT]; |
2269 |
+ */ |
2270 |
+ void tomoyo_update_stat(const u8 index) |
2271 |
+ { |
2272 |
+- /* |
2273 |
+- * I don't use atomic operations because race condition is not fatal. |
2274 |
+- */ |
2275 |
+- tomoyo_stat_updated[index]++; |
2276 |
++ atomic_inc(&tomoyo_stat_updated[index]); |
2277 |
+ tomoyo_stat_modified[index] = ktime_get_real_seconds(); |
2278 |
+ } |
2279 |
+ |
2280 |
+@@ -2291,7 +2288,7 @@ static void tomoyo_read_stat(struct tomoyo_io_buffer *head) |
2281 |
+ for (i = 0; i < TOMOYO_MAX_POLICY_STAT; i++) { |
2282 |
+ tomoyo_io_printf(head, "Policy %-30s %10u", |
2283 |
+ tomoyo_policy_headers[i], |
2284 |
+- tomoyo_stat_updated[i]); |
2285 |
++ atomic_read(&tomoyo_stat_updated[i])); |
2286 |
+ if (tomoyo_stat_modified[i]) { |
2287 |
+ struct tomoyo_time stamp; |
2288 |
+ tomoyo_convert_time(tomoyo_stat_modified[i], &stamp); |
2289 |
+diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c |
2290 |
+index 27770143ae8f..974e1a449172 100644 |
2291 |
+--- a/sound/soc/codecs/rt5640.c |
2292 |
++++ b/sound/soc/codecs/rt5640.c |
2293 |
+@@ -2435,6 +2435,13 @@ static void rt5640_disable_jack_detect(struct snd_soc_component *component) |
2294 |
+ { |
2295 |
+ struct rt5640_priv *rt5640 = snd_soc_component_get_drvdata(component); |
2296 |
+ |
2297 |
++ /* |
2298 |
++ * soc_remove_component() force-disables jack and thus rt5640->jack |
2299 |
++ * could be NULL at the time of driver's module unloading. |
2300 |
++ */ |
2301 |
++ if (!rt5640->jack) |
2302 |
++ return; |
2303 |
++ |
2304 |
+ disable_irq(rt5640->irq); |
2305 |
+ rt5640_cancel_work(rt5640); |
2306 |
+ |
2307 |
+diff --git a/sound/soc/sti/uniperif_player.c b/sound/soc/sti/uniperif_player.c |
2308 |
+index 313dab2857ef..4b0beb372cd9 100644 |
2309 |
+--- a/sound/soc/sti/uniperif_player.c |
2310 |
++++ b/sound/soc/sti/uniperif_player.c |
2311 |
+@@ -226,7 +226,6 @@ static void uni_player_set_channel_status(struct uniperif *player, |
2312 |
+ * sampling frequency. If no sample rate is already specified, then |
2313 |
+ * set one. |
2314 |
+ */ |
2315 |
+- mutex_lock(&player->ctrl_lock); |
2316 |
+ if (runtime) { |
2317 |
+ switch (runtime->rate) { |
2318 |
+ case 22050: |
2319 |
+@@ -303,7 +302,6 @@ static void uni_player_set_channel_status(struct uniperif *player, |
2320 |
+ player->stream_settings.iec958.status[3 + (n * 4)] << 24; |
2321 |
+ SET_UNIPERIF_CHANNEL_STA_REGN(player, n, status); |
2322 |
+ } |
2323 |
+- mutex_unlock(&player->ctrl_lock); |
2324 |
+ |
2325 |
+ /* Update the channel status */ |
2326 |
+ if (player->ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0) |
2327 |
+@@ -365,8 +363,10 @@ static int uni_player_prepare_iec958(struct uniperif *player, |
2328 |
+ |
2329 |
+ SET_UNIPERIF_CTRL_ZERO_STUFF_HW(player); |
2330 |
+ |
2331 |
++ mutex_lock(&player->ctrl_lock); |
2332 |
+ /* Update the channel status */ |
2333 |
+ uni_player_set_channel_status(player, runtime); |
2334 |
++ mutex_unlock(&player->ctrl_lock); |
2335 |
+ |
2336 |
+ /* Clear the user validity user bits */ |
2337 |
+ SET_UNIPERIF_USER_VALIDITY_VALIDITY_LR(player, 0); |
2338 |
+@@ -598,7 +598,6 @@ static int uni_player_ctl_iec958_put(struct snd_kcontrol *kcontrol, |
2339 |
+ iec958->status[1] = ucontrol->value.iec958.status[1]; |
2340 |
+ iec958->status[2] = ucontrol->value.iec958.status[2]; |
2341 |
+ iec958->status[3] = ucontrol->value.iec958.status[3]; |
2342 |
+- mutex_unlock(&player->ctrl_lock); |
2343 |
+ |
2344 |
+ spin_lock_irqsave(&player->irq_lock, flags); |
2345 |
+ if (player->substream && player->substream->runtime) |
2346 |
+@@ -608,6 +607,8 @@ static int uni_player_ctl_iec958_put(struct snd_kcontrol *kcontrol, |
2347 |
+ uni_player_set_channel_status(player, NULL); |
2348 |
+ |
2349 |
+ spin_unlock_irqrestore(&player->irq_lock, flags); |
2350 |
++ mutex_unlock(&player->ctrl_lock); |
2351 |
++ |
2352 |
+ return 0; |
2353 |
+ } |
2354 |
+ |
2355 |
+diff --git a/tools/include/linux/string.h b/tools/include/linux/string.h |
2356 |
+index 6c3e2cc274c5..0ec646f127dc 100644 |
2357 |
+--- a/tools/include/linux/string.h |
2358 |
++++ b/tools/include/linux/string.h |
2359 |
+@@ -14,7 +14,15 @@ int strtobool(const char *s, bool *res); |
2360 |
+ * However uClibc headers also define __GLIBC__ hence the hack below |
2361 |
+ */ |
2362 |
+ #if defined(__GLIBC__) && !defined(__UCLIBC__) |
2363 |
++// pragma diagnostic was introduced in gcc 4.6 |
2364 |
++#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) |
2365 |
++#pragma GCC diagnostic push |
2366 |
++#pragma GCC diagnostic ignored "-Wredundant-decls" |
2367 |
++#endif |
2368 |
+ extern size_t strlcpy(char *dest, const char *src, size_t size); |
2369 |
++#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) |
2370 |
++#pragma GCC diagnostic pop |
2371 |
++#endif |
2372 |
+ #endif |
2373 |
+ |
2374 |
+ char *str_error_r(int errnum, char *buf, size_t buflen); |
2375 |
+diff --git a/tools/lib/string.c b/tools/lib/string.c |
2376 |
+index 93b3d4b6feac..ee0afcbdd696 100644 |
2377 |
+--- a/tools/lib/string.c |
2378 |
++++ b/tools/lib/string.c |
2379 |
+@@ -95,6 +95,10 @@ int strtobool(const char *s, bool *res) |
2380 |
+ * If libc has strlcpy() then that version will override this |
2381 |
+ * implementation: |
2382 |
+ */ |
2383 |
++#ifdef __clang__ |
2384 |
++#pragma clang diagnostic push |
2385 |
++#pragma clang diagnostic ignored "-Wignored-attributes" |
2386 |
++#endif |
2387 |
+ size_t __weak strlcpy(char *dest, const char *src, size_t size) |
2388 |
+ { |
2389 |
+ size_t ret = strlen(src); |
2390 |
+@@ -106,3 +110,6 @@ size_t __weak strlcpy(char *dest, const char *src, size_t size) |
2391 |
+ } |
2392 |
+ return ret; |
2393 |
+ } |
2394 |
++#ifdef __clang__ |
2395 |
++#pragma clang diagnostic pop |
2396 |
++#endif |
2397 |
+diff --git a/tools/lib/traceevent/parse-filter.c b/tools/lib/traceevent/parse-filter.c |
2398 |
+index 2700f1f17876..27248a0aad84 100644 |
2399 |
+--- a/tools/lib/traceevent/parse-filter.c |
2400 |
++++ b/tools/lib/traceevent/parse-filter.c |
2401 |
+@@ -1227,8 +1227,10 @@ filter_event(struct event_filter *filter, struct event_format *event, |
2402 |
+ } |
2403 |
+ |
2404 |
+ filter_type = add_filter_type(filter, event->id); |
2405 |
+- if (filter_type == NULL) |
2406 |
++ if (filter_type == NULL) { |
2407 |
++ free_arg(arg); |
2408 |
+ return TEP_ERRNO__MEM_ALLOC_FAILED; |
2409 |
++ } |
2410 |
+ |
2411 |
+ if (filter_type->filter) |
2412 |
+ free_arg(filter_type->filter); |
2413 |
+diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c |
2414 |
+index 1452e5153c60..2bd39fdc8ab0 100644 |
2415 |
+--- a/tools/perf/builtin-c2c.c |
2416 |
++++ b/tools/perf/builtin-c2c.c |
2417 |
+@@ -586,8 +586,8 @@ tot_hitm_cmp(struct perf_hpp_fmt *fmt __maybe_unused, |
2418 |
+ { |
2419 |
+ struct c2c_hist_entry *c2c_left; |
2420 |
+ struct c2c_hist_entry *c2c_right; |
2421 |
+- unsigned int tot_hitm_left; |
2422 |
+- unsigned int tot_hitm_right; |
2423 |
++ uint64_t tot_hitm_left; |
2424 |
++ uint64_t tot_hitm_right; |
2425 |
+ |
2426 |
+ c2c_left = container_of(left, struct c2c_hist_entry, he); |
2427 |
+ c2c_right = container_of(right, struct c2c_hist_entry, he); |
2428 |
+@@ -620,7 +620,8 @@ __f ## _cmp(struct perf_hpp_fmt *fmt __maybe_unused, \ |
2429 |
+ \ |
2430 |
+ c2c_left = container_of(left, struct c2c_hist_entry, he); \ |
2431 |
+ c2c_right = container_of(right, struct c2c_hist_entry, he); \ |
2432 |
+- return c2c_left->stats.__f - c2c_right->stats.__f; \ |
2433 |
++ return (uint64_t) c2c_left->stats.__f - \ |
2434 |
++ (uint64_t) c2c_right->stats.__f; \ |
2435 |
+ } |
2436 |
+ |
2437 |
+ #define STAT_FN(__f) \ |
2438 |
+@@ -673,7 +674,8 @@ ld_llcmiss_cmp(struct perf_hpp_fmt *fmt __maybe_unused, |
2439 |
+ c2c_left = container_of(left, struct c2c_hist_entry, he); |
2440 |
+ c2c_right = container_of(right, struct c2c_hist_entry, he); |
2441 |
+ |
2442 |
+- return llc_miss(&c2c_left->stats) - llc_miss(&c2c_right->stats); |
2443 |
++ return (uint64_t) llc_miss(&c2c_left->stats) - |
2444 |
++ (uint64_t) llc_miss(&c2c_right->stats); |
2445 |
+ } |
2446 |
+ |
2447 |
+ static uint64_t total_records(struct c2c_stats *stats) |
2448 |
+diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c |
2449 |
+index b2b6a9672544..5312c761a5db 100644 |
2450 |
+--- a/tools/perf/builtin-report.c |
2451 |
++++ b/tools/perf/builtin-report.c |
2452 |
+@@ -383,10 +383,10 @@ static int report__setup_sample_type(struct report *rep) |
2453 |
+ PERF_SAMPLE_BRANCH_ANY)) |
2454 |
+ rep->nonany_branch_mode = true; |
2455 |
+ |
2456 |
+-#ifndef HAVE_LIBUNWIND_SUPPORT |
2457 |
++#if !defined(HAVE_LIBUNWIND_SUPPORT) && !defined(HAVE_DWARF_SUPPORT) |
2458 |
+ if (dwarf_callchain_users) { |
2459 |
+- ui__warning("Please install libunwind development packages " |
2460 |
+- "during the perf build.\n"); |
2461 |
++ ui__warning("Please install libunwind or libdw " |
2462 |
++ "development packages during the perf build.\n"); |
2463 |
+ } |
2464 |
+ #endif |
2465 |
+ |