1 |
commit: baad0da04bee1fda784022d9905bbc36e7fbde46 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 30 14:13:21 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 30 14:13:21 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=baad0da0 |
7 |
|
8 |
Linux patch 4.4.264 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1263_linux-4.4.264.patch | 912 +++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 916 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 01ee91c..5125e01 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -1095,6 +1095,10 @@ Patch: 1262_linux-4.4.263.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 4.4.263 |
23 |
|
24 |
+Patch: 1263_linux-4.4.264.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 4.4.264 |
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/1263_linux-4.4.264.patch b/1263_linux-4.4.264.patch |
33 |
new file mode 100644 |
34 |
index 0000000..ddb1ac0 |
35 |
--- /dev/null |
36 |
+++ b/1263_linux-4.4.264.patch |
37 |
@@ -0,0 +1,912 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 3f578adbe7fe6..54115c5ca4e29 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,6 +1,6 @@ |
43 |
+ VERSION = 4 |
44 |
+ PATCHLEVEL = 4 |
45 |
+-SUBLEVEL = 263 |
46 |
++SUBLEVEL = 264 |
47 |
+ EXTRAVERSION = |
48 |
+ NAME = Blurry Fish Butt |
49 |
+ |
50 |
+diff --git a/arch/ia64/include/asm/syscall.h b/arch/ia64/include/asm/syscall.h |
51 |
+index 1d0b875fec44f..ec909eec0b4c6 100644 |
52 |
+--- a/arch/ia64/include/asm/syscall.h |
53 |
++++ b/arch/ia64/include/asm/syscall.h |
54 |
+@@ -35,7 +35,7 @@ static inline void syscall_rollback(struct task_struct *task, |
55 |
+ static inline long syscall_get_error(struct task_struct *task, |
56 |
+ struct pt_regs *regs) |
57 |
+ { |
58 |
+- return regs->r10 == -1 ? regs->r8:0; |
59 |
++ return regs->r10 == -1 ? -regs->r8:0; |
60 |
+ } |
61 |
+ |
62 |
+ static inline long syscall_get_return_value(struct task_struct *task, |
63 |
+diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c |
64 |
+index 6f54d511cc509..a757b123ebafc 100644 |
65 |
+--- a/arch/ia64/kernel/ptrace.c |
66 |
++++ b/arch/ia64/kernel/ptrace.c |
67 |
+@@ -2140,27 +2140,39 @@ static void syscall_get_set_args_cb(struct unw_frame_info *info, void *data) |
68 |
+ { |
69 |
+ struct syscall_get_set_args *args = data; |
70 |
+ struct pt_regs *pt = args->regs; |
71 |
+- unsigned long *krbs, cfm, ndirty; |
72 |
++ unsigned long *krbs, cfm, ndirty, nlocals, nouts; |
73 |
+ int i, count; |
74 |
+ |
75 |
+ if (unw_unwind_to_user(info) < 0) |
76 |
+ return; |
77 |
+ |
78 |
++ /* |
79 |
++ * We get here via a few paths: |
80 |
++ * - break instruction: cfm is shared with caller. |
81 |
++ * syscall args are in out= regs, locals are non-empty. |
82 |
++ * - epsinstruction: cfm is set by br.call |
83 |
++ * locals don't exist. |
84 |
++ * |
85 |
++ * For both cases argguments are reachable in cfm.sof - cfm.sol. |
86 |
++ * CFM: [ ... | sor: 17..14 | sol : 13..7 | sof : 6..0 ] |
87 |
++ */ |
88 |
+ cfm = pt->cr_ifs; |
89 |
++ nlocals = (cfm >> 7) & 0x7f; /* aka sol */ |
90 |
++ nouts = (cfm & 0x7f) - nlocals; /* aka sof - sol */ |
91 |
+ krbs = (unsigned long *)info->task + IA64_RBS_OFFSET/8; |
92 |
+ ndirty = ia64_rse_num_regs(krbs, krbs + (pt->loadrs >> 19)); |
93 |
+ |
94 |
+ count = 0; |
95 |
+ if (in_syscall(pt)) |
96 |
+- count = min_t(int, args->n, cfm & 0x7f); |
97 |
++ count = min_t(int, args->n, nouts); |
98 |
+ |
99 |
++ /* Iterate over outs. */ |
100 |
+ for (i = 0; i < count; i++) { |
101 |
++ int j = ndirty + nlocals + i + args->i; |
102 |
+ if (args->rw) |
103 |
+- *ia64_rse_skip_regs(krbs, ndirty + i + args->i) = |
104 |
+- args->args[i]; |
105 |
++ *ia64_rse_skip_regs(krbs, j) = args->args[i]; |
106 |
+ else |
107 |
+- args->args[i] = *ia64_rse_skip_regs(krbs, |
108 |
+- ndirty + i + args->i); |
109 |
++ args->args[i] = *ia64_rse_skip_regs(krbs, j); |
110 |
+ } |
111 |
+ |
112 |
+ if (!args->rw) { |
113 |
+diff --git a/arch/powerpc/include/asm/dcr-native.h b/arch/powerpc/include/asm/dcr-native.h |
114 |
+index 4efc11dacb980..4494d5e1932f4 100644 |
115 |
+--- a/arch/powerpc/include/asm/dcr-native.h |
116 |
++++ b/arch/powerpc/include/asm/dcr-native.h |
117 |
+@@ -64,8 +64,8 @@ static inline void mtdcrx(unsigned int reg, unsigned int val) |
118 |
+ #define mfdcr(rn) \ |
119 |
+ ({unsigned int rval; \ |
120 |
+ if (__builtin_constant_p(rn) && rn < 1024) \ |
121 |
+- asm volatile("mfdcr %0," __stringify(rn) \ |
122 |
+- : "=r" (rval)); \ |
123 |
++ asm volatile("mfdcr %0, %1" : "=r" (rval) \ |
124 |
++ : "n" (rn)); \ |
125 |
+ else if (likely(cpu_has_feature(CPU_FTR_INDEXED_DCR))) \ |
126 |
+ rval = mfdcrx(rn); \ |
127 |
+ else \ |
128 |
+@@ -75,8 +75,8 @@ static inline void mtdcrx(unsigned int reg, unsigned int val) |
129 |
+ #define mtdcr(rn, v) \ |
130 |
+ do { \ |
131 |
+ if (__builtin_constant_p(rn) && rn < 1024) \ |
132 |
+- asm volatile("mtdcr " __stringify(rn) ",%0" \ |
133 |
+- : : "r" (v)); \ |
134 |
++ asm volatile("mtdcr %0, %1" \ |
135 |
++ : : "n" (rn), "r" (v)); \ |
136 |
+ else if (likely(cpu_has_feature(CPU_FTR_INDEXED_DCR))) \ |
137 |
+ mtdcrx(rn, v); \ |
138 |
+ else \ |
139 |
+diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h |
140 |
+index 8dab88b85785a..33a594f728de5 100644 |
141 |
+--- a/arch/x86/include/asm/tlbflush.h |
142 |
++++ b/arch/x86/include/asm/tlbflush.h |
143 |
+@@ -245,12 +245,15 @@ static inline void __native_flush_tlb_single(unsigned long addr) |
144 |
+ * ASID. But, userspace flushes are probably much more |
145 |
+ * important performance-wise. |
146 |
+ * |
147 |
+- * Make sure to do only a single invpcid when KAISER is |
148 |
+- * disabled and we have only a single ASID. |
149 |
++ * In the KAISER disabled case, do an INVLPG to make sure |
150 |
++ * the mapping is flushed in case it is a global one. |
151 |
+ */ |
152 |
+- if (kaiser_enabled) |
153 |
++ if (kaiser_enabled) { |
154 |
+ invpcid_flush_one(X86_CR3_PCID_ASID_USER, addr); |
155 |
+- invpcid_flush_one(X86_CR3_PCID_ASID_KERN, addr); |
156 |
++ invpcid_flush_one(X86_CR3_PCID_ASID_KERN, addr); |
157 |
++ } else { |
158 |
++ asm volatile("invlpg (%0)" ::"r" (addr) : "memory"); |
159 |
++ } |
160 |
+ } |
161 |
+ |
162 |
+ static inline void __flush_tlb_all(void) |
163 |
+diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c |
164 |
+index 340a1ee79d280..3d5ad2bc809b6 100644 |
165 |
+--- a/drivers/atm/eni.c |
166 |
++++ b/drivers/atm/eni.c |
167 |
+@@ -2278,7 +2278,8 @@ out: |
168 |
+ return rc; |
169 |
+ |
170 |
+ err_eni_release: |
171 |
+- eni_do_release(dev); |
172 |
++ dev->phy = NULL; |
173 |
++ iounmap(ENI_DEV(dev)->ioaddr); |
174 |
+ err_unregister: |
175 |
+ atm_dev_deregister(dev); |
176 |
+ err_free_consistent: |
177 |
+diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c |
178 |
+index feb023d7eebd6..40644670cff26 100644 |
179 |
+--- a/drivers/atm/idt77105.c |
180 |
++++ b/drivers/atm/idt77105.c |
181 |
+@@ -261,7 +261,7 @@ static int idt77105_start(struct atm_dev *dev) |
182 |
+ { |
183 |
+ unsigned long flags; |
184 |
+ |
185 |
+- if (!(dev->dev_data = kmalloc(sizeof(struct idt77105_priv),GFP_KERNEL))) |
186 |
++ if (!(dev->phy_data = kmalloc(sizeof(struct idt77105_priv),GFP_KERNEL))) |
187 |
+ return -ENOMEM; |
188 |
+ PRIV(dev)->dev = dev; |
189 |
+ spin_lock_irqsave(&idt77105_priv_lock, flags); |
190 |
+@@ -338,7 +338,7 @@ static int idt77105_stop(struct atm_dev *dev) |
191 |
+ else |
192 |
+ idt77105_all = walk->next; |
193 |
+ dev->phy = NULL; |
194 |
+- dev->dev_data = NULL; |
195 |
++ dev->phy_data = NULL; |
196 |
+ kfree(walk); |
197 |
+ break; |
198 |
+ } |
199 |
+diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c |
200 |
+index ce43ae3e87b35..3002b1177005c 100644 |
201 |
+--- a/drivers/atm/lanai.c |
202 |
++++ b/drivers/atm/lanai.c |
203 |
+@@ -2239,6 +2239,7 @@ static int lanai_dev_open(struct atm_dev *atmdev) |
204 |
+ conf1_write(lanai); |
205 |
+ #endif |
206 |
+ iounmap(lanai->base); |
207 |
++ lanai->base = NULL; |
208 |
+ error_pci: |
209 |
+ pci_disable_device(lanai->pci); |
210 |
+ error: |
211 |
+@@ -2251,6 +2252,8 @@ static int lanai_dev_open(struct atm_dev *atmdev) |
212 |
+ static void lanai_dev_close(struct atm_dev *atmdev) |
213 |
+ { |
214 |
+ struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data; |
215 |
++ if (lanai->base==NULL) |
216 |
++ return; |
217 |
+ printk(KERN_INFO DEV_LABEL "(itf %d): shutting down interface\n", |
218 |
+ lanai->number); |
219 |
+ lanai_timed_poll_stop(lanai); |
220 |
+@@ -2560,7 +2563,7 @@ static int lanai_init_one(struct pci_dev *pci, |
221 |
+ struct atm_dev *atmdev; |
222 |
+ int result; |
223 |
+ |
224 |
+- lanai = kmalloc(sizeof(*lanai), GFP_KERNEL); |
225 |
++ lanai = kzalloc(sizeof(*lanai), GFP_KERNEL); |
226 |
+ if (lanai == NULL) { |
227 |
+ printk(KERN_ERR DEV_LABEL |
228 |
+ ": couldn't allocate dev_data structure!\n"); |
229 |
+diff --git a/drivers/atm/uPD98402.c b/drivers/atm/uPD98402.c |
230 |
+index 5120a96b3a894..b2f4e8df15911 100644 |
231 |
+--- a/drivers/atm/uPD98402.c |
232 |
++++ b/drivers/atm/uPD98402.c |
233 |
+@@ -210,7 +210,7 @@ static void uPD98402_int(struct atm_dev *dev) |
234 |
+ static int uPD98402_start(struct atm_dev *dev) |
235 |
+ { |
236 |
+ DPRINTK("phy_start\n"); |
237 |
+- if (!(dev->dev_data = kmalloc(sizeof(struct uPD98402_priv),GFP_KERNEL))) |
238 |
++ if (!(dev->phy_data = kmalloc(sizeof(struct uPD98402_priv),GFP_KERNEL))) |
239 |
+ return -ENOMEM; |
240 |
+ spin_lock_init(&PRIV(dev)->lock); |
241 |
+ memset(&PRIV(dev)->sonet_stats,0,sizeof(struct k_sonet_stats)); |
242 |
+diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c |
243 |
+index f9dfcd8872af0..698a52a96d2df 100644 |
244 |
+--- a/drivers/block/xen-blkback/blkback.c |
245 |
++++ b/drivers/block/xen-blkback/blkback.c |
246 |
+@@ -919,7 +919,7 @@ next: |
247 |
+ out: |
248 |
+ for (i = last_map; i < num; i++) { |
249 |
+ /* Don't zap current batch's valid persistent grants. */ |
250 |
+- if(i >= last_map + segs_to_map) |
251 |
++ if(i >= map_until) |
252 |
+ pages[i]->persistent_gnt = NULL; |
253 |
+ pages[i]->handle = BLKBACK_INVALID_HANDLE; |
254 |
+ } |
255 |
+diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c |
256 |
+index 5012e3ad12256..624f74d03a83a 100644 |
257 |
+--- a/drivers/bus/omap_l3_noc.c |
258 |
++++ b/drivers/bus/omap_l3_noc.c |
259 |
+@@ -285,7 +285,7 @@ static int omap_l3_probe(struct platform_device *pdev) |
260 |
+ */ |
261 |
+ l3->debug_irq = platform_get_irq(pdev, 0); |
262 |
+ ret = devm_request_irq(l3->dev, l3->debug_irq, l3_interrupt_handler, |
263 |
+- 0x0, "l3-dbg-irq", l3); |
264 |
++ IRQF_NO_THREAD, "l3-dbg-irq", l3); |
265 |
+ if (ret) { |
266 |
+ dev_err(l3->dev, "request_irq failed for %d\n", |
267 |
+ l3->debug_irq); |
268 |
+@@ -294,7 +294,7 @@ static int omap_l3_probe(struct platform_device *pdev) |
269 |
+ |
270 |
+ l3->app_irq = platform_get_irq(pdev, 1); |
271 |
+ ret = devm_request_irq(l3->dev, l3->app_irq, l3_interrupt_handler, |
272 |
+- 0x0, "l3-app-irq", l3); |
273 |
++ IRQF_NO_THREAD, "l3-app-irq", l3); |
274 |
+ if (ret) |
275 |
+ dev_err(l3->dev, "request_irq failed for %d\n", l3->app_irq); |
276 |
+ |
277 |
+diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c |
278 |
+index 54fd4d81a3f1f..8d75161854eec 100644 |
279 |
+--- a/drivers/infiniband/hw/cxgb4/cm.c |
280 |
++++ b/drivers/infiniband/hw/cxgb4/cm.c |
281 |
+@@ -3441,13 +3441,13 @@ int c4iw_destroy_listen(struct iw_cm_id *cm_id) |
282 |
+ ep->com.local_addr.ss_family == AF_INET) { |
283 |
+ err = cxgb4_remove_server_filter( |
284 |
+ ep->com.dev->rdev.lldi.ports[0], ep->stid, |
285 |
+- ep->com.dev->rdev.lldi.rxq_ids[0], 0); |
286 |
++ ep->com.dev->rdev.lldi.rxq_ids[0], false); |
287 |
+ } else { |
288 |
+ struct sockaddr_in6 *sin6; |
289 |
+ c4iw_init_wr_wait(&ep->com.wr_wait); |
290 |
+ err = cxgb4_remove_server( |
291 |
+ ep->com.dev->rdev.lldi.ports[0], ep->stid, |
292 |
+- ep->com.dev->rdev.lldi.rxq_ids[0], 0); |
293 |
++ ep->com.dev->rdev.lldi.rxq_ids[0], true); |
294 |
+ if (err) |
295 |
+ goto done; |
296 |
+ err = c4iw_wait_for_reply(&ep->com.dev->rdev, &ep->com.wr_wait, |
297 |
+diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c |
298 |
+index 4ead5a18b7940..c41ab2cb272e7 100644 |
299 |
+--- a/drivers/net/can/c_can/c_can.c |
300 |
++++ b/drivers/net/can/c_can/c_can.c |
301 |
+@@ -212,18 +212,6 @@ static const struct can_bittiming_const c_can_bittiming_const = { |
302 |
+ .brp_inc = 1, |
303 |
+ }; |
304 |
+ |
305 |
+-static inline void c_can_pm_runtime_enable(const struct c_can_priv *priv) |
306 |
+-{ |
307 |
+- if (priv->device) |
308 |
+- pm_runtime_enable(priv->device); |
309 |
+-} |
310 |
+- |
311 |
+-static inline void c_can_pm_runtime_disable(const struct c_can_priv *priv) |
312 |
+-{ |
313 |
+- if (priv->device) |
314 |
+- pm_runtime_disable(priv->device); |
315 |
+-} |
316 |
+- |
317 |
+ static inline void c_can_pm_runtime_get_sync(const struct c_can_priv *priv) |
318 |
+ { |
319 |
+ if (priv->device) |
320 |
+@@ -1318,7 +1306,6 @@ static const struct net_device_ops c_can_netdev_ops = { |
321 |
+ |
322 |
+ int register_c_can_dev(struct net_device *dev) |
323 |
+ { |
324 |
+- struct c_can_priv *priv = netdev_priv(dev); |
325 |
+ int err; |
326 |
+ |
327 |
+ /* Deactivate pins to prevent DRA7 DCAN IP from being |
328 |
+@@ -1328,28 +1315,19 @@ int register_c_can_dev(struct net_device *dev) |
329 |
+ */ |
330 |
+ pinctrl_pm_select_sleep_state(dev->dev.parent); |
331 |
+ |
332 |
+- c_can_pm_runtime_enable(priv); |
333 |
+- |
334 |
+ dev->flags |= IFF_ECHO; /* we support local echo */ |
335 |
+ dev->netdev_ops = &c_can_netdev_ops; |
336 |
+ |
337 |
+ err = register_candev(dev); |
338 |
+- if (err) |
339 |
+- c_can_pm_runtime_disable(priv); |
340 |
+- else |
341 |
++ if (!err) |
342 |
+ devm_can_led_init(dev); |
343 |
+- |
344 |
+ return err; |
345 |
+ } |
346 |
+ EXPORT_SYMBOL_GPL(register_c_can_dev); |
347 |
+ |
348 |
+ void unregister_c_can_dev(struct net_device *dev) |
349 |
+ { |
350 |
+- struct c_can_priv *priv = netdev_priv(dev); |
351 |
+- |
352 |
+ unregister_candev(dev); |
353 |
+- |
354 |
+- c_can_pm_runtime_disable(priv); |
355 |
+ } |
356 |
+ EXPORT_SYMBOL_GPL(unregister_c_can_dev); |
357 |
+ |
358 |
+diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c |
359 |
+index d065c0e2d18e6..f3e0b2124a376 100644 |
360 |
+--- a/drivers/net/can/c_can/c_can_pci.c |
361 |
++++ b/drivers/net/can/c_can/c_can_pci.c |
362 |
+@@ -239,12 +239,13 @@ static void c_can_pci_remove(struct pci_dev *pdev) |
363 |
+ { |
364 |
+ struct net_device *dev = pci_get_drvdata(pdev); |
365 |
+ struct c_can_priv *priv = netdev_priv(dev); |
366 |
++ void __iomem *addr = priv->base; |
367 |
+ |
368 |
+ unregister_c_can_dev(dev); |
369 |
+ |
370 |
+ free_c_can_dev(dev); |
371 |
+ |
372 |
+- pci_iounmap(pdev, priv->base); |
373 |
++ pci_iounmap(pdev, addr); |
374 |
+ pci_disable_msi(pdev); |
375 |
+ pci_clear_master(pdev); |
376 |
+ pci_release_regions(pdev); |
377 |
+diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c |
378 |
+index 717530eac70c7..c6a03f565e3fc 100644 |
379 |
+--- a/drivers/net/can/c_can/c_can_platform.c |
380 |
++++ b/drivers/net/can/c_can/c_can_platform.c |
381 |
+@@ -29,6 +29,7 @@ |
382 |
+ #include <linux/list.h> |
383 |
+ #include <linux/io.h> |
384 |
+ #include <linux/platform_device.h> |
385 |
++#include <linux/pm_runtime.h> |
386 |
+ #include <linux/clk.h> |
387 |
+ #include <linux/of.h> |
388 |
+ #include <linux/of_device.h> |
389 |
+@@ -385,6 +386,7 @@ static int c_can_plat_probe(struct platform_device *pdev) |
390 |
+ platform_set_drvdata(pdev, dev); |
391 |
+ SET_NETDEV_DEV(dev, &pdev->dev); |
392 |
+ |
393 |
++ pm_runtime_enable(priv->device); |
394 |
+ ret = register_c_can_dev(dev); |
395 |
+ if (ret) { |
396 |
+ dev_err(&pdev->dev, "registering %s failed (err=%d)\n", |
397 |
+@@ -397,6 +399,7 @@ static int c_can_plat_probe(struct platform_device *pdev) |
398 |
+ return 0; |
399 |
+ |
400 |
+ exit_free_device: |
401 |
++ pm_runtime_disable(priv->device); |
402 |
+ free_c_can_dev(dev); |
403 |
+ exit: |
404 |
+ dev_err(&pdev->dev, "probe failed\n"); |
405 |
+@@ -407,9 +410,10 @@ exit: |
406 |
+ static int c_can_plat_remove(struct platform_device *pdev) |
407 |
+ { |
408 |
+ struct net_device *dev = platform_get_drvdata(pdev); |
409 |
++ struct c_can_priv *priv = netdev_priv(dev); |
410 |
+ |
411 |
+ unregister_c_can_dev(dev); |
412 |
+- |
413 |
++ pm_runtime_disable(priv->device); |
414 |
+ free_c_can_dev(dev); |
415 |
+ |
416 |
+ return 0; |
417 |
+diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c |
418 |
+index 1a79118b008b1..2835aeb11c9fc 100644 |
419 |
+--- a/drivers/net/can/dev.c |
420 |
++++ b/drivers/net/can/dev.c |
421 |
+@@ -1054,6 +1054,7 @@ static void can_dellink(struct net_device *dev, struct list_head *head) |
422 |
+ |
423 |
+ static struct rtnl_link_ops can_link_ops __read_mostly = { |
424 |
+ .kind = "can", |
425 |
++ .netns_refund = true, |
426 |
+ .maxtype = IFLA_CAN_MAX, |
427 |
+ .policy = can_policy, |
428 |
+ .setup = can_setup, |
429 |
+diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c |
430 |
+index 0bd7e71647964..197c27d8f584b 100644 |
431 |
+--- a/drivers/net/can/m_can/m_can.c |
432 |
++++ b/drivers/net/can/m_can/m_can.c |
433 |
+@@ -428,9 +428,6 @@ static int m_can_do_rx_poll(struct net_device *dev, int quota) |
434 |
+ } |
435 |
+ |
436 |
+ while ((rxfs & RXFS_FFL_MASK) && (quota > 0)) { |
437 |
+- if (rxfs & RXFS_RFL) |
438 |
+- netdev_warn(dev, "Rx FIFO 0 Message Lost\n"); |
439 |
+- |
440 |
+ m_can_read_fifo(dev, rxfs); |
441 |
+ |
442 |
+ quota--; |
443 |
+diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c |
444 |
+index 0864f05633a29..a56f4f3a5872c 100644 |
445 |
+--- a/drivers/net/dsa/bcm_sf2.c |
446 |
++++ b/drivers/net/dsa/bcm_sf2.c |
447 |
+@@ -1067,8 +1067,10 @@ static u32 bcm_sf2_sw_get_phy_flags(struct dsa_switch *ds, int port) |
448 |
+ * in bits 15:8 and the patch level in bits 7:0 which is exactly what |
449 |
+ * the REG_PHY_REVISION register layout is. |
450 |
+ */ |
451 |
+- |
452 |
+- return priv->hw_params.gphy_rev; |
453 |
++ if (priv->int_phy_mask & BIT(port)) |
454 |
++ return priv->hw_params.gphy_rev; |
455 |
++ else |
456 |
++ return 0; |
457 |
+ } |
458 |
+ |
459 |
+ static int bcm_sf2_sw_indir_rw(struct dsa_switch *ds, int op, int addr, |
460 |
+diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c |
461 |
+index f9e74461bdc0b..1231816125955 100644 |
462 |
+--- a/drivers/net/ethernet/freescale/fec_ptp.c |
463 |
++++ b/drivers/net/ethernet/freescale/fec_ptp.c |
464 |
+@@ -396,9 +396,16 @@ static int fec_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) |
465 |
+ u64 ns; |
466 |
+ unsigned long flags; |
467 |
+ |
468 |
++ mutex_lock(&adapter->ptp_clk_mutex); |
469 |
++ /* Check the ptp clock */ |
470 |
++ if (!adapter->ptp_clk_on) { |
471 |
++ mutex_unlock(&adapter->ptp_clk_mutex); |
472 |
++ return -EINVAL; |
473 |
++ } |
474 |
+ spin_lock_irqsave(&adapter->tmreg_lock, flags); |
475 |
+ ns = timecounter_read(&adapter->tc); |
476 |
+ spin_unlock_irqrestore(&adapter->tmreg_lock, flags); |
477 |
++ mutex_unlock(&adapter->ptp_clk_mutex); |
478 |
+ |
479 |
+ *ts = ns_to_timespec64(ns); |
480 |
+ |
481 |
+diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c |
482 |
+index 5f7016442ec4f..e486f351a54a3 100644 |
483 |
+--- a/drivers/net/ethernet/intel/e1000e/82571.c |
484 |
++++ b/drivers/net/ethernet/intel/e1000e/82571.c |
485 |
+@@ -917,6 +917,8 @@ static s32 e1000_set_d0_lplu_state_82571(struct e1000_hw *hw, bool active) |
486 |
+ } else { |
487 |
+ data &= ~IGP02E1000_PM_D0_LPLU; |
488 |
+ ret_val = e1e_wphy(hw, IGP02E1000_PHY_POWER_MGMT, data); |
489 |
++ if (ret_val) |
490 |
++ return ret_val; |
491 |
+ /* LPLU and SmartSpeed are mutually exclusive. LPLU is used |
492 |
+ * during Dx states where the power conservation is most |
493 |
+ * important. During driver activity we should enable |
494 |
+diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c |
495 |
+index 3bd0bdbdfa0e1..a8ee20ecb3ad5 100644 |
496 |
+--- a/drivers/net/ethernet/intel/e1000e/netdev.c |
497 |
++++ b/drivers/net/ethernet/intel/e1000e/netdev.c |
498 |
+@@ -5875,15 +5875,19 @@ static void e1000_reset_task(struct work_struct *work) |
499 |
+ struct e1000_adapter *adapter; |
500 |
+ adapter = container_of(work, struct e1000_adapter, reset_task); |
501 |
+ |
502 |
++ rtnl_lock(); |
503 |
+ /* don't run the task if already down */ |
504 |
+- if (test_bit(__E1000_DOWN, &adapter->state)) |
505 |
++ if (test_bit(__E1000_DOWN, &adapter->state)) { |
506 |
++ rtnl_unlock(); |
507 |
+ return; |
508 |
++ } |
509 |
+ |
510 |
+ if (!(adapter->flags & FLAG_RESTART_NOW)) { |
511 |
+ e1000e_dump(adapter); |
512 |
+ e_err("Reset adapter unexpectedly\n"); |
513 |
+ } |
514 |
+ e1000e_reinit_locked(adapter); |
515 |
++ rtnl_unlock(); |
516 |
+ } |
517 |
+ |
518 |
+ /** |
519 |
+diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c |
520 |
+index 5174e0bd75d1e..625336264a44b 100644 |
521 |
+--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c |
522 |
++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c |
523 |
+@@ -1426,6 +1426,7 @@ void qlcnic_83xx_get_minidump_template(struct qlcnic_adapter *adapter) |
524 |
+ |
525 |
+ if (fw_dump->tmpl_hdr == NULL || current_version > prev_version) { |
526 |
+ vfree(fw_dump->tmpl_hdr); |
527 |
++ fw_dump->tmpl_hdr = NULL; |
528 |
+ |
529 |
+ if (qlcnic_83xx_md_check_extended_dump_capability(adapter)) |
530 |
+ extended = !qlcnic_83xx_extend_md_capab(adapter); |
531 |
+@@ -1444,6 +1445,8 @@ void qlcnic_83xx_get_minidump_template(struct qlcnic_adapter *adapter) |
532 |
+ struct qlcnic_83xx_dump_template_hdr *hdr; |
533 |
+ |
534 |
+ hdr = fw_dump->tmpl_hdr; |
535 |
++ if (!hdr) |
536 |
++ return; |
537 |
+ hdr->drv_cap_mask = 0x1f; |
538 |
+ fw_dump->cap_mask = 0x1f; |
539 |
+ dev_info(&pdev->dev, |
540 |
+diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c |
541 |
+index 85f3a2c0d4dde..cc3b025ab7a78 100644 |
542 |
+--- a/drivers/net/ethernet/sun/niu.c |
543 |
++++ b/drivers/net/ethernet/sun/niu.c |
544 |
+@@ -3948,8 +3948,6 @@ static void niu_xmac_interrupt(struct niu *np) |
545 |
+ mp->rx_mcasts += RXMAC_MC_FRM_CNT_COUNT; |
546 |
+ if (val & XRXMAC_STATUS_RXBCAST_CNT_EXP) |
547 |
+ mp->rx_bcasts += RXMAC_BC_FRM_CNT_COUNT; |
548 |
+- if (val & XRXMAC_STATUS_RXBCAST_CNT_EXP) |
549 |
+- mp->rx_bcasts += RXMAC_BC_FRM_CNT_COUNT; |
550 |
+ if (val & XRXMAC_STATUS_RXHIST1_CNT_EXP) |
551 |
+ mp->rx_hist_cnt1 += RXMAC_HIST_CNT1_COUNT; |
552 |
+ if (val & XRXMAC_STATUS_RXHIST2_CNT_EXP) |
553 |
+diff --git a/drivers/net/ethernet/tehuti/tehuti.c b/drivers/net/ethernet/tehuti/tehuti.c |
554 |
+index 14c9d1baa85ce..19c832aaecf06 100644 |
555 |
+--- a/drivers/net/ethernet/tehuti/tehuti.c |
556 |
++++ b/drivers/net/ethernet/tehuti/tehuti.c |
557 |
+@@ -2068,6 +2068,7 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
558 |
+ /*bdx_hw_reset(priv); */ |
559 |
+ if (bdx_read_mac(priv)) { |
560 |
+ pr_err("load MAC address failed\n"); |
561 |
++ err = -EFAULT; |
562 |
+ goto err_out_iomap; |
563 |
+ } |
564 |
+ SET_NETDEV_DEV(ndev, &pdev->dev); |
565 |
+diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c |
566 |
+index ff2270ead2e68..84e0e7f780297 100644 |
567 |
+--- a/drivers/net/usb/cdc-phonet.c |
568 |
++++ b/drivers/net/usb/cdc-phonet.c |
569 |
+@@ -406,6 +406,8 @@ static int usbpn_probe(struct usb_interface *intf, const struct usb_device_id *i |
570 |
+ |
571 |
+ err = register_netdev(dev); |
572 |
+ if (err) { |
573 |
++ /* Set disconnected flag so that disconnect() returns early. */ |
574 |
++ pnd->disconnected = 1; |
575 |
+ usb_driver_release_interface(&usbpn_driver, data_intf); |
576 |
+ goto out; |
577 |
+ } |
578 |
+diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig |
579 |
+index c3428767332c2..55ebf9f4a824e 100644 |
580 |
+--- a/fs/nfs/Kconfig |
581 |
++++ b/fs/nfs/Kconfig |
582 |
+@@ -132,7 +132,7 @@ config PNFS_OBJLAYOUT |
583 |
+ config PNFS_FLEXFILE_LAYOUT |
584 |
+ tristate |
585 |
+ depends on NFS_V4_1 && NFS_V3 |
586 |
+- default m |
587 |
++ default NFS_V4 |
588 |
+ |
589 |
+ config NFS_V4_1_IMPLEMENTATION_ID_DOMAIN |
590 |
+ string "NFSv4.1 Implementation ID Domain" |
591 |
+diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c |
592 |
+index 267126d32ec0f..4a68837e92ea4 100644 |
593 |
+--- a/fs/nfs/nfs3xdr.c |
594 |
++++ b/fs/nfs/nfs3xdr.c |
595 |
+@@ -33,6 +33,7 @@ |
596 |
+ */ |
597 |
+ #define NFS3_fhandle_sz (1+16) |
598 |
+ #define NFS3_fh_sz (NFS3_fhandle_sz) /* shorthand */ |
599 |
++#define NFS3_post_op_fh_sz (1+NFS3_fh_sz) |
600 |
+ #define NFS3_sattr_sz (15) |
601 |
+ #define NFS3_filename_sz (1+(NFS3_MAXNAMLEN>>2)) |
602 |
+ #define NFS3_path_sz (1+(NFS3_MAXPATHLEN>>2)) |
603 |
+@@ -70,7 +71,7 @@ |
604 |
+ #define NFS3_readlinkres_sz (1+NFS3_post_op_attr_sz+1) |
605 |
+ #define NFS3_readres_sz (1+NFS3_post_op_attr_sz+3) |
606 |
+ #define NFS3_writeres_sz (1+NFS3_wcc_data_sz+4) |
607 |
+-#define NFS3_createres_sz (1+NFS3_fh_sz+NFS3_post_op_attr_sz+NFS3_wcc_data_sz) |
608 |
++#define NFS3_createres_sz (1+NFS3_post_op_fh_sz+NFS3_post_op_attr_sz+NFS3_wcc_data_sz) |
609 |
+ #define NFS3_renameres_sz (1+(2 * NFS3_wcc_data_sz)) |
610 |
+ #define NFS3_linkres_sz (1+NFS3_post_op_attr_sz+NFS3_wcc_data_sz) |
611 |
+ #define NFS3_readdirres_sz (1+NFS3_post_op_attr_sz+2) |
612 |
+diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c |
613 |
+index 0c9386978d9d8..92ca753723b5e 100644 |
614 |
+--- a/fs/nfs/nfs4proc.c |
615 |
++++ b/fs/nfs/nfs4proc.c |
616 |
+@@ -4848,6 +4848,9 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl |
617 |
+ unsigned int npages = DIV_ROUND_UP(buflen, PAGE_SIZE); |
618 |
+ int ret, i; |
619 |
+ |
620 |
++ /* You can't remove system.nfs4_acl: */ |
621 |
++ if (buflen == 0) |
622 |
++ return -EINVAL; |
623 |
+ if (!nfs4_server_supports_acls(server)) |
624 |
+ return -EOPNOTSUPP; |
625 |
+ if (npages > ARRAY_SIZE(pages)) |
626 |
+diff --git a/fs/squashfs/export.c b/fs/squashfs/export.c |
627 |
+index d2a806416c3ab..1d406a2094a56 100644 |
628 |
+--- a/fs/squashfs/export.c |
629 |
++++ b/fs/squashfs/export.c |
630 |
+@@ -165,14 +165,18 @@ __le64 *squashfs_read_inode_lookup_table(struct super_block *sb, |
631 |
+ start = le64_to_cpu(table[n]); |
632 |
+ end = le64_to_cpu(table[n + 1]); |
633 |
+ |
634 |
+- if (start >= end || (end - start) > SQUASHFS_METADATA_SIZE) { |
635 |
++ if (start >= end |
636 |
++ || (end - start) > |
637 |
++ (SQUASHFS_METADATA_SIZE + SQUASHFS_BLOCK_OFFSET)) { |
638 |
+ kfree(table); |
639 |
+ return ERR_PTR(-EINVAL); |
640 |
+ } |
641 |
+ } |
642 |
+ |
643 |
+ start = le64_to_cpu(table[indexes - 1]); |
644 |
+- if (start >= lookup_table_start || (lookup_table_start - start) > SQUASHFS_METADATA_SIZE) { |
645 |
++ if (start >= lookup_table_start || |
646 |
++ (lookup_table_start - start) > |
647 |
++ (SQUASHFS_METADATA_SIZE + SQUASHFS_BLOCK_OFFSET)) { |
648 |
+ kfree(table); |
649 |
+ return ERR_PTR(-EINVAL); |
650 |
+ } |
651 |
+diff --git a/fs/squashfs/id.c b/fs/squashfs/id.c |
652 |
+index 8ccc0e3f6ea5a..d2e15baab5378 100644 |
653 |
+--- a/fs/squashfs/id.c |
654 |
++++ b/fs/squashfs/id.c |
655 |
+@@ -110,14 +110,16 @@ __le64 *squashfs_read_id_index_table(struct super_block *sb, |
656 |
+ start = le64_to_cpu(table[n]); |
657 |
+ end = le64_to_cpu(table[n + 1]); |
658 |
+ |
659 |
+- if (start >= end || (end - start) > SQUASHFS_METADATA_SIZE) { |
660 |
++ if (start >= end || (end - start) > |
661 |
++ (SQUASHFS_METADATA_SIZE + SQUASHFS_BLOCK_OFFSET)) { |
662 |
+ kfree(table); |
663 |
+ return ERR_PTR(-EINVAL); |
664 |
+ } |
665 |
+ } |
666 |
+ |
667 |
+ start = le64_to_cpu(table[indexes - 1]); |
668 |
+- if (start >= id_table_start || (id_table_start - start) > SQUASHFS_METADATA_SIZE) { |
669 |
++ if (start >= id_table_start || (id_table_start - start) > |
670 |
++ (SQUASHFS_METADATA_SIZE + SQUASHFS_BLOCK_OFFSET)) { |
671 |
+ kfree(table); |
672 |
+ return ERR_PTR(-EINVAL); |
673 |
+ } |
674 |
+diff --git a/fs/squashfs/squashfs_fs.h b/fs/squashfs/squashfs_fs.h |
675 |
+index e66486366f025..2fd1262cc1bd4 100644 |
676 |
+--- a/fs/squashfs/squashfs_fs.h |
677 |
++++ b/fs/squashfs/squashfs_fs.h |
678 |
+@@ -30,6 +30,7 @@ |
679 |
+ |
680 |
+ /* size of metadata (inode and directory) blocks */ |
681 |
+ #define SQUASHFS_METADATA_SIZE 8192 |
682 |
++#define SQUASHFS_BLOCK_OFFSET 2 |
683 |
+ |
684 |
+ /* default size of block device I/O */ |
685 |
+ #ifdef CONFIG_SQUASHFS_4K_DEVBLK_SIZE |
686 |
+diff --git a/fs/squashfs/xattr_id.c b/fs/squashfs/xattr_id.c |
687 |
+index 3a655d879600c..7f718d2bf3579 100644 |
688 |
+--- a/fs/squashfs/xattr_id.c |
689 |
++++ b/fs/squashfs/xattr_id.c |
690 |
+@@ -122,14 +122,16 @@ __le64 *squashfs_read_xattr_id_table(struct super_block *sb, u64 table_start, |
691 |
+ start = le64_to_cpu(table[n]); |
692 |
+ end = le64_to_cpu(table[n + 1]); |
693 |
+ |
694 |
+- if (start >= end || (end - start) > SQUASHFS_METADATA_SIZE) { |
695 |
++ if (start >= end || (end - start) > |
696 |
++ (SQUASHFS_METADATA_SIZE + SQUASHFS_BLOCK_OFFSET)) { |
697 |
+ kfree(table); |
698 |
+ return ERR_PTR(-EINVAL); |
699 |
+ } |
700 |
+ } |
701 |
+ |
702 |
+ start = le64_to_cpu(table[indexes - 1]); |
703 |
+- if (start >= table_start || (table_start - start) > SQUASHFS_METADATA_SIZE) { |
704 |
++ if (start >= table_start || (table_start - start) > |
705 |
++ (SQUASHFS_METADATA_SIZE + SQUASHFS_BLOCK_OFFSET)) { |
706 |
+ kfree(table); |
707 |
+ return ERR_PTR(-EINVAL); |
708 |
+ } |
709 |
+diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h |
710 |
+index a4ccc3122f938..cfcbc49f4ddfa 100644 |
711 |
+--- a/include/linux/if_macvlan.h |
712 |
++++ b/include/linux/if_macvlan.h |
713 |
+@@ -70,13 +70,14 @@ static inline void macvlan_count_rx(const struct macvlan_dev *vlan, |
714 |
+ if (likely(success)) { |
715 |
+ struct vlan_pcpu_stats *pcpu_stats; |
716 |
+ |
717 |
+- pcpu_stats = this_cpu_ptr(vlan->pcpu_stats); |
718 |
++ pcpu_stats = get_cpu_ptr(vlan->pcpu_stats); |
719 |
+ u64_stats_update_begin(&pcpu_stats->syncp); |
720 |
+ pcpu_stats->rx_packets++; |
721 |
+ pcpu_stats->rx_bytes += len; |
722 |
+ if (multicast) |
723 |
+ pcpu_stats->rx_multicast++; |
724 |
+ u64_stats_update_end(&pcpu_stats->syncp); |
725 |
++ put_cpu_ptr(vlan->pcpu_stats); |
726 |
+ } else { |
727 |
+ this_cpu_inc(vlan->pcpu_stats->rx_errors); |
728 |
+ } |
729 |
+diff --git a/include/linux/u64_stats_sync.h b/include/linux/u64_stats_sync.h |
730 |
+index df89c9bcba7db..7b38288dc2390 100644 |
731 |
+--- a/include/linux/u64_stats_sync.h |
732 |
++++ b/include/linux/u64_stats_sync.h |
733 |
+@@ -68,12 +68,13 @@ struct u64_stats_sync { |
734 |
+ }; |
735 |
+ |
736 |
+ |
737 |
++#if BITS_PER_LONG == 32 && defined(CONFIG_SMP) |
738 |
++#define u64_stats_init(syncp) seqcount_init(&(syncp)->seq) |
739 |
++#else |
740 |
+ static inline void u64_stats_init(struct u64_stats_sync *syncp) |
741 |
+ { |
742 |
+-#if BITS_PER_LONG == 32 && defined(CONFIG_SMP) |
743 |
+- seqcount_init(&syncp->seq); |
744 |
+-#endif |
745 |
+ } |
746 |
++#endif |
747 |
+ |
748 |
+ static inline void u64_stats_update_begin(struct u64_stats_sync *syncp) |
749 |
+ { |
750 |
+diff --git a/include/net/red.h b/include/net/red.h |
751 |
+index 17821f66de111..b3ab5c6bfa83f 100644 |
752 |
+--- a/include/net/red.h |
753 |
++++ b/include/net/red.h |
754 |
+@@ -167,7 +167,8 @@ static inline void red_set_vars(struct red_vars *v) |
755 |
+ v->qcount = -1; |
756 |
+ } |
757 |
+ |
758 |
+-static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog, u8 Scell_log) |
759 |
++static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog, |
760 |
++ u8 Scell_log, u8 *stab) |
761 |
+ { |
762 |
+ if (fls(qth_min) + Wlog > 32) |
763 |
+ return false; |
764 |
+@@ -177,6 +178,13 @@ static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog, u8 Scell_ |
765 |
+ return false; |
766 |
+ if (qth_max < qth_min) |
767 |
+ return false; |
768 |
++ if (stab) { |
769 |
++ int i; |
770 |
++ |
771 |
++ for (i = 0; i < RED_STAB_SIZE; i++) |
772 |
++ if (stab[i] >= 32) |
773 |
++ return false; |
774 |
++ } |
775 |
+ return true; |
776 |
+ } |
777 |
+ |
778 |
+diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h |
779 |
+index 2f87c1ba13de6..baa977247dc92 100644 |
780 |
+--- a/include/net/rtnetlink.h |
781 |
++++ b/include/net/rtnetlink.h |
782 |
+@@ -28,6 +28,7 @@ static inline int rtnl_msg_family(const struct nlmsghdr *nlh) |
783 |
+ * |
784 |
+ * @list: Used internally |
785 |
+ * @kind: Identifier |
786 |
++ * @netns_refund: Physical device, move to init_net on netns exit |
787 |
+ * @maxtype: Highest device specific netlink attribute number |
788 |
+ * @policy: Netlink policy for device specific attribute validation |
789 |
+ * @validate: Optional validation function for netlink/changelink parameters |
790 |
+@@ -81,6 +82,7 @@ struct rtnl_link_ops { |
791 |
+ unsigned int (*get_num_tx_queues)(void); |
792 |
+ unsigned int (*get_num_rx_queues)(void); |
793 |
+ |
794 |
++ bool netns_refund; |
795 |
+ int slave_maxtype; |
796 |
+ const struct nla_policy *slave_policy; |
797 |
+ int (*slave_validate)(struct nlattr *tb[], |
798 |
+diff --git a/net/core/dev.c b/net/core/dev.c |
799 |
+index 59157e9686fb2..6fd356e722118 100644 |
800 |
+--- a/net/core/dev.c |
801 |
++++ b/net/core/dev.c |
802 |
+@@ -7773,7 +7773,7 @@ static void __net_exit default_device_exit(struct net *net) |
803 |
+ continue; |
804 |
+ |
805 |
+ /* Leave virtual devices for the generic cleanup */ |
806 |
+- if (dev->rtnl_link_ops) |
807 |
++ if (dev->rtnl_link_ops && !dev->rtnl_link_ops->netns_refund) |
808 |
+ continue; |
809 |
+ |
810 |
+ /* Push remaining network devices to init_net */ |
811 |
+diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c |
812 |
+index 8360fda24bca0..eac20f4ab9248 100644 |
813 |
+--- a/net/mac80211/cfg.c |
814 |
++++ b/net/mac80211/cfg.c |
815 |
+@@ -2448,14 +2448,14 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, |
816 |
+ continue; |
817 |
+ |
818 |
+ for (j = 0; j < IEEE80211_HT_MCS_MASK_LEN; j++) { |
819 |
+- if (~sdata->rc_rateidx_mcs_mask[i][j]) { |
820 |
++ if (sdata->rc_rateidx_mcs_mask[i][j] != 0xff) { |
821 |
+ sdata->rc_has_mcs_mask[i] = true; |
822 |
+ break; |
823 |
+ } |
824 |
+ } |
825 |
+ |
826 |
+ for (j = 0; j < NL80211_VHT_NSS_MAX; j++) { |
827 |
+- if (~sdata->rc_rateidx_vht_mcs_mask[i][j]) { |
828 |
++ if (sdata->rc_rateidx_vht_mcs_mask[i][j] != 0xffff) { |
829 |
+ sdata->rc_has_vht_mcs_mask[i] = true; |
830 |
+ break; |
831 |
+ } |
832 |
+diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c |
833 |
+index f2af19673b26a..50fa92fe7d246 100644 |
834 |
+--- a/net/mac80211/ibss.c |
835 |
++++ b/net/mac80211/ibss.c |
836 |
+@@ -1860,6 +1860,8 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata) |
837 |
+ |
838 |
+ /* remove beacon */ |
839 |
+ kfree(sdata->u.ibss.ie); |
840 |
++ sdata->u.ibss.ie = NULL; |
841 |
++ sdata->u.ibss.ie_len = 0; |
842 |
+ |
843 |
+ /* on the next join, re-program HT parameters */ |
844 |
+ memset(&ifibss->ht_capa, 0, sizeof(ifibss->ht_capa)); |
845 |
+diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c |
846 |
+index fbdae062b2859..fee59e25929c1 100644 |
847 |
+--- a/net/sched/sch_choke.c |
848 |
++++ b/net/sched/sch_choke.c |
849 |
+@@ -423,6 +423,7 @@ static int choke_change(struct Qdisc *sch, struct nlattr *opt) |
850 |
+ struct sk_buff **old = NULL; |
851 |
+ unsigned int mask; |
852 |
+ u32 max_P; |
853 |
++ u8 *stab; |
854 |
+ |
855 |
+ if (opt == NULL) |
856 |
+ return -EINVAL; |
857 |
+@@ -438,8 +439,8 @@ static int choke_change(struct Qdisc *sch, struct nlattr *opt) |
858 |
+ max_P = tb[TCA_CHOKE_MAX_P] ? nla_get_u32(tb[TCA_CHOKE_MAX_P]) : 0; |
859 |
+ |
860 |
+ ctl = nla_data(tb[TCA_CHOKE_PARMS]); |
861 |
+- |
862 |
+- if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Scell_log)) |
863 |
++ stab = nla_data(tb[TCA_CHOKE_STAB]); |
864 |
++ if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Scell_log, stab)) |
865 |
+ return -EINVAL; |
866 |
+ |
867 |
+ if (ctl->limit > CHOKE_MAX_QUEUE) |
868 |
+@@ -492,7 +493,7 @@ static int choke_change(struct Qdisc *sch, struct nlattr *opt) |
869 |
+ |
870 |
+ red_set_parms(&q->parms, ctl->qth_min, ctl->qth_max, ctl->Wlog, |
871 |
+ ctl->Plog, ctl->Scell_log, |
872 |
+- nla_data(tb[TCA_CHOKE_STAB]), |
873 |
++ stab, |
874 |
+ max_P); |
875 |
+ red_set_vars(&q->vars); |
876 |
+ |
877 |
+diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c |
878 |
+index 7af75caf0703d..2f73232031c63 100644 |
879 |
+--- a/net/sched/sch_gred.c |
880 |
++++ b/net/sched/sch_gred.c |
881 |
+@@ -389,7 +389,7 @@ static inline int gred_change_vq(struct Qdisc *sch, int dp, |
882 |
+ struct gred_sched *table = qdisc_priv(sch); |
883 |
+ struct gred_sched_data *q = table->tab[dp]; |
884 |
+ |
885 |
+- if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Scell_log)) |
886 |
++ if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Scell_log, stab)) |
887 |
+ return -EINVAL; |
888 |
+ |
889 |
+ if (!q) { |
890 |
+diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c |
891 |
+index 842e0b103c3ed..ac85792038c41 100644 |
892 |
+--- a/net/sched/sch_red.c |
893 |
++++ b/net/sched/sch_red.c |
894 |
+@@ -188,6 +188,7 @@ static int red_change(struct Qdisc *sch, struct nlattr *opt) |
895 |
+ struct Qdisc *child = NULL; |
896 |
+ int err; |
897 |
+ u32 max_P; |
898 |
++ u8 *stab; |
899 |
+ |
900 |
+ if (opt == NULL) |
901 |
+ return -EINVAL; |
902 |
+@@ -203,7 +204,9 @@ static int red_change(struct Qdisc *sch, struct nlattr *opt) |
903 |
+ max_P = tb[TCA_RED_MAX_P] ? nla_get_u32(tb[TCA_RED_MAX_P]) : 0; |
904 |
+ |
905 |
+ ctl = nla_data(tb[TCA_RED_PARMS]); |
906 |
+- if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Scell_log)) |
907 |
++ stab = nla_data(tb[TCA_RED_STAB]); |
908 |
++ if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog, |
909 |
++ ctl->Scell_log, stab)) |
910 |
+ return -EINVAL; |
911 |
+ |
912 |
+ if (ctl->limit > 0) { |
913 |
+@@ -225,7 +228,7 @@ static int red_change(struct Qdisc *sch, struct nlattr *opt) |
914 |
+ red_set_parms(&q->parms, |
915 |
+ ctl->qth_min, ctl->qth_max, ctl->Wlog, |
916 |
+ ctl->Plog, ctl->Scell_log, |
917 |
+- nla_data(tb[TCA_RED_STAB]), |
918 |
++ stab, |
919 |
+ max_P); |
920 |
+ red_set_vars(&q->vars); |
921 |
+ |
922 |
+diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c |
923 |
+index 24cf18ebb8740..0b27487fd07d7 100644 |
924 |
+--- a/net/sched/sch_sfq.c |
925 |
++++ b/net/sched/sch_sfq.c |
926 |
+@@ -645,7 +645,7 @@ static int sfq_change(struct Qdisc *sch, struct nlattr *opt) |
927 |
+ } |
928 |
+ |
929 |
+ if (ctl_v1 && !red_check_params(ctl_v1->qth_min, ctl_v1->qth_max, |
930 |
+- ctl_v1->Wlog, ctl_v1->Scell_log)) |
931 |
++ ctl_v1->Wlog, ctl_v1->Scell_log, NULL)) |
932 |
+ return -EINVAL; |
933 |
+ if (ctl_v1 && ctl_v1->qth_min) { |
934 |
+ p = kmalloc(sizeof(*p), GFP_KERNEL); |
935 |
+diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c |
936 |
+index 4b898b15643de..80e461dd2db27 100644 |
937 |
+--- a/tools/perf/util/auxtrace.c |
938 |
++++ b/tools/perf/util/auxtrace.c |
939 |
+@@ -239,10 +239,6 @@ static int auxtrace_queues__add_buffer(struct auxtrace_queues *queues, |
940 |
+ queue->set = true; |
941 |
+ queue->tid = buffer->tid; |
942 |
+ queue->cpu = buffer->cpu; |
943 |
+- } else if (buffer->cpu != queue->cpu || buffer->tid != queue->tid) { |
944 |
+- pr_err("auxtrace queue conflict: cpu %d, tid %d vs cpu %d, tid %d\n", |
945 |
+- queue->cpu, queue->tid, buffer->cpu, buffer->tid); |
946 |
+- return -EINVAL; |
947 |
+ } |
948 |
+ |
949 |
+ buffer->buffer_nr = queues->next_buffer_nr++; |