Magellan Linux

Annotation of /trunk/kernel-alx/patches-4.14/0118-4.14.19-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3238 - (hide annotations) (download)
Fri Nov 9 12:14:58 2018 UTC (5 years, 7 months ago) by niro
File size: 27415 byte(s)
-added up to patches-4.14.79
1 niro 3238 diff --git a/.gitignore b/.gitignore
2     index 0c39aa20b6ba..f6050b88e95b 100644
3     --- a/.gitignore
4     +++ b/.gitignore
5     @@ -7,38 +7,40 @@
6     # command after changing this file, to see if there are
7     # any tracked files which get ignored after the change.
8     #
9     -# Normal rules
10     +# Normal rules (sorted alphabetically)
11     #
12     .*
13     +*.a
14     +*.bin
15     +*.bz2
16     +*.c.[012]*.*
17     +*.dtb
18     +*.dtb.S
19     +*.dwo
20     +*.elf
21     +*.gcno
22     +*.gz
23     +*.i
24     +*.ko
25     +*.ll
26     +*.lst
27     +*.lz4
28     +*.lzma
29     +*.lzo
30     +*.mod.c
31     *.o
32     *.o.*
33     -*.a
34     +*.order
35     +*.patch
36     *.s
37     -*.ko
38     *.so
39     *.so.dbg
40     -*.mod.c
41     -*.i
42     -*.lst
43     +*.su
44     *.symtypes
45     -*.order
46     -*.elf
47     -*.bin
48     *.tar
49     -*.gz
50     -*.bz2
51     -*.lzma
52     *.xz
53     -*.lz4
54     -*.lzo
55     -*.patch
56     -*.gcno
57     -*.ll
58     -modules.builtin
59     Module.symvers
60     -*.dwo
61     -*.su
62     -*.c.[012]*.*
63     +modules.builtin
64    
65     #
66     # Top-level generic files
67     @@ -53,6 +55,11 @@ Module.symvers
68     /System.map
69     /Module.markers
70    
71     +#
72     +# RPM spec file (make rpm-pkg)
73     +#
74     +/*.spec
75     +
76     #
77     # Debian directory (make deb-pkg)
78     #
79     diff --git a/Makefile b/Makefile
80     index a69e5da9ed86..76a0b13623f4 100644
81     --- a/Makefile
82     +++ b/Makefile
83     @@ -1,7 +1,7 @@
84     # SPDX-License-Identifier: GPL-2.0
85     VERSION = 4
86     PATCHLEVEL = 14
87     -SUBLEVEL = 18
88     +SUBLEVEL = 19
89     EXTRAVERSION =
90     NAME = Petit Gorille
91    
92     diff --git a/arch/arc/boot/.gitignore b/arch/arc/boot/.gitignore
93     index 5246969a20c5..c4c5fd529c25 100644
94     --- a/arch/arc/boot/.gitignore
95     +++ b/arch/arc/boot/.gitignore
96     @@ -1,2 +1 @@
97     -*.dtb*
98     uImage
99     diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore
100     index 3c79f85975aa..ce1c5ff746e7 100644
101     --- a/arch/arm/boot/.gitignore
102     +++ b/arch/arm/boot/.gitignore
103     @@ -3,4 +3,3 @@ zImage
104     xipImage
105     bootpImage
106     uImage
107     -*.dtb
108     diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
109     index 0fcd82f01388..b8dc3b516f93 100644
110     --- a/arch/arm/kernel/traps.c
111     +++ b/arch/arm/kernel/traps.c
112     @@ -790,7 +790,6 @@ void abort(void)
113     /* if that doesn't kill us, halt */
114     panic("Oops failed to kill thread");
115     }
116     -EXPORT_SYMBOL(abort);
117    
118     void __init trap_init(void)
119     {
120     diff --git a/arch/arm64/boot/dts/.gitignore b/arch/arm64/boot/dts/.gitignore
121     deleted file mode 100644
122     index b60ed208c779..000000000000
123     --- a/arch/arm64/boot/dts/.gitignore
124     +++ /dev/null
125     @@ -1 +0,0 @@
126     -*.dtb
127     diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c
128     index cb79fba79d43..b88a8dd14933 100644
129     --- a/arch/m32r/kernel/traps.c
130     +++ b/arch/m32r/kernel/traps.c
131     @@ -122,7 +122,6 @@ void abort(void)
132     /* if that doesn't kill us, halt */
133     panic("Oops failed to kill thread");
134     }
135     -EXPORT_SYMBOL(abort);
136    
137     void __init trap_init(void)
138     {
139     diff --git a/arch/metag/boot/.gitignore b/arch/metag/boot/.gitignore
140     index 2d6c0c160884..6c662ddb909a 100644
141     --- a/arch/metag/boot/.gitignore
142     +++ b/arch/metag/boot/.gitignore
143     @@ -1,4 +1,3 @@
144     vmlinux*
145     uImage*
146     ramdisk.*
147     -*.dtb*
148     diff --git a/arch/microblaze/boot/.gitignore b/arch/microblaze/boot/.gitignore
149     index bf0459186027..679502d64a97 100644
150     --- a/arch/microblaze/boot/.gitignore
151     +++ b/arch/microblaze/boot/.gitignore
152     @@ -1,3 +1,2 @@
153     -*.dtb
154     linux.bin*
155     simpleImage.*
156     diff --git a/arch/mips/boot/.gitignore b/arch/mips/boot/.gitignore
157     index d3962cd5ce0c..a73d6e2c4f64 100644
158     --- a/arch/mips/boot/.gitignore
159     +++ b/arch/mips/boot/.gitignore
160     @@ -5,4 +5,3 @@ zImage
161     zImage.tmp
162     calc_vmlinuz_load_addr
163     uImage
164     -*.dtb
165     diff --git a/arch/nios2/boot/.gitignore b/arch/nios2/boot/.gitignore
166     index 109279ca5a4d..64386a8dedd8 100644
167     --- a/arch/nios2/boot/.gitignore
168     +++ b/arch/nios2/boot/.gitignore
169     @@ -1,2 +1 @@
170     -*.dtb
171     vmImage
172     diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore
173     index 84774ccba1c2..f92d0530ceb1 100644
174     --- a/arch/powerpc/boot/.gitignore
175     +++ b/arch/powerpc/boot/.gitignore
176     @@ -18,7 +18,6 @@ otheros.bld
177     uImage
178     cuImage.*
179     dtbImage.*
180     -*.dtb
181     treeImage.*
182     vmlinux.strip
183     zImage
184     diff --git a/arch/unicore32/kernel/traps.c b/arch/unicore32/kernel/traps.c
185     index 5f25b39f04d4..c4ac6043ebb0 100644
186     --- a/arch/unicore32/kernel/traps.c
187     +++ b/arch/unicore32/kernel/traps.c
188     @@ -298,7 +298,6 @@ void abort(void)
189     /* if that doesn't kill us, halt */
190     panic("Oops failed to kill thread");
191     }
192     -EXPORT_SYMBOL(abort);
193    
194     void __init trap_init(void)
195     {
196     diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
197     index 21be0193d9dc..b034826a0b3b 100644
198     --- a/arch/x86/kernel/alternative.c
199     +++ b/arch/x86/kernel/alternative.c
200     @@ -287,7 +287,7 @@ recompute_jump(struct alt_instr *a, u8 *orig_insn, u8 *repl_insn, u8 *insnbuf)
201     tgt_rip = next_rip + o_dspl;
202     n_dspl = tgt_rip - orig_insn;
203    
204     - DPRINTK("target RIP: %px, new_displ: 0x%x", tgt_rip, n_dspl);
205     + DPRINTK("target RIP: %p, new_displ: 0x%x", tgt_rip, n_dspl);
206    
207     if (tgt_rip - orig_insn >= 0) {
208     if (n_dspl - 2 <= 127)
209     @@ -344,7 +344,7 @@ static void __init_or_module noinline optimize_nops(struct alt_instr *a, u8 *ins
210     add_nops(instr + (a->instrlen - a->padlen), a->padlen);
211     local_irq_restore(flags);
212    
213     - DUMP_BYTES(instr, a->instrlen, "%px: [%d:%d) optimized NOPs: ",
214     + DUMP_BYTES(instr, a->instrlen, "%p: [%d:%d) optimized NOPs: ",
215     instr, a->instrlen - a->padlen, a->padlen);
216     }
217    
218     @@ -365,7 +365,7 @@ void __init_or_module noinline apply_alternatives(struct alt_instr *start,
219     u8 *instr, *replacement;
220     u8 insnbuf[MAX_PATCH_LEN];
221    
222     - DPRINTK("alt table %px, -> %px", start, end);
223     + DPRINTK("alt table %p -> %p", start, end);
224     /*
225     * The scan order should be from start to end. A later scanned
226     * alternative code can overwrite previously scanned alternative code.
227     @@ -389,14 +389,14 @@ void __init_or_module noinline apply_alternatives(struct alt_instr *start,
228     continue;
229     }
230    
231     - DPRINTK("feat: %d*32+%d, old: (%px len: %d), repl: (%px, len: %d), pad: %d",
232     + DPRINTK("feat: %d*32+%d, old: (%p, len: %d), repl: (%p, len: %d), pad: %d",
233     a->cpuid >> 5,
234     a->cpuid & 0x1f,
235     instr, a->instrlen,
236     replacement, a->replacementlen, a->padlen);
237    
238     - DUMP_BYTES(instr, a->instrlen, "%px: old_insn: ", instr);
239     - DUMP_BYTES(replacement, a->replacementlen, "%px: rpl_insn: ", replacement);
240     + DUMP_BYTES(instr, a->instrlen, "%p: old_insn: ", instr);
241     + DUMP_BYTES(replacement, a->replacementlen, "%p: rpl_insn: ", replacement);
242    
243     memcpy(insnbuf, replacement, a->replacementlen);
244     insnbuf_sz = a->replacementlen;
245     @@ -422,7 +422,7 @@ void __init_or_module noinline apply_alternatives(struct alt_instr *start,
246     a->instrlen - a->replacementlen);
247     insnbuf_sz += a->instrlen - a->replacementlen;
248     }
249     - DUMP_BYTES(insnbuf, insnbuf_sz, "%px: final_insn: ", instr);
250     + DUMP_BYTES(insnbuf, insnbuf_sz, "%p: final_insn: ", instr);
251    
252     text_poke_early(instr, insnbuf, insnbuf_sz);
253     }
254     diff --git a/arch/xtensa/boot/.gitignore b/arch/xtensa/boot/.gitignore
255     index be7655998b26..38177c7ebcab 100644
256     --- a/arch/xtensa/boot/.gitignore
257     +++ b/arch/xtensa/boot/.gitignore
258     @@ -1,3 +1,2 @@
259     uImage
260     zImage.redboot
261     -*.dtb
262     diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
263     index f5f58a6eee5d..e339960dcac7 100644
264     --- a/crypto/tcrypt.c
265     +++ b/crypto/tcrypt.c
266     @@ -221,11 +221,13 @@ static void sg_init_aead(struct scatterlist *sg, char *xbuf[XBUFSIZE],
267     }
268    
269     sg_init_table(sg, np + 1);
270     - np--;
271     + if (rem)
272     + np--;
273     for (k = 0; k < np; k++)
274     sg_set_buf(&sg[k + 1], xbuf[k], PAGE_SIZE);
275    
276     - sg_set_buf(&sg[k + 1], xbuf[k], rem);
277     + if (rem)
278     + sg_set_buf(&sg[k + 1], xbuf[k], rem);
279     }
280    
281     static void test_aead_speed(const char *algo, int enc, unsigned int secs,
282     diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.c
283     index 46768c056193..0c28d0b995cc 100644
284     --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.c
285     +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.c
286     @@ -115,3 +115,6 @@ struct mtk_vcodec_ctx *mtk_vcodec_get_curr_ctx(struct mtk_vcodec_dev *dev)
287     return ctx;
288     }
289     EXPORT_SYMBOL(mtk_vcodec_get_curr_ctx);
290     +
291     +MODULE_LICENSE("GPL v2");
292     +MODULE_DESCRIPTION("Mediatek video codec driver");
293     diff --git a/drivers/media/platform/soc_camera/soc_scale_crop.c b/drivers/media/platform/soc_camera/soc_scale_crop.c
294     index 0116097c0c0f..092c73f24589 100644
295     --- a/drivers/media/platform/soc_camera/soc_scale_crop.c
296     +++ b/drivers/media/platform/soc_camera/soc_scale_crop.c
297     @@ -419,3 +419,7 @@ void soc_camera_calc_client_output(struct soc_camera_device *icd,
298     mf->height = soc_camera_shift_scale(rect->height, shift, scale_v);
299     }
300     EXPORT_SYMBOL(soc_camera_calc_client_output);
301     +
302     +MODULE_DESCRIPTION("soc-camera scaling-cropping functions");
303     +MODULE_AUTHOR("Guennadi Liakhovetski <kernel@pengutronix.de>");
304     +MODULE_LICENSE("GPL");
305     diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
306     index f7080d0ab874..46b0372dd032 100644
307     --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
308     +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
309     @@ -3891,7 +3891,7 @@ static void qlcnic_83xx_flush_mbx_queue(struct qlcnic_adapter *adapter)
310     struct list_head *head = &mbx->cmd_q;
311     struct qlcnic_cmd_args *cmd = NULL;
312    
313     - spin_lock(&mbx->queue_lock);
314     + spin_lock_bh(&mbx->queue_lock);
315    
316     while (!list_empty(head)) {
317     cmd = list_entry(head->next, struct qlcnic_cmd_args, list);
318     @@ -3902,7 +3902,7 @@ static void qlcnic_83xx_flush_mbx_queue(struct qlcnic_adapter *adapter)
319     qlcnic_83xx_notify_cmd_completion(adapter, cmd);
320     }
321    
322     - spin_unlock(&mbx->queue_lock);
323     + spin_unlock_bh(&mbx->queue_lock);
324     }
325    
326     static int qlcnic_83xx_check_mbx_status(struct qlcnic_adapter *adapter)
327     @@ -3938,12 +3938,12 @@ static void qlcnic_83xx_dequeue_mbx_cmd(struct qlcnic_adapter *adapter,
328     {
329     struct qlcnic_mailbox *mbx = adapter->ahw->mailbox;
330    
331     - spin_lock(&mbx->queue_lock);
332     + spin_lock_bh(&mbx->queue_lock);
333    
334     list_del(&cmd->list);
335     mbx->num_cmds--;
336    
337     - spin_unlock(&mbx->queue_lock);
338     + spin_unlock_bh(&mbx->queue_lock);
339    
340     qlcnic_83xx_notify_cmd_completion(adapter, cmd);
341     }
342     @@ -4008,7 +4008,7 @@ static int qlcnic_83xx_enqueue_mbx_cmd(struct qlcnic_adapter *adapter,
343     init_completion(&cmd->completion);
344     cmd->rsp_opcode = QLC_83XX_MBX_RESPONSE_UNKNOWN;
345    
346     - spin_lock(&mbx->queue_lock);
347     + spin_lock_bh(&mbx->queue_lock);
348    
349     list_add_tail(&cmd->list, &mbx->cmd_q);
350     mbx->num_cmds++;
351     @@ -4016,7 +4016,7 @@ static int qlcnic_83xx_enqueue_mbx_cmd(struct qlcnic_adapter *adapter,
352     *timeout = cmd->total_cmds * QLC_83XX_MBX_TIMEOUT;
353     queue_work(mbx->work_q, &mbx->work);
354    
355     - spin_unlock(&mbx->queue_lock);
356     + spin_unlock_bh(&mbx->queue_lock);
357    
358     return 0;
359     }
360     @@ -4112,15 +4112,15 @@ static void qlcnic_83xx_mailbox_worker(struct work_struct *work)
361     mbx->rsp_status = QLC_83XX_MBX_RESPONSE_WAIT;
362     spin_unlock_irqrestore(&mbx->aen_lock, flags);
363    
364     - spin_lock(&mbx->queue_lock);
365     + spin_lock_bh(&mbx->queue_lock);
366    
367     if (list_empty(head)) {
368     - spin_unlock(&mbx->queue_lock);
369     + spin_unlock_bh(&mbx->queue_lock);
370     return;
371     }
372     cmd = list_entry(head->next, struct qlcnic_cmd_args, list);
373    
374     - spin_unlock(&mbx->queue_lock);
375     + spin_unlock_bh(&mbx->queue_lock);
376    
377     mbx_ops->encode_cmd(adapter, cmd);
378     mbx_ops->nofity_fw(adapter, QLC_83XX_MBX_REQUEST);
379     diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
380     index 958ff931e790..619a1b7281a0 100644
381     --- a/drivers/net/ethernet/realtek/r8169.c
382     +++ b/drivers/net/ethernet/realtek/r8169.c
383     @@ -1388,7 +1388,7 @@ DECLARE_RTL_COND(rtl_ocp_tx_cond)
384     {
385     void __iomem *ioaddr = tp->mmio_addr;
386    
387     - return RTL_R8(IBISR0) & 0x02;
388     + return RTL_R8(IBISR0) & 0x20;
389     }
390    
391     static void rtl8168ep_stop_cmac(struct rtl8169_private *tp)
392     @@ -1396,7 +1396,7 @@ static void rtl8168ep_stop_cmac(struct rtl8169_private *tp)
393     void __iomem *ioaddr = tp->mmio_addr;
394    
395     RTL_W8(IBCR2, RTL_R8(IBCR2) & ~0x01);
396     - rtl_msleep_loop_wait_low(tp, &rtl_ocp_tx_cond, 50, 2000);
397     + rtl_msleep_loop_wait_high(tp, &rtl_ocp_tx_cond, 50, 2000);
398     RTL_W8(IBISR0, RTL_R8(IBISR0) | 0x20);
399     RTL_W8(IBCR0, RTL_R8(IBCR0) & ~0x01);
400     }
401     diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c
402     index fc8f8bdf6579..056cb6093630 100644
403     --- a/drivers/net/ethernet/rocker/rocker_main.c
404     +++ b/drivers/net/ethernet/rocker/rocker_main.c
405     @@ -2902,6 +2902,12 @@ static int rocker_probe(struct pci_dev *pdev, const struct pci_device_id *id)
406     goto err_alloc_ordered_workqueue;
407     }
408    
409     + err = rocker_probe_ports(rocker);
410     + if (err) {
411     + dev_err(&pdev->dev, "failed to probe ports\n");
412     + goto err_probe_ports;
413     + }
414     +
415     /* Only FIBs pointing to our own netdevs are programmed into
416     * the device, so no need to pass a callback.
417     */
418     @@ -2918,22 +2924,16 @@ static int rocker_probe(struct pci_dev *pdev, const struct pci_device_id *id)
419    
420     rocker->hw.id = rocker_read64(rocker, SWITCH_ID);
421    
422     - err = rocker_probe_ports(rocker);
423     - if (err) {
424     - dev_err(&pdev->dev, "failed to probe ports\n");
425     - goto err_probe_ports;
426     - }
427     -
428     dev_info(&pdev->dev, "Rocker switch with id %*phN\n",
429     (int)sizeof(rocker->hw.id), &rocker->hw.id);
430    
431     return 0;
432    
433     -err_probe_ports:
434     - unregister_switchdev_notifier(&rocker_switchdev_notifier);
435     err_register_switchdev_notifier:
436     unregister_fib_notifier(&rocker->fib_nb);
437     err_register_fib_notifier:
438     + rocker_remove_ports(rocker);
439     +err_probe_ports:
440     destroy_workqueue(rocker->rocker_owq);
441     err_alloc_ordered_workqueue:
442     free_irq(rocker_msix_vector(rocker, ROCKER_MSIX_VEC_EVENT), rocker);
443     @@ -2961,9 +2961,9 @@ static void rocker_remove(struct pci_dev *pdev)
444     {
445     struct rocker *rocker = pci_get_drvdata(pdev);
446    
447     - rocker_remove_ports(rocker);
448     unregister_switchdev_notifier(&rocker_switchdev_notifier);
449     unregister_fib_notifier(&rocker->fib_nb);
450     + rocker_remove_ports(rocker);
451     rocker_write32(rocker, CONTROL, ROCKER_CONTROL_RESET);
452     destroy_workqueue(rocker->rocker_owq);
453     free_irq(rocker_msix_vector(rocker, ROCKER_MSIX_VEC_EVENT), rocker);
454     diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
455     index 2092febfcb42..8d9f02b7a71f 100644
456     --- a/drivers/net/usb/qmi_wwan.c
457     +++ b/drivers/net/usb/qmi_wwan.c
458     @@ -1243,6 +1243,7 @@ static const struct usb_device_id products[] = {
459     {QMI_QUIRK_SET_DTR(0x2c7c, 0x0125, 4)}, /* Quectel EC25, EC20 R2.0 Mini PCIe */
460     {QMI_QUIRK_SET_DTR(0x2c7c, 0x0121, 4)}, /* Quectel EC21 Mini PCIe */
461     {QMI_FIXED_INTF(0x2c7c, 0x0296, 4)}, /* Quectel BG96 */
462     + {QMI_QUIRK_SET_DTR(0x2c7c, 0x0306, 4)}, /* Quectel EP06 Mini PCIe */
463    
464     /* 4. Gobi 1000 devices */
465     {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
466     diff --git a/drivers/of/unittest-data/.gitignore b/drivers/of/unittest-data/.gitignore
467     deleted file mode 100644
468     index 4b3cf8b16de2..000000000000
469     --- a/drivers/of/unittest-data/.gitignore
470     +++ /dev/null
471     @@ -1,2 +0,0 @@
472     -testcases.dtb
473     -testcases.dtb.S
474     diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
475     index 5e7200f05873..c17ccb913fde 100644
476     --- a/drivers/scsi/storvsc_drv.c
477     +++ b/drivers/scsi/storvsc_drv.c
478     @@ -1826,8 +1826,10 @@ static int storvsc_probe(struct hv_device *device,
479     fc_host_node_name(host) = stor_device->node_name;
480     fc_host_port_name(host) = stor_device->port_name;
481     stor_device->rport = fc_remote_port_add(host, 0, &ids);
482     - if (!stor_device->rport)
483     + if (!stor_device->rport) {
484     + ret = -ENOMEM;
485     goto err_out3;
486     + }
487     }
488     #endif
489     return 0;
490     diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
491     index bd15309ac5f1..082891dffd9d 100644
492     --- a/drivers/vhost/net.c
493     +++ b/drivers/vhost/net.c
494     @@ -1212,6 +1212,7 @@ static long vhost_net_reset_owner(struct vhost_net *n)
495     }
496     vhost_net_stop(n, &tx_sock, &rx_sock);
497     vhost_net_flush(n);
498     + vhost_dev_stop(&n->dev);
499     vhost_dev_reset_owner(&n->dev, umem);
500     vhost_net_vq_reset(n);
501     done:
502     diff --git a/kernel/exit.c b/kernel/exit.c
503     index f6cad39f35df..e3a08761eb40 100644
504     --- a/kernel/exit.c
505     +++ b/kernel/exit.c
506     @@ -1755,3 +1755,12 @@ COMPAT_SYSCALL_DEFINE5(waitid,
507     return -EFAULT;
508     }
509     #endif
510     +
511     +__weak void abort(void)
512     +{
513     + BUG();
514     +
515     + /* if that doesn't kill us, halt */
516     + panic("Oops failed to kill thread");
517     +}
518     +EXPORT_SYMBOL(abort);
519     diff --git a/mm/memcontrol.c b/mm/memcontrol.c
520     index 53f7c919b916..66e7efabf0a1 100644
521     --- a/mm/memcontrol.c
522     +++ b/mm/memcontrol.c
523     @@ -5828,6 +5828,20 @@ void mem_cgroup_sk_alloc(struct sock *sk)
524     if (!mem_cgroup_sockets_enabled)
525     return;
526    
527     + /*
528     + * Socket cloning can throw us here with sk_memcg already
529     + * filled. It won't however, necessarily happen from
530     + * process context. So the test for root memcg given
531     + * the current task's memcg won't help us in this case.
532     + *
533     + * Respecting the original socket's memcg is a better
534     + * decision in this case.
535     + */
536     + if (sk->sk_memcg) {
537     + css_get(&sk->sk_memcg->css);
538     + return;
539     + }
540     +
541     rcu_read_lock();
542     memcg = mem_cgroup_from_task(current);
543     if (memcg == root_mem_cgroup)
544     diff --git a/net/core/sock.c b/net/core/sock.c
545     index 415f441c63b9..beb1e299fed3 100644
546     --- a/net/core/sock.c
547     +++ b/net/core/sock.c
548     @@ -1677,16 +1677,13 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
549     newsk->sk_dst_pending_confirm = 0;
550     newsk->sk_wmem_queued = 0;
551     newsk->sk_forward_alloc = 0;
552     -
553     - /* sk->sk_memcg will be populated at accept() time */
554     - newsk->sk_memcg = NULL;
555     -
556     atomic_set(&newsk->sk_drops, 0);
557     newsk->sk_send_head = NULL;
558     newsk->sk_userlocks = sk->sk_userlocks & ~SOCK_BINDPORT_LOCK;
559     atomic_set(&newsk->sk_zckey, 0);
560    
561     sock_reset_flag(newsk, SOCK_DONE);
562     + mem_cgroup_sk_alloc(newsk);
563     cgroup_sk_alloc(&newsk->sk_cgrp_data);
564    
565     rcu_read_lock();
566     diff --git a/net/core/sock_reuseport.c b/net/core/sock_reuseport.c
567     index 5eeb1d20cc38..676092d7bd81 100644
568     --- a/net/core/sock_reuseport.c
569     +++ b/net/core/sock_reuseport.c
570     @@ -94,6 +94,16 @@ static struct sock_reuseport *reuseport_grow(struct sock_reuseport *reuse)
571     return more_reuse;
572     }
573    
574     +static void reuseport_free_rcu(struct rcu_head *head)
575     +{
576     + struct sock_reuseport *reuse;
577     +
578     + reuse = container_of(head, struct sock_reuseport, rcu);
579     + if (reuse->prog)
580     + bpf_prog_destroy(reuse->prog);
581     + kfree(reuse);
582     +}
583     +
584     /**
585     * reuseport_add_sock - Add a socket to the reuseport group of another.
586     * @sk: New socket to add to the group.
587     @@ -102,7 +112,7 @@ static struct sock_reuseport *reuseport_grow(struct sock_reuseport *reuse)
588     */
589     int reuseport_add_sock(struct sock *sk, struct sock *sk2)
590     {
591     - struct sock_reuseport *reuse;
592     + struct sock_reuseport *old_reuse, *reuse;
593    
594     if (!rcu_access_pointer(sk2->sk_reuseport_cb)) {
595     int err = reuseport_alloc(sk2);
596     @@ -113,10 +123,13 @@ int reuseport_add_sock(struct sock *sk, struct sock *sk2)
597    
598     spin_lock_bh(&reuseport_lock);
599     reuse = rcu_dereference_protected(sk2->sk_reuseport_cb,
600     - lockdep_is_held(&reuseport_lock)),
601     - WARN_ONCE(rcu_dereference_protected(sk->sk_reuseport_cb,
602     - lockdep_is_held(&reuseport_lock)),
603     - "socket already in reuseport group");
604     + lockdep_is_held(&reuseport_lock));
605     + old_reuse = rcu_dereference_protected(sk->sk_reuseport_cb,
606     + lockdep_is_held(&reuseport_lock));
607     + if (old_reuse && old_reuse->num_socks != 1) {
608     + spin_unlock_bh(&reuseport_lock);
609     + return -EBUSY;
610     + }
611    
612     if (reuse->num_socks == reuse->max_socks) {
613     reuse = reuseport_grow(reuse);
614     @@ -134,19 +147,11 @@ int reuseport_add_sock(struct sock *sk, struct sock *sk2)
615    
616     spin_unlock_bh(&reuseport_lock);
617    
618     + if (old_reuse)
619     + call_rcu(&old_reuse->rcu, reuseport_free_rcu);
620     return 0;
621     }
622    
623     -static void reuseport_free_rcu(struct rcu_head *head)
624     -{
625     - struct sock_reuseport *reuse;
626     -
627     - reuse = container_of(head, struct sock_reuseport, rcu);
628     - if (reuse->prog)
629     - bpf_prog_destroy(reuse->prog);
630     - kfree(reuse);
631     -}
632     -
633     void reuseport_detach_sock(struct sock *sk)
634     {
635     struct sock_reuseport *reuse;
636     diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
637     index 013fed55b610..fbeb35ad804b 100644
638     --- a/net/ipv4/igmp.c
639     +++ b/net/ipv4/igmp.c
640     @@ -386,7 +386,11 @@ static struct sk_buff *igmpv3_newpack(struct net_device *dev, unsigned int mtu)
641     pip->frag_off = htons(IP_DF);
642     pip->ttl = 1;
643     pip->daddr = fl4.daddr;
644     +
645     + rcu_read_lock();
646     pip->saddr = igmpv3_get_srcaddr(dev, &fl4);
647     + rcu_read_unlock();
648     +
649     pip->protocol = IPPROTO_IGMP;
650     pip->tot_len = 0; /* filled in later */
651     ip_select_ident(net, skb, NULL);
652     diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
653     index b47a59cb3573..0cc08c512202 100644
654     --- a/net/ipv4/inet_connection_sock.c
655     +++ b/net/ipv4/inet_connection_sock.c
656     @@ -475,7 +475,6 @@ struct sock *inet_csk_accept(struct sock *sk, int flags, int *err, bool kern)
657     }
658     spin_unlock_bh(&queue->fastopenq.lock);
659     }
660     - mem_cgroup_sk_alloc(newsk);
661     out:
662     release_sock(sk);
663     if (req)
664     diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
665     index 2a65d806b562..fe11128d7df4 100644
666     --- a/net/ipv4/tcp.c
667     +++ b/net/ipv4/tcp.c
668     @@ -2379,6 +2379,12 @@ int tcp_disconnect(struct sock *sk, int flags)
669    
670     WARN_ON(inet->inet_num && !icsk->icsk_bind_hash);
671    
672     + if (sk->sk_frag.page) {
673     + put_page(sk->sk_frag.page);
674     + sk->sk_frag.page = NULL;
675     + sk->sk_frag.offset = 0;
676     + }
677     +
678     sk->sk_error_report(sk);
679     return err;
680     }
681     diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
682     index 8322f26e770e..25c5a0b60cfc 100644
683     --- a/net/ipv4/tcp_bbr.c
684     +++ b/net/ipv4/tcp_bbr.c
685     @@ -481,7 +481,8 @@ static void bbr_advance_cycle_phase(struct sock *sk)
686    
687     bbr->cycle_idx = (bbr->cycle_idx + 1) & (CYCLE_LEN - 1);
688     bbr->cycle_mstamp = tp->delivered_mstamp;
689     - bbr->pacing_gain = bbr_pacing_gain[bbr->cycle_idx];
690     + bbr->pacing_gain = bbr->lt_use_bw ? BBR_UNIT :
691     + bbr_pacing_gain[bbr->cycle_idx];
692     }
693    
694     /* Gain cycling: cycle pacing gain to converge to fair share of available bw. */
695     @@ -490,8 +491,7 @@ static void bbr_update_cycle_phase(struct sock *sk,
696     {
697     struct bbr *bbr = inet_csk_ca(sk);
698    
699     - if ((bbr->mode == BBR_PROBE_BW) && !bbr->lt_use_bw &&
700     - bbr_is_next_cycle_phase(sk, rs))
701     + if (bbr->mode == BBR_PROBE_BW && bbr_is_next_cycle_phase(sk, rs))
702     bbr_advance_cycle_phase(sk);
703     }
704    
705     diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
706     index c5318f5f6a14..6a76e41e6d51 100644
707     --- a/net/ipv6/addrconf.c
708     +++ b/net/ipv6/addrconf.c
709     @@ -184,7 +184,8 @@ static struct rt6_info *addrconf_get_prefix_route(const struct in6_addr *pfx,
710    
711     static void addrconf_dad_start(struct inet6_ifaddr *ifp);
712     static void addrconf_dad_work(struct work_struct *w);
713     -static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id);
714     +static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id,
715     + bool send_na);
716     static void addrconf_dad_run(struct inet6_dev *idev);
717     static void addrconf_rs_timer(unsigned long data);
718     static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa);
719     @@ -3825,12 +3826,17 @@ static void addrconf_dad_begin(struct inet6_ifaddr *ifp)
720     idev->cnf.accept_dad < 1) ||
721     !(ifp->flags&IFA_F_TENTATIVE) ||
722     ifp->flags & IFA_F_NODAD) {
723     + bool send_na = false;
724     +
725     + if (ifp->flags & IFA_F_TENTATIVE &&
726     + !(ifp->flags & IFA_F_OPTIMISTIC))
727     + send_na = true;
728     bump_id = ifp->flags & IFA_F_TENTATIVE;
729     ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED);
730     spin_unlock(&ifp->lock);
731     read_unlock_bh(&idev->lock);
732    
733     - addrconf_dad_completed(ifp, bump_id);
734     + addrconf_dad_completed(ifp, bump_id, send_na);
735     return;
736     }
737    
738     @@ -3959,16 +3965,21 @@ static void addrconf_dad_work(struct work_struct *w)
739     }
740    
741     if (ifp->dad_probes == 0) {
742     + bool send_na = false;
743     +
744     /*
745     * DAD was successful
746     */
747    
748     + if (ifp->flags & IFA_F_TENTATIVE &&
749     + !(ifp->flags & IFA_F_OPTIMISTIC))
750     + send_na = true;
751     bump_id = ifp->flags & IFA_F_TENTATIVE;
752     ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED);
753     spin_unlock(&ifp->lock);
754     write_unlock_bh(&idev->lock);
755    
756     - addrconf_dad_completed(ifp, bump_id);
757     + addrconf_dad_completed(ifp, bump_id, send_na);
758    
759     goto out;
760     }
761     @@ -4006,7 +4017,8 @@ static bool ipv6_lonely_lladdr(struct inet6_ifaddr *ifp)
762     return true;
763     }
764    
765     -static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id)
766     +static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id,
767     + bool send_na)
768     {
769     struct net_device *dev = ifp->idev->dev;
770     struct in6_addr lladdr;
771     @@ -4038,6 +4050,16 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id)
772     if (send_mld)
773     ipv6_mc_dad_complete(ifp->idev);
774    
775     + /* send unsolicited NA if enabled */
776     + if (send_na &&
777     + (ifp->idev->cnf.ndisc_notify ||
778     + dev_net(dev)->ipv6.devconf_all->ndisc_notify)) {
779     + ndisc_send_na(dev, &in6addr_linklocal_allnodes, &ifp->addr,
780     + /*router=*/ !!ifp->idev->cnf.forwarding,
781     + /*solicited=*/ false, /*override=*/ true,
782     + /*inc_opt=*/ true);
783     + }
784     +
785     if (send_rs) {
786     /*
787     * If a host as already performed a random delay
788     diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
789     index bcbd5f3bf8bd..9ccbf74deb99 100644
790     --- a/net/ipv6/af_inet6.c
791     +++ b/net/ipv6/af_inet6.c
792     @@ -284,6 +284,7 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
793     struct net *net = sock_net(sk);
794     __be32 v4addr = 0;
795     unsigned short snum;
796     + bool saved_ipv6only;
797     int addr_type = 0;
798     int err = 0;
799    
800     @@ -389,19 +390,21 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
801     if (!(addr_type & IPV6_ADDR_MULTICAST))
802     np->saddr = addr->sin6_addr;
803    
804     + saved_ipv6only = sk->sk_ipv6only;
805     + if (addr_type != IPV6_ADDR_ANY && addr_type != IPV6_ADDR_MAPPED)
806     + sk->sk_ipv6only = 1;
807     +
808     /* Make sure we are allowed to bind here. */
809     if ((snum || !inet->bind_address_no_port) &&
810     sk->sk_prot->get_port(sk, snum)) {
811     + sk->sk_ipv6only = saved_ipv6only;
812     inet_reset_saddr(sk);
813     err = -EADDRINUSE;
814     goto out;
815     }
816    
817     - if (addr_type != IPV6_ADDR_ANY) {
818     + if (addr_type != IPV6_ADDR_ANY)
819     sk->sk_userlocks |= SOCK_BINDADDR_LOCK;
820     - if (addr_type != IPV6_ADDR_MAPPED)
821     - sk->sk_ipv6only = 1;
822     - }
823     if (snum)
824     sk->sk_userlocks |= SOCK_BINDPORT_LOCK;
825     inet->inet_sport = htons(inet->inet_num);
826     diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
827     index f5500f5444e9..e1060f28410d 100644
828     --- a/net/ipv6/ip6mr.c
829     +++ b/net/ipv6/ip6mr.c
830     @@ -496,6 +496,7 @@ static void *ipmr_mfc_seq_start(struct seq_file *seq, loff_t *pos)
831     return ERR_PTR(-ENOENT);
832    
833     it->mrt = mrt;
834     + it->cache = NULL;
835     return *pos ? ipmr_mfc_seq_idx(net, seq->private, *pos - 1)
836     : SEQ_START_TOKEN;
837     }
838     diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
839     index 266a530414d7..2a937c8d19e9 100644
840     --- a/net/ipv6/ndisc.c
841     +++ b/net/ipv6/ndisc.c
842     @@ -558,6 +558,11 @@ static void ndisc_send_unsol_na(struct net_device *dev)
843    
844     read_lock_bh(&idev->lock);
845     list_for_each_entry(ifa, &idev->addr_list, if_list) {
846     + /* skip tentative addresses until dad completes */
847     + if (ifa->flags & IFA_F_TENTATIVE &&
848     + !(ifa->flags & IFA_F_OPTIMISTIC))
849     + continue;
850     +
851     ndisc_send_na(dev, &in6addr_linklocal_allnodes, &ifa->addr,
852     /*router=*/ !!idev->cnf.forwarding,
853     /*solicited=*/ false, /*override=*/ true,
854     diff --git a/scripts/package/Makefile b/scripts/package/Makefile
855     index 34de8b953ecf..348af5b20618 100644
856     --- a/scripts/package/Makefile
857     +++ b/scripts/package/Makefile
858     @@ -50,7 +50,6 @@ rpm-pkg rpm: FORCE
859     $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
860     $(call cmd,src_tar,$(KERNELPATH),kernel.spec)
861     +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
862     - rm $(KERNELPATH).tar.gz kernel.spec
863    
864     # binrpm-pkg
865     # ---------------------------------------------------------------------------
866     @@ -59,7 +58,8 @@ binrpm-pkg: FORCE
867     $(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
868     +rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
869     $(UTS_MACHINE) -bb $(objtree)/binkernel.spec
870     - rm binkernel.spec
871     +
872     +clean-files += $(objtree)/*.spec
873    
874     # Deb target
875     # ---------------------------------------------------------------------------