1 |
commit: 584d5a37bfe568985e4f1ae9a640af0e7f986099 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 27 11:59:40 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 27 11:59:40 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=584d5a37 |
7 |
|
8 |
Linux patch 4.14.253 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1252_linux-4.14.253.patch | 1004 +++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 1008 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 467bc5a..d4ac84b 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -1055,6 +1055,10 @@ Patch: 1251_linux-4.14.252.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 4.14.252 |
23 |
|
24 |
+Patch: 1252_linux-4.14.253.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 4.14.253 |
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/1252_linux-4.14.253.patch b/1252_linux-4.14.253.patch |
33 |
new file mode 100644 |
34 |
index 0000000..c628087 |
35 |
--- /dev/null |
36 |
+++ b/1252_linux-4.14.253.patch |
37 |
@@ -0,0 +1,1004 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 0e28fc0458082..f4084bf887619 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 4 |
45 |
+ PATCHLEVEL = 14 |
46 |
+-SUBLEVEL = 252 |
47 |
++SUBLEVEL = 253 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Petit Gorille |
50 |
+ |
51 |
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig |
52 |
+index 89f7d0c282406..86ed77d75e4bb 100644 |
53 |
+--- a/arch/arm/Kconfig |
54 |
++++ b/arch/arm/Kconfig |
55 |
+@@ -65,6 +65,7 @@ config ARM |
56 |
+ select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL) |
57 |
+ select HAVE_FUNCTION_GRAPH_TRACER if (!THUMB2_KERNEL) |
58 |
+ select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) |
59 |
++ select HAVE_FUTEX_CMPXCHG if FUTEX |
60 |
+ select HAVE_GCC_PLUGINS |
61 |
+ select HAVE_GENERIC_DMA_COHERENT |
62 |
+ select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) |
63 |
+diff --git a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts |
64 |
+index 60cb084a8d927..7e1acec92b508 100644 |
65 |
+--- a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts |
66 |
++++ b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts |
67 |
+@@ -98,7 +98,6 @@ |
68 |
+ isc: isc@f0008000 { |
69 |
+ pinctrl-names = "default"; |
70 |
+ pinctrl-0 = <&pinctrl_isc_base &pinctrl_isc_data_8bit &pinctrl_isc_data_9_10 &pinctrl_isc_data_11_12>; |
71 |
+- status = "okay"; |
72 |
+ }; |
73 |
+ |
74 |
+ spi0: spi@f8000000 { |
75 |
+diff --git a/arch/arm/boot/dts/spear3xx.dtsi b/arch/arm/boot/dts/spear3xx.dtsi |
76 |
+index 118135d758990..4e4166d96b264 100644 |
77 |
+--- a/arch/arm/boot/dts/spear3xx.dtsi |
78 |
++++ b/arch/arm/boot/dts/spear3xx.dtsi |
79 |
+@@ -53,7 +53,7 @@ |
80 |
+ }; |
81 |
+ |
82 |
+ gmac: eth@e0800000 { |
83 |
+- compatible = "st,spear600-gmac"; |
84 |
++ compatible = "snps,dwmac-3.40a"; |
85 |
+ reg = <0xe0800000 0x8000>; |
86 |
+ interrupts = <23 22>; |
87 |
+ interrupt-names = "macirq", "eth_wake_irq"; |
88 |
+diff --git a/arch/nios2/include/asm/irqflags.h b/arch/nios2/include/asm/irqflags.h |
89 |
+index 75ab92e639f85..0338fcb88203c 100644 |
90 |
+--- a/arch/nios2/include/asm/irqflags.h |
91 |
++++ b/arch/nios2/include/asm/irqflags.h |
92 |
+@@ -22,7 +22,7 @@ |
93 |
+ |
94 |
+ static inline unsigned long arch_local_save_flags(void) |
95 |
+ { |
96 |
+- return RDCTL(CTL_STATUS); |
97 |
++ return RDCTL(CTL_FSTATUS); |
98 |
+ } |
99 |
+ |
100 |
+ /* |
101 |
+@@ -31,7 +31,7 @@ static inline unsigned long arch_local_save_flags(void) |
102 |
+ */ |
103 |
+ static inline void arch_local_irq_restore(unsigned long flags) |
104 |
+ { |
105 |
+- WRCTL(CTL_STATUS, flags); |
106 |
++ WRCTL(CTL_FSTATUS, flags); |
107 |
+ } |
108 |
+ |
109 |
+ static inline void arch_local_irq_disable(void) |
110 |
+diff --git a/arch/nios2/include/asm/registers.h b/arch/nios2/include/asm/registers.h |
111 |
+index 615bce19b546e..33824f2ad1ab7 100644 |
112 |
+--- a/arch/nios2/include/asm/registers.h |
113 |
++++ b/arch/nios2/include/asm/registers.h |
114 |
+@@ -24,7 +24,7 @@ |
115 |
+ #endif |
116 |
+ |
117 |
+ /* control register numbers */ |
118 |
+-#define CTL_STATUS 0 |
119 |
++#define CTL_FSTATUS 0 |
120 |
+ #define CTL_ESTATUS 1 |
121 |
+ #define CTL_BSTATUS 2 |
122 |
+ #define CTL_IENABLE 3 |
123 |
+diff --git a/arch/xtensa/platforms/xtfpga/setup.c b/arch/xtensa/platforms/xtfpga/setup.c |
124 |
+index 42285f35d3135..db5122765f166 100644 |
125 |
+--- a/arch/xtensa/platforms/xtfpga/setup.c |
126 |
++++ b/arch/xtensa/platforms/xtfpga/setup.c |
127 |
+@@ -54,8 +54,12 @@ void platform_power_off(void) |
128 |
+ |
129 |
+ void platform_restart(void) |
130 |
+ { |
131 |
+- /* Flush and reset the mmu, simulate a processor reset, and |
132 |
+- * jump to the reset vector. */ |
133 |
++ /* Try software reset first. */ |
134 |
++ WRITE_ONCE(*(u32 *)XTFPGA_SWRST_VADDR, 0xdead); |
135 |
++ |
136 |
++ /* If software reset did not work, flush and reset the mmu, |
137 |
++ * simulate a processor reset, and jump to the reset vector. |
138 |
++ */ |
139 |
+ cpu_reset(); |
140 |
+ /* control never gets here */ |
141 |
+ } |
142 |
+@@ -85,7 +89,7 @@ void __init platform_calibrate_ccount(void) |
143 |
+ |
144 |
+ #endif |
145 |
+ |
146 |
+-#ifdef CONFIG_OF |
147 |
++#ifdef CONFIG_USE_OF |
148 |
+ |
149 |
+ static void __init xtfpga_clk_setup(struct device_node *np) |
150 |
+ { |
151 |
+@@ -303,4 +307,4 @@ static int __init xtavnet_init(void) |
152 |
+ */ |
153 |
+ arch_initcall(xtavnet_init); |
154 |
+ |
155 |
+-#endif /* CONFIG_OF */ |
156 |
++#endif /* CONFIG_USE_OF */ |
157 |
+diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c |
158 |
+index 4c35abeceb617..103913d10ab1c 100644 |
159 |
+--- a/drivers/isdn/capi/kcapi.c |
160 |
++++ b/drivers/isdn/capi/kcapi.c |
161 |
+@@ -564,6 +564,11 @@ int detach_capi_ctr(struct capi_ctr *ctr) |
162 |
+ |
163 |
+ ctr_down(ctr, CAPI_CTR_DETACHED); |
164 |
+ |
165 |
++ if (ctr->cnr < 1 || ctr->cnr - 1 >= CAPI_MAXCONTR) { |
166 |
++ err = -EINVAL; |
167 |
++ goto unlock_out; |
168 |
++ } |
169 |
++ |
170 |
+ if (capi_controller[ctr->cnr - 1] != ctr) { |
171 |
+ err = -EINVAL; |
172 |
+ goto unlock_out; |
173 |
+diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c |
174 |
+index 79f9925da76c0..56b54aab51f99 100644 |
175 |
+--- a/drivers/isdn/hardware/mISDN/netjet.c |
176 |
++++ b/drivers/isdn/hardware/mISDN/netjet.c |
177 |
+@@ -963,8 +963,8 @@ nj_release(struct tiger_hw *card) |
178 |
+ nj_disable_hwirq(card); |
179 |
+ mode_tiger(&card->bc[0], ISDN_P_NONE); |
180 |
+ mode_tiger(&card->bc[1], ISDN_P_NONE); |
181 |
+- card->isac.release(&card->isac); |
182 |
+ spin_unlock_irqrestore(&card->lock, flags); |
183 |
++ card->isac.release(&card->isac); |
184 |
+ release_region(card->base, card->base_s); |
185 |
+ card->base_s = 0; |
186 |
+ } |
187 |
+diff --git a/drivers/net/can/rcar/rcar_can.c b/drivers/net/can/rcar/rcar_can.c |
188 |
+index 771a460837397..963da8eda1687 100644 |
189 |
+--- a/drivers/net/can/rcar/rcar_can.c |
190 |
++++ b/drivers/net/can/rcar/rcar_can.c |
191 |
+@@ -857,10 +857,12 @@ static int __maybe_unused rcar_can_suspend(struct device *dev) |
192 |
+ struct rcar_can_priv *priv = netdev_priv(ndev); |
193 |
+ u16 ctlr; |
194 |
+ |
195 |
+- if (netif_running(ndev)) { |
196 |
+- netif_stop_queue(ndev); |
197 |
+- netif_device_detach(ndev); |
198 |
+- } |
199 |
++ if (!netif_running(ndev)) |
200 |
++ return 0; |
201 |
++ |
202 |
++ netif_stop_queue(ndev); |
203 |
++ netif_device_detach(ndev); |
204 |
++ |
205 |
+ ctlr = readw(&priv->regs->ctlr); |
206 |
+ ctlr |= RCAR_CAN_CTLR_CANM_HALT; |
207 |
+ writew(ctlr, &priv->regs->ctlr); |
208 |
+@@ -879,6 +881,9 @@ static int __maybe_unused rcar_can_resume(struct device *dev) |
209 |
+ u16 ctlr; |
210 |
+ int err; |
211 |
+ |
212 |
++ if (!netif_running(ndev)) |
213 |
++ return 0; |
214 |
++ |
215 |
+ err = clk_enable(priv->clk); |
216 |
+ if (err) { |
217 |
+ netdev_err(ndev, "clk_enable() failed, error %d\n", err); |
218 |
+@@ -892,10 +897,9 @@ static int __maybe_unused rcar_can_resume(struct device *dev) |
219 |
+ writew(ctlr, &priv->regs->ctlr); |
220 |
+ priv->can.state = CAN_STATE_ERROR_ACTIVE; |
221 |
+ |
222 |
+- if (netif_running(ndev)) { |
223 |
+- netif_device_attach(ndev); |
224 |
+- netif_start_queue(ndev); |
225 |
+- } |
226 |
++ netif_device_attach(ndev); |
227 |
++ netif_start_queue(ndev); |
228 |
++ |
229 |
+ return 0; |
230 |
+ } |
231 |
+ |
232 |
+diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c |
233 |
+index 5adc95c922eef..34a645e27f665 100644 |
234 |
+--- a/drivers/net/can/sja1000/peak_pci.c |
235 |
++++ b/drivers/net/can/sja1000/peak_pci.c |
236 |
+@@ -739,16 +739,15 @@ static void peak_pci_remove(struct pci_dev *pdev) |
237 |
+ struct net_device *prev_dev = chan->prev_dev; |
238 |
+ |
239 |
+ dev_info(&pdev->dev, "removing device %s\n", dev->name); |
240 |
++ /* do that only for first channel */ |
241 |
++ if (!prev_dev && chan->pciec_card) |
242 |
++ peak_pciec_remove(chan->pciec_card); |
243 |
+ unregister_sja1000dev(dev); |
244 |
+ free_sja1000dev(dev); |
245 |
+ dev = prev_dev; |
246 |
+ |
247 |
+- if (!dev) { |
248 |
+- /* do that only for first channel */ |
249 |
+- if (chan->pciec_card) |
250 |
+- peak_pciec_remove(chan->pciec_card); |
251 |
++ if (!dev) |
252 |
+ break; |
253 |
+- } |
254 |
+ priv = netdev_priv(dev); |
255 |
+ chan = priv->priv; |
256 |
+ } |
257 |
+diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c |
258 |
+index 0d762bdac4f88..bb5cd80f0fb24 100644 |
259 |
+--- a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c |
260 |
++++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c |
261 |
+@@ -560,11 +560,10 @@ static int pcan_usb_fd_decode_status(struct pcan_usb_fd_if *usb_if, |
262 |
+ } else if (sm->channel_p_w_b & PUCAN_BUS_WARNING) { |
263 |
+ new_state = CAN_STATE_ERROR_WARNING; |
264 |
+ } else { |
265 |
+- /* no error bit (so, no error skb, back to active state) */ |
266 |
+- dev->can.state = CAN_STATE_ERROR_ACTIVE; |
267 |
++ /* back to (or still in) ERROR_ACTIVE state */ |
268 |
++ new_state = CAN_STATE_ERROR_ACTIVE; |
269 |
+ pdev->bec.txerr = 0; |
270 |
+ pdev->bec.rxerr = 0; |
271 |
+- return 0; |
272 |
+ } |
273 |
+ |
274 |
+ /* state hasn't changed */ |
275 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c |
276 |
+index 3304095c934c3..47842a796c3b6 100644 |
277 |
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c |
278 |
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c |
279 |
+@@ -71,6 +71,7 @@ err_remove_config_dt: |
280 |
+ |
281 |
+ static const struct of_device_id dwmac_generic_match[] = { |
282 |
+ { .compatible = "st,spear600-gmac"}, |
283 |
++ { .compatible = "snps,dwmac-3.40a"}, |
284 |
+ { .compatible = "snps,dwmac-3.50a"}, |
285 |
+ { .compatible = "snps,dwmac-3.610"}, |
286 |
+ { .compatible = "snps,dwmac-3.70a"}, |
287 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c |
288 |
+index d48cc32dc5073..d008e9d1518b4 100644 |
289 |
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c |
290 |
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c |
291 |
+@@ -458,6 +458,14 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) |
292 |
+ plat->pmt = 1; |
293 |
+ } |
294 |
+ |
295 |
++ if (of_device_is_compatible(np, "snps,dwmac-3.40a")) { |
296 |
++ plat->has_gmac = 1; |
297 |
++ plat->enh_desc = 1; |
298 |
++ plat->tx_coe = 1; |
299 |
++ plat->bugged_jumbo = 1; |
300 |
++ plat->pmt = 1; |
301 |
++ } |
302 |
++ |
303 |
+ if (of_device_is_compatible(np, "snps,dwmac-4.00") || |
304 |
+ of_device_is_compatible(np, "snps,dwmac-4.10a")) { |
305 |
+ plat->has_gmac4 = 1; |
306 |
+diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c |
307 |
+index 5ef9bbbab3dbb..b8a38f32d27f0 100644 |
308 |
+--- a/drivers/net/phy/mdio_bus.c |
309 |
++++ b/drivers/net/phy/mdio_bus.c |
310 |
+@@ -354,6 +354,7 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner) |
311 |
+ err = device_register(&bus->dev); |
312 |
+ if (err) { |
313 |
+ pr_err("mii_bus %s failed to register\n", bus->id); |
314 |
++ put_device(&bus->dev); |
315 |
+ return -EINVAL; |
316 |
+ } |
317 |
+ |
318 |
+diff --git a/drivers/platform/x86/intel_scu_ipc.c b/drivers/platform/x86/intel_scu_ipc.c |
319 |
+index 2434ce8bead6d..46d543063b6d6 100644 |
320 |
+--- a/drivers/platform/x86/intel_scu_ipc.c |
321 |
++++ b/drivers/platform/x86/intel_scu_ipc.c |
322 |
+@@ -183,7 +183,7 @@ static inline int busy_loop(struct intel_scu_ipc_dev *scu) |
323 |
+ return 0; |
324 |
+ } |
325 |
+ |
326 |
+-/* Wait till ipc ioc interrupt is received or timeout in 3 HZ */ |
327 |
++/* Wait till ipc ioc interrupt is received or timeout in 10 HZ */ |
328 |
+ static inline int ipc_wait_for_interrupt(struct intel_scu_ipc_dev *scu) |
329 |
+ { |
330 |
+ int status; |
331 |
+diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c |
332 |
+index ec976b93341cf..27609b2ae544a 100644 |
333 |
+--- a/drivers/scsi/hosts.c |
334 |
++++ b/drivers/scsi/hosts.c |
335 |
+@@ -213,7 +213,8 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev, |
336 |
+ goto fail; |
337 |
+ } |
338 |
+ |
339 |
+- shost->cmd_per_lun = min_t(short, shost->cmd_per_lun, |
340 |
++ /* Use min_t(int, ...) in case shost->can_queue exceeds SHRT_MAX */ |
341 |
++ shost->cmd_per_lun = min_t(int, shost->cmd_per_lun, |
342 |
+ shost->can_queue); |
343 |
+ |
344 |
+ error = scsi_init_sense_cache(shost); |
345 |
+diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c |
346 |
+index dd2504322a87a..2f386d8dbd0ef 100644 |
347 |
+--- a/fs/btrfs/file.c |
348 |
++++ b/fs/btrfs/file.c |
349 |
+@@ -2102,53 +2102,12 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) |
350 |
+ atomic_inc(&root->log_batch); |
351 |
+ full_sync = test_bit(BTRFS_INODE_NEEDS_FULL_SYNC, |
352 |
+ &BTRFS_I(inode)->runtime_flags); |
353 |
++ |
354 |
+ /* |
355 |
+- * We might have have had more pages made dirty after calling |
356 |
+- * start_ordered_ops and before acquiring the inode's i_mutex. |
357 |
++ * We have to do this here to avoid the priority inversion of waiting on |
358 |
++ * IO of a lower priority task while holding a transaciton open. |
359 |
+ */ |
360 |
+- if (full_sync) { |
361 |
+- /* |
362 |
+- * For a full sync, we need to make sure any ordered operations |
363 |
+- * start and finish before we start logging the inode, so that |
364 |
+- * all extents are persisted and the respective file extent |
365 |
+- * items are in the fs/subvol btree. |
366 |
+- */ |
367 |
+- ret = btrfs_wait_ordered_range(inode, start, len); |
368 |
+- } else { |
369 |
+- /* |
370 |
+- * Start any new ordered operations before starting to log the |
371 |
+- * inode. We will wait for them to finish in btrfs_sync_log(). |
372 |
+- * |
373 |
+- * Right before acquiring the inode's mutex, we might have new |
374 |
+- * writes dirtying pages, which won't immediately start the |
375 |
+- * respective ordered operations - that is done through the |
376 |
+- * fill_delalloc callbacks invoked from the writepage and |
377 |
+- * writepages address space operations. So make sure we start |
378 |
+- * all ordered operations before starting to log our inode. Not |
379 |
+- * doing this means that while logging the inode, writeback |
380 |
+- * could start and invoke writepage/writepages, which would call |
381 |
+- * the fill_delalloc callbacks (cow_file_range, |
382 |
+- * submit_compressed_extents). These callbacks add first an |
383 |
+- * extent map to the modified list of extents and then create |
384 |
+- * the respective ordered operation, which means in |
385 |
+- * tree-log.c:btrfs_log_inode() we might capture all existing |
386 |
+- * ordered operations (with btrfs_get_logged_extents()) before |
387 |
+- * the fill_delalloc callback adds its ordered operation, and by |
388 |
+- * the time we visit the modified list of extent maps (with |
389 |
+- * btrfs_log_changed_extents()), we see and process the extent |
390 |
+- * map they created. We then use the extent map to construct a |
391 |
+- * file extent item for logging without waiting for the |
392 |
+- * respective ordered operation to finish - this file extent |
393 |
+- * item points to a disk location that might not have yet been |
394 |
+- * written to, containing random data - so after a crash a log |
395 |
+- * replay will make our inode have file extent items that point |
396 |
+- * to disk locations containing invalid data, as we returned |
397 |
+- * success to userspace without waiting for the respective |
398 |
+- * ordered operation to finish, because it wasn't captured by |
399 |
+- * btrfs_get_logged_extents(). |
400 |
+- */ |
401 |
+- ret = start_ordered_ops(inode, start, end); |
402 |
+- } |
403 |
++ ret = btrfs_wait_ordered_range(inode, start, len); |
404 |
+ if (ret) { |
405 |
+ up_write(&BTRFS_I(inode)->dio_sem); |
406 |
+ inode_unlock(inode); |
407 |
+@@ -2283,13 +2242,6 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) |
408 |
+ goto out; |
409 |
+ } |
410 |
+ } |
411 |
+- if (!full_sync) { |
412 |
+- ret = btrfs_wait_ordered_range(inode, start, len); |
413 |
+- if (ret) { |
414 |
+- btrfs_end_transaction(trans); |
415 |
+- goto out; |
416 |
+- } |
417 |
+- } |
418 |
+ ret = btrfs_commit_transaction(trans); |
419 |
+ } else { |
420 |
+ ret = btrfs_end_transaction(trans); |
421 |
+diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c |
422 |
+index 08ab7ab909a8e..372a10130ced1 100644 |
423 |
+--- a/fs/btrfs/tree-log.c |
424 |
++++ b/fs/btrfs/tree-log.c |
425 |
+@@ -901,9 +901,11 @@ out: |
426 |
+ } |
427 |
+ |
428 |
+ /* |
429 |
+- * helper function to see if a given name and sequence number found |
430 |
+- * in an inode back reference are already in a directory and correctly |
431 |
+- * point to this inode |
432 |
++ * See if a given name and sequence number found in an inode back reference are |
433 |
++ * already in a directory and correctly point to this inode. |
434 |
++ * |
435 |
++ * Returns: < 0 on error, 0 if the directory entry does not exists and 1 if it |
436 |
++ * exists. |
437 |
+ */ |
438 |
+ static noinline int inode_in_dir(struct btrfs_root *root, |
439 |
+ struct btrfs_path *path, |
440 |
+@@ -912,29 +914,35 @@ static noinline int inode_in_dir(struct btrfs_root *root, |
441 |
+ { |
442 |
+ struct btrfs_dir_item *di; |
443 |
+ struct btrfs_key location; |
444 |
+- int match = 0; |
445 |
++ int ret = 0; |
446 |
+ |
447 |
+ di = btrfs_lookup_dir_index_item(NULL, root, path, dirid, |
448 |
+ index, name, name_len, 0); |
449 |
+- if (di && !IS_ERR(di)) { |
450 |
++ if (IS_ERR(di)) { |
451 |
++ if (PTR_ERR(di) != -ENOENT) |
452 |
++ ret = PTR_ERR(di); |
453 |
++ goto out; |
454 |
++ } else if (di) { |
455 |
+ btrfs_dir_item_key_to_cpu(path->nodes[0], di, &location); |
456 |
+ if (location.objectid != objectid) |
457 |
+ goto out; |
458 |
+- } else |
459 |
++ } else { |
460 |
+ goto out; |
461 |
+- btrfs_release_path(path); |
462 |
++ } |
463 |
+ |
464 |
++ btrfs_release_path(path); |
465 |
+ di = btrfs_lookup_dir_item(NULL, root, path, dirid, name, name_len, 0); |
466 |
+- if (di && !IS_ERR(di)) { |
467 |
+- btrfs_dir_item_key_to_cpu(path->nodes[0], di, &location); |
468 |
+- if (location.objectid != objectid) |
469 |
+- goto out; |
470 |
+- } else |
471 |
++ if (IS_ERR(di)) { |
472 |
++ ret = PTR_ERR(di); |
473 |
+ goto out; |
474 |
+- match = 1; |
475 |
++ } else if (di) { |
476 |
++ btrfs_dir_item_key_to_cpu(path->nodes[0], di, &location); |
477 |
++ if (location.objectid == objectid) |
478 |
++ ret = 1; |
479 |
++ } |
480 |
+ out: |
481 |
+ btrfs_release_path(path); |
482 |
+- return match; |
483 |
++ return ret; |
484 |
+ } |
485 |
+ |
486 |
+ /* |
487 |
+@@ -1319,10 +1327,12 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans, |
488 |
+ if (ret) |
489 |
+ goto out; |
490 |
+ |
491 |
+- /* if we already have a perfect match, we're done */ |
492 |
+- if (!inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)), |
493 |
+- btrfs_ino(BTRFS_I(inode)), ref_index, |
494 |
+- name, namelen)) { |
495 |
++ ret = inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)), |
496 |
++ btrfs_ino(BTRFS_I(inode)), ref_index, |
497 |
++ name, namelen); |
498 |
++ if (ret < 0) { |
499 |
++ goto out; |
500 |
++ } else if (ret == 0) { |
501 |
+ /* |
502 |
+ * look for a conflicting back reference in the |
503 |
+ * metadata. if we find one we have to unlink that name |
504 |
+@@ -1355,6 +1365,7 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans, |
505 |
+ |
506 |
+ btrfs_update_inode(trans, root, inode); |
507 |
+ } |
508 |
++ /* Else, ret == 1, we already have a perfect match, we're done. */ |
509 |
+ |
510 |
+ ref_ptr = (unsigned long)(ref_ptr + ref_struct_size) + namelen; |
511 |
+ kfree(name); |
512 |
+diff --git a/fs/exec.c b/fs/exec.c |
513 |
+index e8d1e67059775..c72ccfa49f541 100644 |
514 |
+--- a/fs/exec.c |
515 |
++++ b/fs/exec.c |
516 |
+@@ -980,7 +980,7 @@ int kernel_read_file_from_fd(int fd, void **buf, loff_t *size, loff_t max_size, |
517 |
+ struct fd f = fdget(fd); |
518 |
+ int ret = -EBADF; |
519 |
+ |
520 |
+- if (!f.file) |
521 |
++ if (!f.file || !(f.file->f_mode & FMODE_READ)) |
522 |
+ goto out; |
523 |
+ |
524 |
+ ret = kernel_read_file(f.file, buf, size, max_size, id); |
525 |
+diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c |
526 |
+index d44402241d9e6..50465ee502c7e 100644 |
527 |
+--- a/fs/nfsd/nfsctl.c |
528 |
++++ b/fs/nfsd/nfsctl.c |
529 |
+@@ -788,7 +788,10 @@ out_close: |
530 |
+ svc_xprt_put(xprt); |
531 |
+ } |
532 |
+ out_err: |
533 |
+- nfsd_destroy(net); |
534 |
++ if (!list_empty(&nn->nfsd_serv->sv_permsocks)) |
535 |
++ nn->nfsd_serv->sv_nrthreads--; |
536 |
++ else |
537 |
++ nfsd_destroy(net); |
538 |
+ return err; |
539 |
+ } |
540 |
+ |
541 |
+diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c |
542 |
+index bed54e8adcf99..8512f2119241c 100644 |
543 |
+--- a/fs/ocfs2/alloc.c |
544 |
++++ b/fs/ocfs2/alloc.c |
545 |
+@@ -6885,7 +6885,7 @@ void ocfs2_set_inode_data_inline(struct inode *inode, struct ocfs2_dinode *di) |
546 |
+ int ocfs2_convert_inline_data_to_extents(struct inode *inode, |
547 |
+ struct buffer_head *di_bh) |
548 |
+ { |
549 |
+- int ret, i, has_data, num_pages = 0; |
550 |
++ int ret, has_data, num_pages = 0; |
551 |
+ int need_free = 0; |
552 |
+ u32 bit_off, num; |
553 |
+ handle_t *handle; |
554 |
+@@ -6894,26 +6894,17 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, |
555 |
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
556 |
+ struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data; |
557 |
+ struct ocfs2_alloc_context *data_ac = NULL; |
558 |
+- struct page **pages = NULL; |
559 |
+- loff_t end = osb->s_clustersize; |
560 |
++ struct page *page = NULL; |
561 |
+ struct ocfs2_extent_tree et; |
562 |
+ int did_quota = 0; |
563 |
+ |
564 |
+ has_data = i_size_read(inode) ? 1 : 0; |
565 |
+ |
566 |
+ if (has_data) { |
567 |
+- pages = kcalloc(ocfs2_pages_per_cluster(osb->sb), |
568 |
+- sizeof(struct page *), GFP_NOFS); |
569 |
+- if (pages == NULL) { |
570 |
+- ret = -ENOMEM; |
571 |
+- mlog_errno(ret); |
572 |
+- return ret; |
573 |
+- } |
574 |
+- |
575 |
+ ret = ocfs2_reserve_clusters(osb, 1, &data_ac); |
576 |
+ if (ret) { |
577 |
+ mlog_errno(ret); |
578 |
+- goto free_pages; |
579 |
++ goto out; |
580 |
+ } |
581 |
+ } |
582 |
+ |
583 |
+@@ -6933,7 +6924,8 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, |
584 |
+ } |
585 |
+ |
586 |
+ if (has_data) { |
587 |
+- unsigned int page_end; |
588 |
++ unsigned int page_end = min_t(unsigned, PAGE_SIZE, |
589 |
++ osb->s_clustersize); |
590 |
+ u64 phys; |
591 |
+ |
592 |
+ ret = dquot_alloc_space_nodirty(inode, |
593 |
+@@ -6957,15 +6949,8 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, |
594 |
+ */ |
595 |
+ block = phys = ocfs2_clusters_to_blocks(inode->i_sb, bit_off); |
596 |
+ |
597 |
+- /* |
598 |
+- * Non sparse file systems zero on extend, so no need |
599 |
+- * to do that now. |
600 |
+- */ |
601 |
+- if (!ocfs2_sparse_alloc(osb) && |
602 |
+- PAGE_SIZE < osb->s_clustersize) |
603 |
+- end = PAGE_SIZE; |
604 |
+- |
605 |
+- ret = ocfs2_grab_eof_pages(inode, 0, end, pages, &num_pages); |
606 |
++ ret = ocfs2_grab_eof_pages(inode, 0, page_end, &page, |
607 |
++ &num_pages); |
608 |
+ if (ret) { |
609 |
+ mlog_errno(ret); |
610 |
+ need_free = 1; |
611 |
+@@ -6976,20 +6961,15 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, |
612 |
+ * This should populate the 1st page for us and mark |
613 |
+ * it up to date. |
614 |
+ */ |
615 |
+- ret = ocfs2_read_inline_data(inode, pages[0], di_bh); |
616 |
++ ret = ocfs2_read_inline_data(inode, page, di_bh); |
617 |
+ if (ret) { |
618 |
+ mlog_errno(ret); |
619 |
+ need_free = 1; |
620 |
+ goto out_unlock; |
621 |
+ } |
622 |
+ |
623 |
+- page_end = PAGE_SIZE; |
624 |
+- if (PAGE_SIZE > osb->s_clustersize) |
625 |
+- page_end = osb->s_clustersize; |
626 |
+- |
627 |
+- for (i = 0; i < num_pages; i++) |
628 |
+- ocfs2_map_and_dirty_page(inode, handle, 0, page_end, |
629 |
+- pages[i], i > 0, &phys); |
630 |
++ ocfs2_map_and_dirty_page(inode, handle, 0, page_end, page, 0, |
631 |
++ &phys); |
632 |
+ } |
633 |
+ |
634 |
+ spin_lock(&oi->ip_lock); |
635 |
+@@ -7020,8 +7000,8 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode, |
636 |
+ } |
637 |
+ |
638 |
+ out_unlock: |
639 |
+- if (pages) |
640 |
+- ocfs2_unlock_and_free_pages(pages, num_pages); |
641 |
++ if (page) |
642 |
++ ocfs2_unlock_and_free_pages(&page, num_pages); |
643 |
+ |
644 |
+ out_commit: |
645 |
+ if (ret < 0 && did_quota) |
646 |
+@@ -7045,8 +7025,6 @@ out_commit: |
647 |
+ out: |
648 |
+ if (data_ac) |
649 |
+ ocfs2_free_alloc_context(data_ac); |
650 |
+-free_pages: |
651 |
+- kfree(pages); |
652 |
+ return ret; |
653 |
+ } |
654 |
+ |
655 |
+diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c |
656 |
+index f9deabfa303e9..4d76321cf722b 100644 |
657 |
+--- a/fs/ocfs2/super.c |
658 |
++++ b/fs/ocfs2/super.c |
659 |
+@@ -2188,11 +2188,17 @@ static int ocfs2_initialize_super(struct super_block *sb, |
660 |
+ } |
661 |
+ |
662 |
+ if (ocfs2_clusterinfo_valid(osb)) { |
663 |
++ /* |
664 |
++ * ci_stack and ci_cluster in ocfs2_cluster_info may not be null |
665 |
++ * terminated, so make sure no overflow happens here by using |
666 |
++ * memcpy. Destination strings will always be null terminated |
667 |
++ * because osb is allocated using kzalloc. |
668 |
++ */ |
669 |
+ osb->osb_stackflags = |
670 |
+ OCFS2_RAW_SB(di)->s_cluster_info.ci_stackflags; |
671 |
+- strlcpy(osb->osb_cluster_stack, |
672 |
++ memcpy(osb->osb_cluster_stack, |
673 |
+ OCFS2_RAW_SB(di)->s_cluster_info.ci_stack, |
674 |
+- OCFS2_STACK_LABEL_LEN + 1); |
675 |
++ OCFS2_STACK_LABEL_LEN); |
676 |
+ if (strlen(osb->osb_cluster_stack) != OCFS2_STACK_LABEL_LEN) { |
677 |
+ mlog(ML_ERROR, |
678 |
+ "couldn't mount because of an invalid " |
679 |
+@@ -2201,9 +2207,9 @@ static int ocfs2_initialize_super(struct super_block *sb, |
680 |
+ status = -EINVAL; |
681 |
+ goto bail; |
682 |
+ } |
683 |
+- strlcpy(osb->osb_cluster_name, |
684 |
++ memcpy(osb->osb_cluster_name, |
685 |
+ OCFS2_RAW_SB(di)->s_cluster_info.ci_cluster, |
686 |
+- OCFS2_CLUSTER_NAME_LEN + 1); |
687 |
++ OCFS2_CLUSTER_NAME_LEN); |
688 |
+ } else { |
689 |
+ /* The empty string is identical with classic tools that |
690 |
+ * don't know about s_cluster_info. */ |
691 |
+diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h |
692 |
+index b81f9e1d74b0a..9d249dfbab726 100644 |
693 |
+--- a/include/linux/elfcore.h |
694 |
++++ b/include/linux/elfcore.h |
695 |
+@@ -58,7 +58,7 @@ static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregse |
696 |
+ } |
697 |
+ #endif |
698 |
+ |
699 |
+-#if defined(CONFIG_UM) || defined(CONFIG_IA64) |
700 |
++#if (defined(CONFIG_UML) && defined(CONFIG_X86_32)) || defined(CONFIG_IA64) |
701 |
+ /* |
702 |
+ * These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out |
703 |
+ * extra segments containing the gate DSO contents. Dumping its |
704 |
+diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c |
705 |
+index 50c03c430f1a1..7d734b4144fd7 100644 |
706 |
+--- a/kernel/trace/ftrace.c |
707 |
++++ b/kernel/trace/ftrace.c |
708 |
+@@ -6113,7 +6113,7 @@ __ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, |
709 |
+ struct ftrace_ops *op; |
710 |
+ int bit; |
711 |
+ |
712 |
+- bit = trace_test_and_set_recursion(TRACE_LIST_START, TRACE_LIST_MAX); |
713 |
++ bit = trace_test_and_set_recursion(TRACE_LIST_START); |
714 |
+ if (bit < 0) |
715 |
+ return; |
716 |
+ |
717 |
+@@ -6188,7 +6188,7 @@ static void ftrace_ops_assist_func(unsigned long ip, unsigned long parent_ip, |
718 |
+ { |
719 |
+ int bit; |
720 |
+ |
721 |
+- bit = trace_test_and_set_recursion(TRACE_LIST_START, TRACE_LIST_MAX); |
722 |
++ bit = trace_test_and_set_recursion(TRACE_LIST_START); |
723 |
+ if (bit < 0) |
724 |
+ return; |
725 |
+ |
726 |
+diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h |
727 |
+index 5097e9406e78e..b5a251efd164d 100644 |
728 |
+--- a/kernel/trace/trace.h |
729 |
++++ b/kernel/trace/trace.h |
730 |
+@@ -459,23 +459,8 @@ struct tracer { |
731 |
+ * When function tracing occurs, the following steps are made: |
732 |
+ * If arch does not support a ftrace feature: |
733 |
+ * call internal function (uses INTERNAL bits) which calls... |
734 |
+- * If callback is registered to the "global" list, the list |
735 |
+- * function is called and recursion checks the GLOBAL bits. |
736 |
+- * then this function calls... |
737 |
+ * The function callback, which can use the FTRACE bits to |
738 |
+ * check for recursion. |
739 |
+- * |
740 |
+- * Now if the arch does not suppport a feature, and it calls |
741 |
+- * the global list function which calls the ftrace callback |
742 |
+- * all three of these steps will do a recursion protection. |
743 |
+- * There's no reason to do one if the previous caller already |
744 |
+- * did. The recursion that we are protecting against will |
745 |
+- * go through the same steps again. |
746 |
+- * |
747 |
+- * To prevent the multiple recursion checks, if a recursion |
748 |
+- * bit is set that is higher than the MAX bit of the current |
749 |
+- * check, then we know that the check was made by the previous |
750 |
+- * caller, and we can skip the current check. |
751 |
+ */ |
752 |
+ enum { |
753 |
+ TRACE_BUFFER_BIT, |
754 |
+@@ -488,12 +473,14 @@ enum { |
755 |
+ TRACE_FTRACE_NMI_BIT, |
756 |
+ TRACE_FTRACE_IRQ_BIT, |
757 |
+ TRACE_FTRACE_SIRQ_BIT, |
758 |
++ TRACE_FTRACE_TRANSITION_BIT, |
759 |
+ |
760 |
+- /* INTERNAL_BITs must be greater than FTRACE_BITs */ |
761 |
++ /* Internal use recursion bits */ |
762 |
+ TRACE_INTERNAL_BIT, |
763 |
+ TRACE_INTERNAL_NMI_BIT, |
764 |
+ TRACE_INTERNAL_IRQ_BIT, |
765 |
+ TRACE_INTERNAL_SIRQ_BIT, |
766 |
++ TRACE_INTERNAL_TRANSITION_BIT, |
767 |
+ |
768 |
+ TRACE_BRANCH_BIT, |
769 |
+ /* |
770 |
+@@ -526,12 +513,6 @@ enum { |
771 |
+ |
772 |
+ TRACE_GRAPH_DEPTH_START_BIT, |
773 |
+ TRACE_GRAPH_DEPTH_END_BIT, |
774 |
+- |
775 |
+- /* |
776 |
+- * When transitioning between context, the preempt_count() may |
777 |
+- * not be correct. Allow for a single recursion to cover this case. |
778 |
+- */ |
779 |
+- TRACE_TRANSITION_BIT, |
780 |
+ }; |
781 |
+ |
782 |
+ #define trace_recursion_set(bit) do { (current)->trace_recursion |= (1<<(bit)); } while (0) |
783 |
+@@ -551,12 +532,18 @@ enum { |
784 |
+ #define TRACE_CONTEXT_BITS 4 |
785 |
+ |
786 |
+ #define TRACE_FTRACE_START TRACE_FTRACE_BIT |
787 |
+-#define TRACE_FTRACE_MAX ((1 << (TRACE_FTRACE_START + TRACE_CONTEXT_BITS)) - 1) |
788 |
+ |
789 |
+ #define TRACE_LIST_START TRACE_INTERNAL_BIT |
790 |
+-#define TRACE_LIST_MAX ((1 << (TRACE_LIST_START + TRACE_CONTEXT_BITS)) - 1) |
791 |
+ |
792 |
+-#define TRACE_CONTEXT_MASK TRACE_LIST_MAX |
793 |
++#define TRACE_CONTEXT_MASK ((1 << (TRACE_LIST_START + TRACE_CONTEXT_BITS)) - 1) |
794 |
++ |
795 |
++enum { |
796 |
++ TRACE_CTX_NMI, |
797 |
++ TRACE_CTX_IRQ, |
798 |
++ TRACE_CTX_SOFTIRQ, |
799 |
++ TRACE_CTX_NORMAL, |
800 |
++ TRACE_CTX_TRANSITION, |
801 |
++}; |
802 |
+ |
803 |
+ static __always_inline int trace_get_context_bit(void) |
804 |
+ { |
805 |
+@@ -564,59 +551,48 @@ static __always_inline int trace_get_context_bit(void) |
806 |
+ |
807 |
+ if (in_interrupt()) { |
808 |
+ if (in_nmi()) |
809 |
+- bit = 0; |
810 |
++ bit = TRACE_CTX_NMI; |
811 |
+ |
812 |
+ else if (in_irq()) |
813 |
+- bit = 1; |
814 |
++ bit = TRACE_CTX_IRQ; |
815 |
+ else |
816 |
+- bit = 2; |
817 |
++ bit = TRACE_CTX_SOFTIRQ; |
818 |
+ } else |
819 |
+- bit = 3; |
820 |
++ bit = TRACE_CTX_NORMAL; |
821 |
+ |
822 |
+ return bit; |
823 |
+ } |
824 |
+ |
825 |
+-static __always_inline int trace_test_and_set_recursion(int start, int max) |
826 |
++static __always_inline int trace_test_and_set_recursion(int start) |
827 |
+ { |
828 |
+ unsigned int val = current->trace_recursion; |
829 |
+ int bit; |
830 |
+ |
831 |
+- /* A previous recursion check was made */ |
832 |
+- if ((val & TRACE_CONTEXT_MASK) > max) |
833 |
+- return 0; |
834 |
+- |
835 |
+ bit = trace_get_context_bit() + start; |
836 |
+ if (unlikely(val & (1 << bit))) { |
837 |
+ /* |
838 |
+ * It could be that preempt_count has not been updated during |
839 |
+ * a switch between contexts. Allow for a single recursion. |
840 |
+ */ |
841 |
+- bit = TRACE_TRANSITION_BIT; |
842 |
++ bit = start + TRACE_CTX_TRANSITION; |
843 |
+ if (trace_recursion_test(bit)) |
844 |
+ return -1; |
845 |
+ trace_recursion_set(bit); |
846 |
+ barrier(); |
847 |
+- return bit + 1; |
848 |
++ return bit; |
849 |
+ } |
850 |
+ |
851 |
+- /* Normal check passed, clear the transition to allow it again */ |
852 |
+- trace_recursion_clear(TRACE_TRANSITION_BIT); |
853 |
+- |
854 |
+ val |= 1 << bit; |
855 |
+ current->trace_recursion = val; |
856 |
+ barrier(); |
857 |
+ |
858 |
+- return bit + 1; |
859 |
++ return bit; |
860 |
+ } |
861 |
+ |
862 |
+ static __always_inline void trace_clear_recursion(int bit) |
863 |
+ { |
864 |
+ unsigned int val = current->trace_recursion; |
865 |
+ |
866 |
+- if (!bit) |
867 |
+- return; |
868 |
+- |
869 |
+- bit--; |
870 |
+ bit = 1 << bit; |
871 |
+ val &= ~bit; |
872 |
+ |
873 |
+diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c |
874 |
+index 27f7ad12c4b1b..7a5d3d4222159 100644 |
875 |
+--- a/kernel/trace/trace_functions.c |
876 |
++++ b/kernel/trace/trace_functions.c |
877 |
+@@ -138,7 +138,7 @@ function_trace_call(unsigned long ip, unsigned long parent_ip, |
878 |
+ pc = preempt_count(); |
879 |
+ preempt_disable_notrace(); |
880 |
+ |
881 |
+- bit = trace_test_and_set_recursion(TRACE_FTRACE_START, TRACE_FTRACE_MAX); |
882 |
++ bit = trace_test_and_set_recursion(TRACE_FTRACE_START); |
883 |
+ if (bit < 0) |
884 |
+ goto out; |
885 |
+ |
886 |
+diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig |
887 |
+index e4a13cc8a2e76..1b302d9fd0a07 100644 |
888 |
+--- a/net/netfilter/Kconfig |
889 |
++++ b/net/netfilter/Kconfig |
890 |
+@@ -75,7 +75,7 @@ config NF_CONNTRACK_MARK |
891 |
+ config NF_CONNTRACK_SECMARK |
892 |
+ bool 'Connection tracking security mark support' |
893 |
+ depends on NETWORK_SECMARK |
894 |
+- default m if NETFILTER_ADVANCED=n |
895 |
++ default y if NETFILTER_ADVANCED=n |
896 |
+ help |
897 |
+ This option enables security markings to be applied to |
898 |
+ connections. Typically they are copied to connections from |
899 |
+diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c |
900 |
+index eea0144aada7a..ecc16d8c1cc31 100644 |
901 |
+--- a/net/netfilter/ipvs/ip_vs_ctl.c |
902 |
++++ b/net/netfilter/ipvs/ip_vs_ctl.c |
903 |
+@@ -3987,6 +3987,11 @@ static int __net_init ip_vs_control_net_init_sysctl(struct netns_ipvs *ipvs) |
904 |
+ tbl[idx++].data = &ipvs->sysctl_conn_reuse_mode; |
905 |
+ tbl[idx++].data = &ipvs->sysctl_schedule_icmp; |
906 |
+ tbl[idx++].data = &ipvs->sysctl_ignore_tunneled; |
907 |
++#ifdef CONFIG_IP_VS_DEBUG |
908 |
++ /* Global sysctls must be ro in non-init netns */ |
909 |
++ if (!net_eq(net, &init_net)) |
910 |
++ tbl[idx++].mode = 0444; |
911 |
++#endif |
912 |
+ |
913 |
+ ipvs->sysctl_hdr = register_net_sysctl(net, "net/ipv4/vs", tbl); |
914 |
+ if (ipvs->sysctl_hdr == NULL) { |
915 |
+diff --git a/net/nfc/nci/rsp.c b/net/nfc/nci/rsp.c |
916 |
+index e3bbf1937d0e9..7681f89dc312b 100644 |
917 |
+--- a/net/nfc/nci/rsp.c |
918 |
++++ b/net/nfc/nci/rsp.c |
919 |
+@@ -289,6 +289,8 @@ static void nci_core_conn_close_rsp_packet(struct nci_dev *ndev, |
920 |
+ ndev->cur_conn_id); |
921 |
+ if (conn_info) { |
922 |
+ list_del(&conn_info->list); |
923 |
++ if (conn_info == ndev->rf_conn_info) |
924 |
++ ndev->rf_conn_info = NULL; |
925 |
+ devm_kfree(&ndev->nfc_dev->dev, conn_info); |
926 |
+ } |
927 |
+ } |
928 |
+diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c |
929 |
+index 778b42ba90b80..5ae72134159a7 100644 |
930 |
+--- a/sound/hda/hdac_controller.c |
931 |
++++ b/sound/hda/hdac_controller.c |
932 |
+@@ -389,8 +389,9 @@ int snd_hdac_bus_reset_link(struct hdac_bus *bus, bool full_reset) |
933 |
+ if (!full_reset) |
934 |
+ goto skip_reset; |
935 |
+ |
936 |
+- /* clear STATESTS */ |
937 |
+- snd_hdac_chip_writew(bus, STATESTS, STATESTS_INT_MASK); |
938 |
++ /* clear STATESTS if not in reset */ |
939 |
++ if (snd_hdac_chip_readb(bus, GCTL) & AZX_GCTL_RESET) |
940 |
++ snd_hdac_chip_writew(bus, STATESTS, STATESTS_INT_MASK); |
941 |
+ |
942 |
+ /* reset controller */ |
943 |
+ snd_hdac_bus_enter_link_reset(bus); |
944 |
+diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c |
945 |
+index dedd3517d3694..7c013d237ea19 100644 |
946 |
+--- a/sound/soc/soc-dapm.c |
947 |
++++ b/sound/soc/soc-dapm.c |
948 |
+@@ -2495,6 +2495,7 @@ static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm, |
949 |
+ const char *pin, int status) |
950 |
+ { |
951 |
+ struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true); |
952 |
++ int ret = 0; |
953 |
+ |
954 |
+ dapm_assert_locked(dapm); |
955 |
+ |
956 |
+@@ -2507,13 +2508,14 @@ static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm, |
957 |
+ dapm_mark_dirty(w, "pin configuration"); |
958 |
+ dapm_widget_invalidate_input_paths(w); |
959 |
+ dapm_widget_invalidate_output_paths(w); |
960 |
++ ret = 1; |
961 |
+ } |
962 |
+ |
963 |
+ w->connected = status; |
964 |
+ if (status == 0) |
965 |
+ w->force = 0; |
966 |
+ |
967 |
+- return 0; |
968 |
++ return ret; |
969 |
+ } |
970 |
+ |
971 |
+ /** |
972 |
+@@ -3441,14 +3443,15 @@ int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol, |
973 |
+ { |
974 |
+ struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
975 |
+ const char *pin = (const char *)kcontrol->private_value; |
976 |
++ int ret; |
977 |
+ |
978 |
+ if (ucontrol->value.integer.value[0]) |
979 |
+- snd_soc_dapm_enable_pin(&card->dapm, pin); |
980 |
++ ret = snd_soc_dapm_enable_pin(&card->dapm, pin); |
981 |
+ else |
982 |
+- snd_soc_dapm_disable_pin(&card->dapm, pin); |
983 |
++ ret = snd_soc_dapm_disable_pin(&card->dapm, pin); |
984 |
+ |
985 |
+ snd_soc_dapm_sync(&card->dapm); |
986 |
+- return 0; |
987 |
++ return ret; |
988 |
+ } |
989 |
+ EXPORT_SYMBOL_GPL(snd_soc_dapm_put_pin_switch); |
990 |
+ |
991 |
+@@ -3824,7 +3827,7 @@ static int snd_soc_dapm_dai_link_put(struct snd_kcontrol *kcontrol, |
992 |
+ |
993 |
+ w->params_select = ucontrol->value.enumerated.item[0]; |
994 |
+ |
995 |
+- return 0; |
996 |
++ return 1; |
997 |
+ } |
998 |
+ |
999 |
+ int snd_soc_dapm_new_pcm(struct snd_soc_card *card, |
1000 |
+diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h |
1001 |
+index d3d3e05fe5b8d..1904fc542025d 100644 |
1002 |
+--- a/sound/usb/quirks-table.h |
1003 |
++++ b/sound/usb/quirks-table.h |
1004 |
+@@ -3446,5 +3446,37 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"), |
1005 |
+ } |
1006 |
+ } |
1007 |
+ }, |
1008 |
++{ |
1009 |
++ /* |
1010 |
++ * Sennheiser GSP670 |
1011 |
++ * Change order of interfaces loaded |
1012 |
++ */ |
1013 |
++ USB_DEVICE(0x1395, 0x0300), |
1014 |
++ .bInterfaceClass = USB_CLASS_PER_INTERFACE, |
1015 |
++ .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) { |
1016 |
++ .ifnum = QUIRK_ANY_INTERFACE, |
1017 |
++ .type = QUIRK_COMPOSITE, |
1018 |
++ .data = &(const struct snd_usb_audio_quirk[]) { |
1019 |
++ // Communication |
1020 |
++ { |
1021 |
++ .ifnum = 3, |
1022 |
++ .type = QUIRK_AUDIO_STANDARD_INTERFACE |
1023 |
++ }, |
1024 |
++ // Recording |
1025 |
++ { |
1026 |
++ .ifnum = 4, |
1027 |
++ .type = QUIRK_AUDIO_STANDARD_INTERFACE |
1028 |
++ }, |
1029 |
++ // Main |
1030 |
++ { |
1031 |
++ .ifnum = 1, |
1032 |
++ .type = QUIRK_AUDIO_STANDARD_INTERFACE |
1033 |
++ }, |
1034 |
++ { |
1035 |
++ .ifnum = -1 |
1036 |
++ } |
1037 |
++ } |
1038 |
++ } |
1039 |
++}, |
1040 |
+ |
1041 |
+ #undef USB_DEVICE_VENDOR_SPEC |