1 |
commit: b1e5f2aca88a700e889060dfcd4a6f90b0f53fa8 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 26 14:14:45 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 26 14:14:45 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=b1e5f2ac |
7 |
|
8 |
Linuxpatch 4.14.248 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1247_linux-4.14.248.patch | 567 ++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 571 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 606bd7e..25507e2 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -1035,6 +1035,10 @@ Patch: 1246_linux-4.14.247.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 4.14.247 |
23 |
|
24 |
+Patch: 1247_linux-4.14.248.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 4.14.248 |
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/1247_linux-4.14.248.patch b/1247_linux-4.14.248.patch |
33 |
new file mode 100644 |
34 |
index 0000000..5796f3d |
35 |
--- /dev/null |
36 |
+++ b/1247_linux-4.14.248.patch |
37 |
@@ -0,0 +1,567 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index b05401adeaf57..7999f2fbd0f8d 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 = 247 |
47 |
++SUBLEVEL = 248 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Petit Gorille |
50 |
+ |
51 |
+diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c |
52 |
+index 1241e365af5d2..60029baaa72ad 100644 |
53 |
+--- a/arch/s390/net/bpf_jit_comp.c |
54 |
++++ b/arch/s390/net/bpf_jit_comp.c |
55 |
+@@ -592,10 +592,10 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i |
56 |
+ EMIT4(0xb9080000, dst_reg, src_reg); |
57 |
+ break; |
58 |
+ case BPF_ALU | BPF_ADD | BPF_K: /* dst = (u32) dst + (u32) imm */ |
59 |
+- if (!imm) |
60 |
+- break; |
61 |
+- /* alfi %dst,imm */ |
62 |
+- EMIT6_IMM(0xc20b0000, dst_reg, imm); |
63 |
++ if (imm != 0) { |
64 |
++ /* alfi %dst,imm */ |
65 |
++ EMIT6_IMM(0xc20b0000, dst_reg, imm); |
66 |
++ } |
67 |
+ EMIT_ZERO(dst_reg); |
68 |
+ break; |
69 |
+ case BPF_ALU64 | BPF_ADD | BPF_K: /* dst = dst + imm */ |
70 |
+@@ -617,10 +617,10 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i |
71 |
+ EMIT4(0xb9090000, dst_reg, src_reg); |
72 |
+ break; |
73 |
+ case BPF_ALU | BPF_SUB | BPF_K: /* dst = (u32) dst - (u32) imm */ |
74 |
+- if (!imm) |
75 |
+- break; |
76 |
+- /* alfi %dst,-imm */ |
77 |
+- EMIT6_IMM(0xc20b0000, dst_reg, -imm); |
78 |
++ if (imm != 0) { |
79 |
++ /* alfi %dst,-imm */ |
80 |
++ EMIT6_IMM(0xc20b0000, dst_reg, -imm); |
81 |
++ } |
82 |
+ EMIT_ZERO(dst_reg); |
83 |
+ break; |
84 |
+ case BPF_ALU64 | BPF_SUB | BPF_K: /* dst = dst - imm */ |
85 |
+@@ -647,10 +647,10 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i |
86 |
+ EMIT4(0xb90c0000, dst_reg, src_reg); |
87 |
+ break; |
88 |
+ case BPF_ALU | BPF_MUL | BPF_K: /* dst = (u32) dst * (u32) imm */ |
89 |
+- if (imm == 1) |
90 |
+- break; |
91 |
+- /* msfi %r5,imm */ |
92 |
+- EMIT6_IMM(0xc2010000, dst_reg, imm); |
93 |
++ if (imm != 1) { |
94 |
++ /* msfi %r5,imm */ |
95 |
++ EMIT6_IMM(0xc2010000, dst_reg, imm); |
96 |
++ } |
97 |
+ EMIT_ZERO(dst_reg); |
98 |
+ break; |
99 |
+ case BPF_ALU64 | BPF_MUL | BPF_K: /* dst = dst * imm */ |
100 |
+@@ -711,6 +711,8 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i |
101 |
+ if (BPF_OP(insn->code) == BPF_MOD) |
102 |
+ /* lhgi %dst,0 */ |
103 |
+ EMIT4_IMM(0xa7090000, dst_reg, 0); |
104 |
++ else |
105 |
++ EMIT_ZERO(dst_reg); |
106 |
+ break; |
107 |
+ } |
108 |
+ /* lhi %w0,0 */ |
109 |
+@@ -803,10 +805,10 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i |
110 |
+ EMIT4(0xb9820000, dst_reg, src_reg); |
111 |
+ break; |
112 |
+ case BPF_ALU | BPF_XOR | BPF_K: /* dst = (u32) dst ^ (u32) imm */ |
113 |
+- if (!imm) |
114 |
+- break; |
115 |
+- /* xilf %dst,imm */ |
116 |
+- EMIT6_IMM(0xc0070000, dst_reg, imm); |
117 |
++ if (imm != 0) { |
118 |
++ /* xilf %dst,imm */ |
119 |
++ EMIT6_IMM(0xc0070000, dst_reg, imm); |
120 |
++ } |
121 |
+ EMIT_ZERO(dst_reg); |
122 |
+ break; |
123 |
+ case BPF_ALU64 | BPF_XOR | BPF_K: /* dst = dst ^ imm */ |
124 |
+@@ -827,10 +829,10 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i |
125 |
+ EMIT6_DISP_LH(0xeb000000, 0x000d, dst_reg, dst_reg, src_reg, 0); |
126 |
+ break; |
127 |
+ case BPF_ALU | BPF_LSH | BPF_K: /* dst = (u32) dst << (u32) imm */ |
128 |
+- if (imm == 0) |
129 |
+- break; |
130 |
+- /* sll %dst,imm(%r0) */ |
131 |
+- EMIT4_DISP(0x89000000, dst_reg, REG_0, imm); |
132 |
++ if (imm != 0) { |
133 |
++ /* sll %dst,imm(%r0) */ |
134 |
++ EMIT4_DISP(0x89000000, dst_reg, REG_0, imm); |
135 |
++ } |
136 |
+ EMIT_ZERO(dst_reg); |
137 |
+ break; |
138 |
+ case BPF_ALU64 | BPF_LSH | BPF_K: /* dst = dst << imm */ |
139 |
+@@ -852,10 +854,10 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i |
140 |
+ EMIT6_DISP_LH(0xeb000000, 0x000c, dst_reg, dst_reg, src_reg, 0); |
141 |
+ break; |
142 |
+ case BPF_ALU | BPF_RSH | BPF_K: /* dst = (u32) dst >> (u32) imm */ |
143 |
+- if (imm == 0) |
144 |
+- break; |
145 |
+- /* srl %dst,imm(%r0) */ |
146 |
+- EMIT4_DISP(0x88000000, dst_reg, REG_0, imm); |
147 |
++ if (imm != 0) { |
148 |
++ /* srl %dst,imm(%r0) */ |
149 |
++ EMIT4_DISP(0x88000000, dst_reg, REG_0, imm); |
150 |
++ } |
151 |
+ EMIT_ZERO(dst_reg); |
152 |
+ break; |
153 |
+ case BPF_ALU64 | BPF_RSH | BPF_K: /* dst = dst >> imm */ |
154 |
+diff --git a/block/blk-throttle.c b/block/blk-throttle.c |
155 |
+index a8cd7b3d96471..fcbbe2e45a2bb 100644 |
156 |
+--- a/block/blk-throttle.c |
157 |
++++ b/block/blk-throttle.c |
158 |
+@@ -2414,6 +2414,7 @@ int blk_throtl_init(struct request_queue *q) |
159 |
+ void blk_throtl_exit(struct request_queue *q) |
160 |
+ { |
161 |
+ BUG_ON(!q->td); |
162 |
++ del_timer_sync(&q->td->service_queue.pending_timer); |
163 |
+ throtl_shutdown_wq(q); |
164 |
+ blkcg_deactivate_policy(q, &blkcg_policy_throtl); |
165 |
+ free_percpu(q->td->latency_buckets); |
166 |
+diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c |
167 |
+index 830d03115efbc..5d39da4d2e026 100644 |
168 |
+--- a/drivers/crypto/talitos.c |
169 |
++++ b/drivers/crypto/talitos.c |
170 |
+@@ -816,7 +816,7 @@ static void talitos_unregister_rng(struct device *dev) |
171 |
+ * HMAC_SNOOP_NO_AFEA (HSNA) instead of type IPSEC_ESP |
172 |
+ */ |
173 |
+ #define TALITOS_CRA_PRIORITY_AEAD_HSNA (TALITOS_CRA_PRIORITY - 1) |
174 |
+-#ifdef CONFIG_CRYPTO_DEV_TALITOS_SEC2 |
175 |
++#ifdef CONFIG_CRYPTO_DEV_TALITOS2 |
176 |
+ #define TALITOS_MAX_KEY_SIZE (AES_MAX_KEY_SIZE + SHA512_BLOCK_SIZE) |
177 |
+ #else |
178 |
+ #define TALITOS_MAX_KEY_SIZE (AES_MAX_KEY_SIZE + SHA256_BLOCK_SIZE) |
179 |
+diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig |
180 |
+index ff69feefc1c67..5ea37d133f241 100644 |
181 |
+--- a/drivers/dma/Kconfig |
182 |
++++ b/drivers/dma/Kconfig |
183 |
+@@ -262,7 +262,7 @@ config INTEL_IDMA64 |
184 |
+ |
185 |
+ config INTEL_IOATDMA |
186 |
+ tristate "Intel I/OAT DMA support" |
187 |
+- depends on PCI && X86_64 |
188 |
++ depends on PCI && X86_64 && !UML |
189 |
+ select DMA_ENGINE |
190 |
+ select DMA_ENGINE_RAID |
191 |
+ select DCA |
192 |
+diff --git a/drivers/dma/acpi-dma.c b/drivers/dma/acpi-dma.c |
193 |
+index 8d99c84361cbb..22ec10c71d813 100644 |
194 |
+--- a/drivers/dma/acpi-dma.c |
195 |
++++ b/drivers/dma/acpi-dma.c |
196 |
+@@ -72,10 +72,14 @@ static int acpi_dma_parse_resource_group(const struct acpi_csrt_group *grp, |
197 |
+ |
198 |
+ si = (const struct acpi_csrt_shared_info *)&grp[1]; |
199 |
+ |
200 |
+- /* Match device by MMIO and IRQ */ |
201 |
++ /* Match device by MMIO */ |
202 |
+ if (si->mmio_base_low != lower_32_bits(mem) || |
203 |
+- si->mmio_base_high != upper_32_bits(mem) || |
204 |
+- si->gsi_interrupt != irq) |
205 |
++ si->mmio_base_high != upper_32_bits(mem)) |
206 |
++ return 0; |
207 |
++ |
208 |
++ /* Match device by Linux vIRQ */ |
209 |
++ ret = acpi_register_gsi(NULL, si->gsi_interrupt, si->interrupt_mode, si->interrupt_polarity); |
210 |
++ if (ret != irq) |
211 |
+ return 0; |
212 |
+ |
213 |
+ dev_dbg(&adev->dev, "matches with %.4s%04X (rev %u)\n", |
214 |
+diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c |
215 |
+index 21203e3a54fda..3c2084766a310 100644 |
216 |
+--- a/drivers/dma/xilinx/xilinx_dma.c |
217 |
++++ b/drivers/dma/xilinx/xilinx_dma.c |
218 |
+@@ -2585,7 +2585,7 @@ static int xilinx_dma_probe(struct platform_device *pdev) |
219 |
+ xdev->ext_addr = false; |
220 |
+ |
221 |
+ /* Set the dma mask bits */ |
222 |
+- dma_set_mask(xdev->dev, DMA_BIT_MASK(addr_width)); |
223 |
++ dma_set_mask_and_coherent(xdev->dev, DMA_BIT_MASK(addr_width)); |
224 |
+ |
225 |
+ /* Initialize the DMA engine */ |
226 |
+ xdev->common.dev = &pdev->dev; |
227 |
+diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c |
228 |
+index b0ece71aefdee..ce774579c89d1 100644 |
229 |
+--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c |
230 |
++++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c |
231 |
+@@ -57,7 +57,7 @@ nvkm_control_mthd_pstate_info(struct nvkm_control *ctrl, void *data, u32 size) |
232 |
+ args->v0.count = 0; |
233 |
+ args->v0.ustate_ac = NVIF_CONTROL_PSTATE_INFO_V0_USTATE_DISABLE; |
234 |
+ args->v0.ustate_dc = NVIF_CONTROL_PSTATE_INFO_V0_USTATE_DISABLE; |
235 |
+- args->v0.pwrsrc = -ENOSYS; |
236 |
++ args->v0.pwrsrc = -ENODEV; |
237 |
+ args->v0.pstate = NVIF_CONTROL_PSTATE_INFO_V0_PSTATE_UNKNOWN; |
238 |
+ } |
239 |
+ |
240 |
+diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c |
241 |
+index 8bed466308577..c11515bdac832 100644 |
242 |
+--- a/drivers/parisc/dino.c |
243 |
++++ b/drivers/parisc/dino.c |
244 |
+@@ -160,15 +160,6 @@ struct dino_device |
245 |
+ (struct dino_device *)__pdata; }) |
246 |
+ |
247 |
+ |
248 |
+-/* Check if PCI device is behind a Card-mode Dino. */ |
249 |
+-static int pci_dev_is_behind_card_dino(struct pci_dev *dev) |
250 |
+-{ |
251 |
+- struct dino_device *dino_dev; |
252 |
+- |
253 |
+- dino_dev = DINO_DEV(parisc_walk_tree(dev->bus->bridge)); |
254 |
+- return is_card_dino(&dino_dev->hba.dev->id); |
255 |
+-} |
256 |
+- |
257 |
+ /* |
258 |
+ * Dino Configuration Space Accessor Functions |
259 |
+ */ |
260 |
+@@ -452,6 +443,15 @@ static void quirk_cirrus_cardbus(struct pci_dev *dev) |
261 |
+ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_6832, quirk_cirrus_cardbus ); |
262 |
+ |
263 |
+ #ifdef CONFIG_TULIP |
264 |
++/* Check if PCI device is behind a Card-mode Dino. */ |
265 |
++static int pci_dev_is_behind_card_dino(struct pci_dev *dev) |
266 |
++{ |
267 |
++ struct dino_device *dino_dev; |
268 |
++ |
269 |
++ dino_dev = DINO_DEV(parisc_walk_tree(dev->bus->bridge)); |
270 |
++ return is_card_dino(&dino_dev->hba.dev->id); |
271 |
++} |
272 |
++ |
273 |
+ static void pci_fixup_tulip(struct pci_dev *dev) |
274 |
+ { |
275 |
+ if (!pci_dev_is_behind_card_dino(dev)) |
276 |
+diff --git a/drivers/pwm/pwm-lpc32xx.c b/drivers/pwm/pwm-lpc32xx.c |
277 |
+index a9b3cff96aaca..ed8e9406b4af2 100644 |
278 |
+--- a/drivers/pwm/pwm-lpc32xx.c |
279 |
++++ b/drivers/pwm/pwm-lpc32xx.c |
280 |
+@@ -124,17 +124,17 @@ static int lpc32xx_pwm_probe(struct platform_device *pdev) |
281 |
+ lpc32xx->chip.npwm = 1; |
282 |
+ lpc32xx->chip.base = -1; |
283 |
+ |
284 |
++ /* If PWM is disabled, configure the output to the default value */ |
285 |
++ val = readl(lpc32xx->base + (lpc32xx->chip.pwms[0].hwpwm << 2)); |
286 |
++ val &= ~PWM_PIN_LEVEL; |
287 |
++ writel(val, lpc32xx->base + (lpc32xx->chip.pwms[0].hwpwm << 2)); |
288 |
++ |
289 |
+ ret = pwmchip_add(&lpc32xx->chip); |
290 |
+ if (ret < 0) { |
291 |
+ dev_err(&pdev->dev, "failed to add PWM chip, error %d\n", ret); |
292 |
+ return ret; |
293 |
+ } |
294 |
+ |
295 |
+- /* When PWM is disable, configure the output to the default value */ |
296 |
+- val = readl(lpc32xx->base + (lpc32xx->chip.pwms[0].hwpwm << 2)); |
297 |
+- val &= ~PWM_PIN_LEVEL; |
298 |
+- writel(val, lpc32xx->base + (lpc32xx->chip.pwms[0].hwpwm << 2)); |
299 |
+- |
300 |
+ platform_set_drvdata(pdev, lpc32xx); |
301 |
+ |
302 |
+ return 0; |
303 |
+diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c |
304 |
+index 48bcc853d57a7..cf34fb00c0547 100644 |
305 |
+--- a/drivers/pwm/pwm-rockchip.c |
306 |
++++ b/drivers/pwm/pwm-rockchip.c |
307 |
+@@ -392,20 +392,6 @@ static int rockchip_pwm_remove(struct platform_device *pdev) |
308 |
+ { |
309 |
+ struct rockchip_pwm_chip *pc = platform_get_drvdata(pdev); |
310 |
+ |
311 |
+- /* |
312 |
+- * Disable the PWM clk before unpreparing it if the PWM device is still |
313 |
+- * running. This should only happen when the last PWM user left it |
314 |
+- * enabled, or when nobody requested a PWM that was previously enabled |
315 |
+- * by the bootloader. |
316 |
+- * |
317 |
+- * FIXME: Maybe the core should disable all PWM devices in |
318 |
+- * pwmchip_remove(). In this case we'd only have to call |
319 |
+- * clk_unprepare() after pwmchip_remove(). |
320 |
+- * |
321 |
+- */ |
322 |
+- if (pwm_is_enabled(pc->chip.pwms)) |
323 |
+- clk_disable(pc->clk); |
324 |
+- |
325 |
+ clk_unprepare(pc->pclk); |
326 |
+ clk_unprepare(pc->clk); |
327 |
+ |
328 |
+diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c |
329 |
+index d60069b5dc98d..b147f5f3dba2d 100644 |
330 |
+--- a/drivers/thermal/samsung/exynos_tmu.c |
331 |
++++ b/drivers/thermal/samsung/exynos_tmu.c |
332 |
+@@ -1371,6 +1371,7 @@ static int exynos_tmu_probe(struct platform_device *pdev) |
333 |
+ data->sclk = devm_clk_get(&pdev->dev, "tmu_sclk"); |
334 |
+ if (IS_ERR(data->sclk)) { |
335 |
+ dev_err(&pdev->dev, "Failed to get sclk\n"); |
336 |
++ ret = PTR_ERR(data->sclk); |
337 |
+ goto err_clk; |
338 |
+ } else { |
339 |
+ ret = clk_prepare_enable(data->sclk); |
340 |
+diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c |
341 |
+index b077b9a6bf953..a0168d9bb85dc 100644 |
342 |
+--- a/fs/ceph/caps.c |
343 |
++++ b/fs/ceph/caps.c |
344 |
+@@ -1657,6 +1657,8 @@ static int __mark_caps_flushing(struct inode *inode, |
345 |
+ * try to invalidate mapping pages without blocking. |
346 |
+ */ |
347 |
+ static int try_nonblocking_invalidate(struct inode *inode) |
348 |
++ __releases(ci->i_ceph_lock) |
349 |
++ __acquires(ci->i_ceph_lock) |
350 |
+ { |
351 |
+ struct ceph_inode_info *ci = ceph_inode(inode); |
352 |
+ u32 invalidating_gen = ci->i_rdcache_gen; |
353 |
+diff --git a/fs/nilfs2/sysfs.c b/fs/nilfs2/sysfs.c |
354 |
+index e9903bceb2bf1..33fba75aa9f38 100644 |
355 |
+--- a/fs/nilfs2/sysfs.c |
356 |
++++ b/fs/nilfs2/sysfs.c |
357 |
+@@ -73,11 +73,9 @@ static const struct sysfs_ops nilfs_##name##_attr_ops = { \ |
358 |
+ #define NILFS_DEV_INT_GROUP_TYPE(name, parent_name) \ |
359 |
+ static void nilfs_##name##_attr_release(struct kobject *kobj) \ |
360 |
+ { \ |
361 |
+- struct nilfs_sysfs_##parent_name##_subgroups *subgroups; \ |
362 |
+- struct the_nilfs *nilfs = container_of(kobj->parent, \ |
363 |
+- struct the_nilfs, \ |
364 |
+- ns_##parent_name##_kobj); \ |
365 |
+- subgroups = nilfs->ns_##parent_name##_subgroups; \ |
366 |
++ struct nilfs_sysfs_##parent_name##_subgroups *subgroups = container_of(kobj, \ |
367 |
++ struct nilfs_sysfs_##parent_name##_subgroups, \ |
368 |
++ sg_##name##_kobj); \ |
369 |
+ complete(&subgroups->sg_##name##_kobj_unregister); \ |
370 |
+ } \ |
371 |
+ static struct kobj_type nilfs_##name##_ktype = { \ |
372 |
+@@ -103,12 +101,12 @@ static int nilfs_sysfs_create_##name##_group(struct the_nilfs *nilfs) \ |
373 |
+ err = kobject_init_and_add(kobj, &nilfs_##name##_ktype, parent, \ |
374 |
+ #name); \ |
375 |
+ if (err) \ |
376 |
+- return err; \ |
377 |
+- return 0; \ |
378 |
++ kobject_put(kobj); \ |
379 |
++ return err; \ |
380 |
+ } \ |
381 |
+ static void nilfs_sysfs_delete_##name##_group(struct the_nilfs *nilfs) \ |
382 |
+ { \ |
383 |
+- kobject_del(&nilfs->ns_##parent_name##_subgroups->sg_##name##_kobj); \ |
384 |
++ kobject_put(&nilfs->ns_##parent_name##_subgroups->sg_##name##_kobj); \ |
385 |
+ } |
386 |
+ |
387 |
+ /************************************************************************ |
388 |
+@@ -219,14 +217,14 @@ int nilfs_sysfs_create_snapshot_group(struct nilfs_root *root) |
389 |
+ } |
390 |
+ |
391 |
+ if (err) |
392 |
+- return err; |
393 |
++ kobject_put(&root->snapshot_kobj); |
394 |
+ |
395 |
+- return 0; |
396 |
++ return err; |
397 |
+ } |
398 |
+ |
399 |
+ void nilfs_sysfs_delete_snapshot_group(struct nilfs_root *root) |
400 |
+ { |
401 |
+- kobject_del(&root->snapshot_kobj); |
402 |
++ kobject_put(&root->snapshot_kobj); |
403 |
+ } |
404 |
+ |
405 |
+ /************************************************************************ |
406 |
+@@ -1010,7 +1008,7 @@ int nilfs_sysfs_create_device_group(struct super_block *sb) |
407 |
+ err = kobject_init_and_add(&nilfs->ns_dev_kobj, &nilfs_dev_ktype, NULL, |
408 |
+ "%s", sb->s_id); |
409 |
+ if (err) |
410 |
+- goto free_dev_subgroups; |
411 |
++ goto cleanup_dev_kobject; |
412 |
+ |
413 |
+ err = nilfs_sysfs_create_mounted_snapshots_group(nilfs); |
414 |
+ if (err) |
415 |
+@@ -1047,9 +1045,7 @@ delete_mounted_snapshots_group: |
416 |
+ nilfs_sysfs_delete_mounted_snapshots_group(nilfs); |
417 |
+ |
418 |
+ cleanup_dev_kobject: |
419 |
+- kobject_del(&nilfs->ns_dev_kobj); |
420 |
+- |
421 |
+-free_dev_subgroups: |
422 |
++ kobject_put(&nilfs->ns_dev_kobj); |
423 |
+ kfree(nilfs->ns_dev_subgroups); |
424 |
+ |
425 |
+ failed_create_device_group: |
426 |
+diff --git a/kernel/profile.c b/kernel/profile.c |
427 |
+index 9aa2a4445b0d2..efa58f63dc1bf 100644 |
428 |
+--- a/kernel/profile.c |
429 |
++++ b/kernel/profile.c |
430 |
+@@ -40,7 +40,8 @@ struct profile_hit { |
431 |
+ #define NR_PROFILE_GRP (NR_PROFILE_HIT/PROFILE_GRPSZ) |
432 |
+ |
433 |
+ static atomic_t *prof_buffer; |
434 |
+-static unsigned long prof_len, prof_shift; |
435 |
++static unsigned long prof_len; |
436 |
++static unsigned short int prof_shift; |
437 |
+ |
438 |
+ int prof_on __read_mostly; |
439 |
+ EXPORT_SYMBOL_GPL(prof_on); |
440 |
+@@ -66,8 +67,8 @@ int profile_setup(char *str) |
441 |
+ if (str[strlen(sleepstr)] == ',') |
442 |
+ str += strlen(sleepstr) + 1; |
443 |
+ if (get_option(&str, &par)) |
444 |
+- prof_shift = par; |
445 |
+- pr_info("kernel sleep profiling enabled (shift: %ld)\n", |
446 |
++ prof_shift = clamp(par, 0, BITS_PER_LONG - 1); |
447 |
++ pr_info("kernel sleep profiling enabled (shift: %u)\n", |
448 |
+ prof_shift); |
449 |
+ #else |
450 |
+ pr_warn("kernel sleep profiling requires CONFIG_SCHEDSTATS\n"); |
451 |
+@@ -77,21 +78,21 @@ int profile_setup(char *str) |
452 |
+ if (str[strlen(schedstr)] == ',') |
453 |
+ str += strlen(schedstr) + 1; |
454 |
+ if (get_option(&str, &par)) |
455 |
+- prof_shift = par; |
456 |
+- pr_info("kernel schedule profiling enabled (shift: %ld)\n", |
457 |
++ prof_shift = clamp(par, 0, BITS_PER_LONG - 1); |
458 |
++ pr_info("kernel schedule profiling enabled (shift: %u)\n", |
459 |
+ prof_shift); |
460 |
+ } else if (!strncmp(str, kvmstr, strlen(kvmstr))) { |
461 |
+ prof_on = KVM_PROFILING; |
462 |
+ if (str[strlen(kvmstr)] == ',') |
463 |
+ str += strlen(kvmstr) + 1; |
464 |
+ if (get_option(&str, &par)) |
465 |
+- prof_shift = par; |
466 |
+- pr_info("kernel KVM profiling enabled (shift: %ld)\n", |
467 |
++ prof_shift = clamp(par, 0, BITS_PER_LONG - 1); |
468 |
++ pr_info("kernel KVM profiling enabled (shift: %u)\n", |
469 |
+ prof_shift); |
470 |
+ } else if (get_option(&str, &par)) { |
471 |
+- prof_shift = par; |
472 |
++ prof_shift = clamp(par, 0, BITS_PER_LONG - 1); |
473 |
+ prof_on = CPU_PROFILING; |
474 |
+- pr_info("kernel profiling enabled (shift: %ld)\n", |
475 |
++ pr_info("kernel profiling enabled (shift: %u)\n", |
476 |
+ prof_shift); |
477 |
+ } |
478 |
+ return 1; |
479 |
+@@ -467,7 +468,7 @@ read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos) |
480 |
+ unsigned long p = *ppos; |
481 |
+ ssize_t read; |
482 |
+ char *pnt; |
483 |
+- unsigned int sample_step = 1 << prof_shift; |
484 |
++ unsigned long sample_step = 1UL << prof_shift; |
485 |
+ |
486 |
+ profile_flip_buffers(); |
487 |
+ if (p >= (prof_len+1)*sizeof(unsigned int)) |
488 |
+diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h |
489 |
+index 46d61b5977318..f90d10c1c3c8d 100644 |
490 |
+--- a/kernel/rcu/tree_exp.h |
491 |
++++ b/kernel/rcu/tree_exp.h |
492 |
+@@ -534,7 +534,7 @@ static void rcu_exp_wait_wake(struct rcu_state *rsp, unsigned long s) |
493 |
+ spin_unlock(&rnp->exp_lock); |
494 |
+ } |
495 |
+ smp_mb(); /* All above changes before wakeup. */ |
496 |
+- wake_up_all(&rnp->exp_wq[rcu_seq_ctr(rsp->expedited_sequence) & 0x3]); |
497 |
++ wake_up_all(&rnp->exp_wq[rcu_seq_ctr(s) & 0x3]); |
498 |
+ } |
499 |
+ trace_rcu_exp_grace_period(rsp->name, s, TPS("endwake")); |
500 |
+ mutex_unlock(&rsp->exp_wake_mutex); |
501 |
+diff --git a/kernel/sys.c b/kernel/sys.c |
502 |
+index 2e4f017f7c5aa..65701dd2707e4 100644 |
503 |
+--- a/kernel/sys.c |
504 |
++++ b/kernel/sys.c |
505 |
+@@ -1873,13 +1873,6 @@ static int validate_prctl_map(struct prctl_mm_map *prctl_map) |
506 |
+ |
507 |
+ error = -EINVAL; |
508 |
+ |
509 |
+- /* |
510 |
+- * @brk should be after @end_data in traditional maps. |
511 |
+- */ |
512 |
+- if (prctl_map->start_brk <= prctl_map->end_data || |
513 |
+- prctl_map->brk <= prctl_map->end_data) |
514 |
+- goto out; |
515 |
+- |
516 |
+ /* |
517 |
+ * Neither we should allow to override limits if they set. |
518 |
+ */ |
519 |
+diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug |
520 |
+index e1df563cdfe7e..428eaf16a1d25 100644 |
521 |
+--- a/lib/Kconfig.debug |
522 |
++++ b/lib/Kconfig.debug |
523 |
+@@ -816,7 +816,6 @@ config HARDLOCKUP_DETECTOR |
524 |
+ depends on HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_ARCH |
525 |
+ select LOCKUP_DETECTOR |
526 |
+ select HARDLOCKUP_DETECTOR_PERF if HAVE_HARDLOCKUP_DETECTOR_PERF |
527 |
+- select HARDLOCKUP_DETECTOR_ARCH if HAVE_HARDLOCKUP_DETECTOR_ARCH |
528 |
+ help |
529 |
+ Say Y here to enable the kernel to act as a watchdog to detect |
530 |
+ hard lockups. |
531 |
+diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c |
532 |
+index f88911cffa1ad..c6a46e8e9eda5 100644 |
533 |
+--- a/net/9p/trans_virtio.c |
534 |
++++ b/net/9p/trans_virtio.c |
535 |
+@@ -602,7 +602,7 @@ static int p9_virtio_probe(struct virtio_device *vdev) |
536 |
+ chan->vc_wq = kmalloc(sizeof(wait_queue_head_t), GFP_KERNEL); |
537 |
+ if (!chan->vc_wq) { |
538 |
+ err = -ENOMEM; |
539 |
+- goto out_free_tag; |
540 |
++ goto out_remove_file; |
541 |
+ } |
542 |
+ init_waitqueue_head(chan->vc_wq); |
543 |
+ chan->ring_bufs_avail = 1; |
544 |
+@@ -620,6 +620,8 @@ static int p9_virtio_probe(struct virtio_device *vdev) |
545 |
+ |
546 |
+ return 0; |
547 |
+ |
548 |
++out_remove_file: |
549 |
++ sysfs_remove_file(&vdev->dev.kobj, &dev_attr_mount_tag.attr); |
550 |
+ out_free_tag: |
551 |
+ kfree(tag); |
552 |
+ out_free_vq: |
553 |
+diff --git a/net/sctp/input.c b/net/sctp/input.c |
554 |
+index 90428c59cfaf8..89a24de230869 100644 |
555 |
+--- a/net/sctp/input.c |
556 |
++++ b/net/sctp/input.c |
557 |
+@@ -1118,6 +1118,9 @@ static struct sctp_association *__sctp_rcv_asconf_lookup( |
558 |
+ union sctp_addr_param *param; |
559 |
+ union sctp_addr paddr; |
560 |
+ |
561 |
++ if (ntohs(ch->length) < sizeof(*asconf) + sizeof(struct sctp_paramhdr)) |
562 |
++ return NULL; |
563 |
++ |
564 |
+ /* Skip over the ADDIP header and find the Address parameter */ |
565 |
+ param = (union sctp_addr_param *)(asconf + 1); |
566 |
+ |
567 |
+diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c |
568 |
+index 3a7bee87054a8..591d6a1d1b213 100644 |
569 |
+--- a/net/sctp/sm_make_chunk.c |
570 |
++++ b/net/sctp/sm_make_chunk.c |
571 |
+@@ -2161,9 +2161,16 @@ static enum sctp_ierror sctp_verify_param(struct net *net, |
572 |
+ break; |
573 |
+ |
574 |
+ case SCTP_PARAM_SET_PRIMARY: |
575 |
+- if (net->sctp.addip_enable) |
576 |
+- break; |
577 |
+- goto fallthrough; |
578 |
++ if (!net->sctp.addip_enable) |
579 |
++ goto fallthrough; |
580 |
++ |
581 |
++ if (ntohs(param.p->length) < sizeof(struct sctp_addip_param) + |
582 |
++ sizeof(struct sctp_paramhdr)) { |
583 |
++ sctp_process_inv_paramlength(asoc, param.p, |
584 |
++ chunk, err_chunk); |
585 |
++ retval = SCTP_IERROR_ABORT; |
586 |
++ } |
587 |
++ break; |
588 |
+ |
589 |
+ case SCTP_PARAM_HOST_NAME_ADDRESS: |
590 |
+ /* Tell the peer, we won't support this param. */ |
591 |
+diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c |
592 |
+index 5341d8e52a2b3..afd3e06e8fdda 100644 |
593 |
+--- a/security/apparmor/apparmorfs.c |
594 |
++++ b/security/apparmor/apparmorfs.c |
595 |
+@@ -1900,9 +1900,6 @@ fail2: |
596 |
+ return error; |
597 |
+ } |
598 |
+ |
599 |
+- |
600 |
+-#define list_entry_is_head(pos, head, member) (&pos->member == (head)) |
601 |
+- |
602 |
+ /** |
603 |
+ * __next_ns - find the next namespace to list |
604 |
+ * @root: root namespace to stop search at (NOT NULL) |