Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.14 commit in: /
Date: Wed, 03 Feb 2021 23:38:13
Message-Id: 1612395473.bf7225926e0e8887edb835871429166ab54ee91a.mpagano@gentoo
1 commit: bf7225926e0e8887edb835871429166ab54ee91a
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 3 23:37:53 2021 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 3 23:37:53 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=bf722592
7
8 Linux patch 4.14.219
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1218_linux-4.14.219.patch | 800 ++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 804 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 3da0f64..9392fc6 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -915,6 +915,10 @@ Patch: 1217_linux-4.14.218.patch
21 From: https://www.kernel.org
22 Desc: Linux 4.14.218
23
24 +Patch: 1218_linux-4.14.219.patch
25 +From: https://www.kernel.org
26 +Desc: Linux 4.14.219
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/1218_linux-4.14.219.patch b/1218_linux-4.14.219.patch
33 new file mode 100644
34 index 0000000..d9886b3
35 --- /dev/null
36 +++ b/1218_linux-4.14.219.patch
37 @@ -0,0 +1,800 @@
38 +diff --git a/Makefile b/Makefile
39 +index 494420ad33a1d..f7f11304776b5 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 = 218
47 ++SUBLEVEL = 219
48 + EXTRAVERSION =
49 + NAME = Petit Gorille
50 +
51 +diff --git a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
52 +index 115d706228eff..95aa680e92565 100644
53 +--- a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
54 ++++ b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
55 +@@ -278,7 +278,7 @@
56 +
57 + /* VDD_AUD_1P8: Audio codec */
58 + reg_aud_1p8v: ldo3 {
59 +- regulator-name = "vdd1p8";
60 ++ regulator-name = "vdd1p8a";
61 + regulator-min-microvolt = <1800000>;
62 + regulator-max-microvolt = <1800000>;
63 + regulator-boot-on;
64 +diff --git a/arch/arm/mach-imx/suspend-imx6.S b/arch/arm/mach-imx/suspend-imx6.S
65 +index 7d84b617af481..99d2e296082c7 100644
66 +--- a/arch/arm/mach-imx/suspend-imx6.S
67 ++++ b/arch/arm/mach-imx/suspend-imx6.S
68 +@@ -73,6 +73,7 @@
69 + #define MX6Q_CCM_CCR 0x0
70 +
71 + .align 3
72 ++ .arm
73 +
74 + .macro sync_l2_cache
75 +
76 +diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S
77 +index 364ea4a207bed..304e3daf82dd2 100644
78 +--- a/arch/x86/entry/entry_64_compat.S
79 ++++ b/arch/x86/entry/entry_64_compat.S
80 +@@ -357,13 +357,13 @@ ENTRY(entry_INT80_compat)
81 + pushq %rdx /* pt_regs->dx */
82 + pushq %rcx /* pt_regs->cx */
83 + pushq $-ENOSYS /* pt_regs->ax */
84 +- pushq $0 /* pt_regs->r8 = 0 */
85 ++ pushq %r8 /* pt_regs->r8 */
86 + xorl %r8d, %r8d /* nospec r8 */
87 +- pushq $0 /* pt_regs->r9 = 0 */
88 ++ pushq %r9 /* pt_regs->r9 */
89 + xorl %r9d, %r9d /* nospec r9 */
90 +- pushq $0 /* pt_regs->r10 = 0 */
91 ++ pushq %r10 /* pt_regs->r10*/
92 + xorl %r10d, %r10d /* nospec r10 */
93 +- pushq $0 /* pt_regs->r11 = 0 */
94 ++ pushq %r11 /* pt_regs->r11 */
95 + xorl %r11d, %r11d /* nospec r11 */
96 + pushq %rbx /* pt_regs->rbx */
97 + xorl %ebx, %ebx /* nospec rbx */
98 +diff --git a/arch/x86/kvm/pmu_intel.c b/arch/x86/kvm/pmu_intel.c
99 +index 84ae4dd261caf..cafdaabf062fc 100644
100 +--- a/arch/x86/kvm/pmu_intel.c
101 ++++ b/arch/x86/kvm/pmu_intel.c
102 +@@ -29,7 +29,7 @@ static struct kvm_event_hw_type_mapping intel_arch_events[] = {
103 + [4] = { 0x2e, 0x41, PERF_COUNT_HW_CACHE_MISSES },
104 + [5] = { 0xc4, 0x00, PERF_COUNT_HW_BRANCH_INSTRUCTIONS },
105 + [6] = { 0xc5, 0x00, PERF_COUNT_HW_BRANCH_MISSES },
106 +- [7] = { 0x00, 0x30, PERF_COUNT_HW_REF_CPU_CYCLES },
107 ++ [7] = { 0x00, 0x03, PERF_COUNT_HW_REF_CPU_CYCLES },
108 + };
109 +
110 + /* mapping between fixed pmc index and intel_arch_events array */
111 +diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
112 +index 79fa55de635cc..d7ed1fd36ebac 100644
113 +--- a/arch/x86/kvm/x86.c
114 ++++ b/arch/x86/kvm/x86.c
115 +@@ -98,6 +98,7 @@ static u64 __read_mostly efer_reserved_bits = ~((u64)EFER_SCE);
116 +
117 + static void update_cr8_intercept(struct kvm_vcpu *vcpu);
118 + static void process_nmi(struct kvm_vcpu *vcpu);
119 ++static void process_smi(struct kvm_vcpu *vcpu);
120 + static void enter_smm(struct kvm_vcpu *vcpu);
121 + static void __kvm_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags);
122 +
123 +@@ -3290,6 +3291,10 @@ static void kvm_vcpu_ioctl_x86_get_vcpu_events(struct kvm_vcpu *vcpu,
124 + struct kvm_vcpu_events *events)
125 + {
126 + process_nmi(vcpu);
127 ++
128 ++ if (kvm_check_request(KVM_REQ_SMI, vcpu))
129 ++ process_smi(vcpu);
130 ++
131 + /*
132 + * FIXME: pass injected and pending separately. This is only
133 + * needed for nested virtualization, whose state cannot be
134 +diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
135 +index 012aa86d4b16b..6d7ff5ef702cb 100644
136 +--- a/drivers/acpi/device_sysfs.c
137 ++++ b/drivers/acpi/device_sysfs.c
138 +@@ -259,20 +259,12 @@ int __acpi_device_uevent_modalias(struct acpi_device *adev,
139 + if (add_uevent_var(env, "MODALIAS="))
140 + return -ENOMEM;
141 +
142 +- len = create_pnp_modalias(adev, &env->buf[env->buflen - 1],
143 +- sizeof(env->buf) - env->buflen);
144 +- if (len < 0)
145 +- return len;
146 +-
147 +- env->buflen += len;
148 +- if (!adev->data.of_compatible)
149 +- return 0;
150 +-
151 +- if (len > 0 && add_uevent_var(env, "MODALIAS="))
152 +- return -ENOMEM;
153 +-
154 +- len = create_of_modalias(adev, &env->buf[env->buflen - 1],
155 +- sizeof(env->buf) - env->buflen);
156 ++ if (adev->data.of_compatible)
157 ++ len = create_of_modalias(adev, &env->buf[env->buflen - 1],
158 ++ sizeof(env->buf) - env->buflen);
159 ++ else
160 ++ len = create_pnp_modalias(adev, &env->buf[env->buflen - 1],
161 ++ sizeof(env->buf) - env->buflen);
162 + if (len < 0)
163 + return len;
164 +
165 +diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
166 +index 70ef826af7f8d..826b3877a157a 100644
167 +--- a/drivers/block/nbd.c
168 ++++ b/drivers/block/nbd.c
169 +@@ -952,6 +952,12 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
170 + if (!sock)
171 + return err;
172 +
173 ++ /*
174 ++ * We need to make sure we don't get any errant requests while we're
175 ++ * reallocating the ->socks array.
176 ++ */
177 ++ blk_mq_freeze_queue(nbd->disk->queue);
178 ++
179 + if (!netlink && !nbd->task_setup &&
180 + !test_bit(NBD_BOUND, &config->runtime_flags))
181 + nbd->task_setup = current;
182 +@@ -990,10 +996,12 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
183 + nsock->cookie = 0;
184 + socks[config->num_connections++] = nsock;
185 + atomic_inc(&config->live_connections);
186 ++ blk_mq_unfreeze_queue(nbd->disk->queue);
187 +
188 + return 0;
189 +
190 + put_socket:
191 ++ blk_mq_unfreeze_queue(nbd->disk->queue);
192 + sockfd_put(sock);
193 + return err;
194 + }
195 +diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
196 +index e6887714fe0a8..7ba58c39146fe 100644
197 +--- a/drivers/block/xen-blkfront.c
198 ++++ b/drivers/block/xen-blkfront.c
199 +@@ -937,7 +937,8 @@ static void blkif_set_queue_limits(struct blkfront_info *info)
200 + if (info->feature_discard) {
201 + queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, rq);
202 + blk_queue_max_discard_sectors(rq, get_capacity(gd));
203 +- rq->limits.discard_granularity = info->discard_granularity;
204 ++ rq->limits.discard_granularity = info->discard_granularity ?:
205 ++ info->physical_sector_size;
206 + rq->limits.discard_alignment = info->discard_alignment;
207 + if (info->feature_secdiscard)
208 + queue_flag_set_unlocked(QUEUE_FLAG_SECERASE, rq);
209 +@@ -2155,19 +2156,12 @@ static void blkfront_closing(struct blkfront_info *info)
210 +
211 + static void blkfront_setup_discard(struct blkfront_info *info)
212 + {
213 +- int err;
214 +- unsigned int discard_granularity;
215 +- unsigned int discard_alignment;
216 +-
217 + info->feature_discard = 1;
218 +- err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
219 +- "discard-granularity", "%u", &discard_granularity,
220 +- "discard-alignment", "%u", &discard_alignment,
221 +- NULL);
222 +- if (!err) {
223 +- info->discard_granularity = discard_granularity;
224 +- info->discard_alignment = discard_alignment;
225 +- }
226 ++ info->discard_granularity = xenbus_read_unsigned(info->xbdev->otherend,
227 ++ "discard-granularity",
228 ++ 0);
229 ++ info->discard_alignment = xenbus_read_unsigned(info->xbdev->otherend,
230 ++ "discard-alignment", 0);
231 + info->feature_secdiscard =
232 + !!xenbus_read_unsigned(info->xbdev->otherend, "discard-secure",
233 + 0);
234 +diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
235 +index 24952af51a546..15a867d62d025 100644
236 +--- a/drivers/infiniband/hw/cxgb4/qp.c
237 ++++ b/drivers/infiniband/hw/cxgb4/qp.c
238 +@@ -2117,7 +2117,7 @@ int c4iw_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
239 + init_attr->cap.max_send_wr = qhp->attr.sq_num_entries;
240 + init_attr->cap.max_recv_wr = qhp->attr.rq_num_entries;
241 + init_attr->cap.max_send_sge = qhp->attr.sq_max_sges;
242 +- init_attr->cap.max_recv_sge = qhp->attr.sq_max_sges;
243 ++ init_attr->cap.max_recv_sge = qhp->attr.rq_max_sges;
244 + init_attr->cap.max_inline_data = T4_MAX_SEND_INLINE;
245 + init_attr->sq_sig_type = qhp->sq_sig_all ? IB_SIGNAL_ALL_WR : 0;
246 + return 0;
247 +diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
248 +index 1f527ca609550..ef41579897cbf 100644
249 +--- a/drivers/iommu/dmar.c
250 ++++ b/drivers/iommu/dmar.c
251 +@@ -1026,8 +1026,8 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd)
252 + {
253 + struct intel_iommu *iommu;
254 + u32 ver, sts;
255 +- int agaw = 0;
256 +- int msagaw = 0;
257 ++ int agaw = -1;
258 ++ int msagaw = -1;
259 + int err;
260 +
261 + if (!drhd->reg_base_addr) {
262 +@@ -1052,17 +1052,28 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd)
263 + }
264 +
265 + err = -EINVAL;
266 +- agaw = iommu_calculate_agaw(iommu);
267 +- if (agaw < 0) {
268 +- pr_err("Cannot get a valid agaw for iommu (seq_id = %d)\n",
269 +- iommu->seq_id);
270 +- goto err_unmap;
271 ++ if (cap_sagaw(iommu->cap) == 0) {
272 ++ pr_info("%s: No supported address widths. Not attempting DMA translation.\n",
273 ++ iommu->name);
274 ++ drhd->ignored = 1;
275 + }
276 +- msagaw = iommu_calculate_max_sagaw(iommu);
277 +- if (msagaw < 0) {
278 +- pr_err("Cannot get a valid max agaw for iommu (seq_id = %d)\n",
279 +- iommu->seq_id);
280 +- goto err_unmap;
281 ++
282 ++ if (!drhd->ignored) {
283 ++ agaw = iommu_calculate_agaw(iommu);
284 ++ if (agaw < 0) {
285 ++ pr_err("Cannot get a valid agaw for iommu (seq_id = %d)\n",
286 ++ iommu->seq_id);
287 ++ drhd->ignored = 1;
288 ++ }
289 ++ }
290 ++ if (!drhd->ignored) {
291 ++ msagaw = iommu_calculate_max_sagaw(iommu);
292 ++ if (msagaw < 0) {
293 ++ pr_err("Cannot get a valid max agaw for iommu (seq_id = %d)\n",
294 ++ iommu->seq_id);
295 ++ drhd->ignored = 1;
296 ++ agaw = -1;
297 ++ }
298 + }
299 + iommu->agaw = agaw;
300 + iommu->msagaw = msagaw;
301 +@@ -1089,7 +1100,12 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd)
302 +
303 + raw_spin_lock_init(&iommu->register_lock);
304 +
305 +- if (intel_iommu_enabled) {
306 ++ /*
307 ++ * This is only for hotplug; at boot time intel_iommu_enabled won't
308 ++ * be set yet. When intel_iommu_init() runs, it registers the units
309 ++ * present at boot time, then sets intel_iommu_enabled.
310 ++ */
311 ++ if (intel_iommu_enabled && !drhd->ignored) {
312 + err = iommu_device_sysfs_add(&iommu->iommu, NULL,
313 + intel_iommu_groups,
314 + "%s", iommu->name);
315 +@@ -1104,6 +1120,7 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd)
316 + }
317 +
318 + drhd->iommu = iommu;
319 ++ iommu->drhd = drhd;
320 +
321 + return 0;
322 +
323 +@@ -1118,7 +1135,7 @@ error:
324 +
325 + static void free_iommu(struct intel_iommu *iommu)
326 + {
327 +- if (intel_iommu_enabled) {
328 ++ if (intel_iommu_enabled && !iommu->drhd->ignored) {
329 + iommu_device_unregister(&iommu->iommu);
330 + iommu_device_sysfs_remove(&iommu->iommu);
331 + }
332 +diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
333 +index 431123b048a27..573a5a80b23c6 100644
334 +--- a/drivers/leds/led-triggers.c
335 ++++ b/drivers/leds/led-triggers.c
336 +@@ -283,14 +283,15 @@ void led_trigger_event(struct led_trigger *trig,
337 + enum led_brightness brightness)
338 + {
339 + struct led_classdev *led_cdev;
340 ++ unsigned long flags;
341 +
342 + if (!trig)
343 + return;
344 +
345 +- read_lock(&trig->leddev_list_lock);
346 ++ read_lock_irqsave(&trig->leddev_list_lock, flags);
347 + list_for_each_entry(led_cdev, &trig->led_cdevs, trig_list)
348 + led_set_brightness(led_cdev, brightness);
349 +- read_unlock(&trig->leddev_list_lock);
350 ++ read_unlock_irqrestore(&trig->leddev_list_lock, flags);
351 + }
352 + EXPORT_SYMBOL_GPL(led_trigger_event);
353 +
354 +@@ -301,11 +302,12 @@ static void led_trigger_blink_setup(struct led_trigger *trig,
355 + int invert)
356 + {
357 + struct led_classdev *led_cdev;
358 ++ unsigned long flags;
359 +
360 + if (!trig)
361 + return;
362 +
363 +- read_lock(&trig->leddev_list_lock);
364 ++ read_lock_irqsave(&trig->leddev_list_lock, flags);
365 + list_for_each_entry(led_cdev, &trig->led_cdevs, trig_list) {
366 + if (oneshot)
367 + led_blink_set_oneshot(led_cdev, delay_on, delay_off,
368 +@@ -313,7 +315,7 @@ static void led_trigger_blink_setup(struct led_trigger *trig,
369 + else
370 + led_blink_set(led_cdev, delay_on, delay_off);
371 + }
372 +- read_unlock(&trig->leddev_list_lock);
373 ++ read_unlock_irqrestore(&trig->leddev_list_lock, flags);
374 + }
375 +
376 + void led_trigger_blink(struct led_trigger *trig,
377 +diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
378 +index 1025cfd463ece..0ebee99a3e857 100644
379 +--- a/drivers/net/can/dev.c
380 ++++ b/drivers/net/can/dev.c
381 +@@ -1102,7 +1102,7 @@ static int can_fill_info(struct sk_buff *skb, const struct net_device *dev)
382 + {
383 + struct can_priv *priv = netdev_priv(dev);
384 + struct can_ctrlmode cm = {.flags = priv->ctrlmode};
385 +- struct can_berr_counter bec;
386 ++ struct can_berr_counter bec = { };
387 + enum can_state state = priv->state;
388 +
389 + if (priv->do_get_state)
390 +diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
391 +index d36d0882874bd..eb2360b64aad3 100644
392 +--- a/drivers/net/team/team.c
393 ++++ b/drivers/net/team/team.c
394 +@@ -1002,7 +1002,8 @@ static void __team_compute_features(struct team *team)
395 + unsigned int dst_release_flag = IFF_XMIT_DST_RELEASE |
396 + IFF_XMIT_DST_RELEASE_PERM;
397 +
398 +- list_for_each_entry(port, &team->port_list, list) {
399 ++ rcu_read_lock();
400 ++ list_for_each_entry_rcu(port, &team->port_list, list) {
401 + vlan_features = netdev_increment_features(vlan_features,
402 + port->dev->vlan_features,
403 + TEAM_VLAN_FEATURES);
404 +@@ -1016,6 +1017,7 @@ static void __team_compute_features(struct team *team)
405 + if (port->dev->hard_header_len > max_hard_header_len)
406 + max_hard_header_len = port->dev->hard_header_len;
407 + }
408 ++ rcu_read_unlock();
409 +
410 + team->dev->vlan_features = vlan_features;
411 + team->dev->hw_enc_features = enc_features | NETIF_F_GSO_ENCAP_ALL |
412 +@@ -1030,9 +1032,7 @@ static void __team_compute_features(struct team *team)
413 +
414 + static void team_compute_features(struct team *team)
415 + {
416 +- mutex_lock(&team->lock);
417 + __team_compute_features(team);
418 +- mutex_unlock(&team->lock);
419 + netdev_change_features(team->dev);
420 + }
421 +
422 +diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
423 +index 6fed2fc4565b4..f205ccba27c4a 100644
424 +--- a/drivers/net/usb/qmi_wwan.c
425 ++++ b/drivers/net/usb/qmi_wwan.c
426 +@@ -1273,6 +1273,7 @@ static const struct usb_device_id products[] = {
427 + {QMI_FIXED_INTF(0x0b3c, 0xc00a, 6)}, /* Olivetti Olicard 160 */
428 + {QMI_FIXED_INTF(0x0b3c, 0xc00b, 4)}, /* Olivetti Olicard 500 */
429 + {QMI_FIXED_INTF(0x1e2d, 0x0060, 4)}, /* Cinterion PLxx */
430 ++ {QMI_QUIRK_SET_DTR(0x1e2d, 0x006f, 8)}, /* Cinterion PLS83/PLS63 */
431 + {QMI_FIXED_INTF(0x1e2d, 0x0053, 4)}, /* Cinterion PHxx,PXxx */
432 + {QMI_FIXED_INTF(0x1e2d, 0x0063, 10)}, /* Cinterion ALASxx (1 RmNet) */
433 + {QMI_FIXED_INTF(0x1e2d, 0x0082, 4)}, /* Cinterion PHxx,PXxx (2 RmNet) */
434 +diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
435 +index 910edd034fe3a..7bfddce582ad6 100644
436 +--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
437 ++++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
438 +@@ -1932,7 +1932,8 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr,
439 +
440 + while (offs < dwords) {
441 + /* limit the time we spin here under lock to 1/2s */
442 +- ktime_t timeout = ktime_add_us(ktime_get(), 500 * USEC_PER_MSEC);
443 ++ unsigned long end = jiffies + HZ / 2;
444 ++ bool resched = false;
445 +
446 + if (iwl_trans_grab_nic_access(trans, &flags)) {
447 + iwl_write32(trans, HBUS_TARG_MEM_RADDR,
448 +@@ -1943,14 +1944,15 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr,
449 + HBUS_TARG_MEM_RDAT);
450 + offs++;
451 +
452 +- /* calling ktime_get is expensive so
453 +- * do it once in 128 reads
454 +- */
455 +- if (offs % 128 == 0 && ktime_after(ktime_get(),
456 +- timeout))
457 ++ if (time_after(jiffies, end)) {
458 ++ resched = true;
459 + break;
460 ++ }
461 + }
462 + iwl_trans_release_nic_access(trans, &flags);
463 ++
464 ++ if (resched)
465 ++ cond_resched();
466 + } else {
467 + return -EBUSY;
468 + }
469 +diff --git a/drivers/net/wireless/mediatek/mt7601u/dma.c b/drivers/net/wireless/mediatek/mt7601u/dma.c
470 +index 47cebb2ec05c5..5aacabd32923e 100644
471 +--- a/drivers/net/wireless/mediatek/mt7601u/dma.c
472 ++++ b/drivers/net/wireless/mediatek/mt7601u/dma.c
473 +@@ -160,8 +160,7 @@ mt7601u_rx_process_entry(struct mt7601u_dev *dev, struct mt7601u_dma_buf_rx *e)
474 +
475 + if (new_p) {
476 + /* we have one extra ref from the allocator */
477 +- __free_pages(e->p, MT_RX_ORDER);
478 +-
479 ++ put_page(e->p);
480 + e->p = new_p;
481 + }
482 + }
483 +@@ -318,7 +317,6 @@ static int mt7601u_dma_submit_tx(struct mt7601u_dev *dev,
484 + }
485 +
486 + e = &q->e[q->end];
487 +- e->skb = skb;
488 + usb_fill_bulk_urb(e->urb, usb_dev, snd_pipe, skb->data, skb->len,
489 + mt7601u_complete_tx, q);
490 + ret = usb_submit_urb(e->urb, GFP_ATOMIC);
491 +@@ -336,6 +334,7 @@ static int mt7601u_dma_submit_tx(struct mt7601u_dev *dev,
492 +
493 + q->end = (q->end + 1) % q->entries;
494 + q->used++;
495 ++ e->skb = skb;
496 +
497 + if (q->used >= q->entries)
498 + ieee80211_stop_queue(dev->hw, skb_get_queue_mapping(skb));
499 +diff --git a/drivers/soc/atmel/soc.c b/drivers/soc/atmel/soc.c
500 +index c1363c83c352a..c5e713dd10169 100644
501 +--- a/drivers/soc/atmel/soc.c
502 ++++ b/drivers/soc/atmel/soc.c
503 +@@ -246,8 +246,21 @@ struct soc_device * __init at91_soc_init(const struct at91_soc *socs)
504 + return soc_dev;
505 + }
506 +
507 ++static const struct of_device_id at91_soc_allowed_list[] __initconst = {
508 ++ { .compatible = "atmel,at91rm9200", },
509 ++ { .compatible = "atmel,at91sam9", },
510 ++ { .compatible = "atmel,sama5", },
511 ++ { .compatible = "atmel,samv7", },
512 ++ { }
513 ++};
514 ++
515 + static int __init atmel_soc_device_init(void)
516 + {
517 ++ struct device_node *np = of_find_node_by_path("/");
518 ++
519 ++ if (!of_match_node(at91_soc_allowed_list, np))
520 ++ return 0;
521 ++
522 + at91_soc_init(socs);
523 +
524 + return 0;
525 +diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
526 +index fe24e8dcb2b8e..9cac938361a01 100644
527 +--- a/drivers/xen/xenbus/xenbus_probe.c
528 ++++ b/drivers/xen/xenbus/xenbus_probe.c
529 +@@ -705,6 +705,23 @@ static bool xs_hvm_defer_init_for_callback(void)
530 + #endif
531 + }
532 +
533 ++static int xenbus_probe_thread(void *unused)
534 ++{
535 ++ DEFINE_WAIT(w);
536 ++
537 ++ /*
538 ++ * We actually just want to wait for *any* trigger of xb_waitq,
539 ++ * and run xenbus_probe() the moment it occurs.
540 ++ */
541 ++ prepare_to_wait(&xb_waitq, &w, TASK_INTERRUPTIBLE);
542 ++ schedule();
543 ++ finish_wait(&xb_waitq, &w);
544 ++
545 ++ DPRINTK("probing");
546 ++ xenbus_probe();
547 ++ return 0;
548 ++}
549 ++
550 + static int __init xenbus_probe_initcall(void)
551 + {
552 + /*
553 +@@ -716,6 +733,20 @@ static int __init xenbus_probe_initcall(void)
554 + !xs_hvm_defer_init_for_callback()))
555 + xenbus_probe();
556 +
557 ++ /*
558 ++ * For XS_LOCAL, spawn a thread which will wait for xenstored
559 ++ * or a xenstore-stubdom to be started, then probe. It will be
560 ++ * triggered when communication starts happening, by waiting
561 ++ * on xb_waitq.
562 ++ */
563 ++ if (xen_store_domain_type == XS_LOCAL) {
564 ++ struct task_struct *probe_task;
565 ++
566 ++ probe_task = kthread_run(xenbus_probe_thread, NULL,
567 ++ "xenbus_probe");
568 ++ if (IS_ERR(probe_task))
569 ++ return PTR_ERR(probe_task);
570 ++ }
571 + return 0;
572 + }
573 + device_initcall(xenbus_probe_initcall);
574 +diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
575 +index d2364ba99f6ce..f121b4bc8b143 100644
576 +--- a/include/linux/intel-iommu.h
577 ++++ b/include/linux/intel-iommu.h
578 +@@ -434,6 +434,8 @@ struct intel_iommu {
579 + struct iommu_device iommu; /* IOMMU core code handle */
580 + int node;
581 + u32 flags; /* Software defined flags */
582 ++
583 ++ struct dmar_drhd_unit *drhd;
584 + };
585 +
586 + static inline void __iommu_flush_cache(
587 +diff --git a/include/net/tcp.h b/include/net/tcp.h
588 +index 58e8e57787cf1..4602959b58a12 100644
589 +--- a/include/net/tcp.h
590 ++++ b/include/net/tcp.h
591 +@@ -1969,7 +1969,7 @@ void tcp_v4_init(void);
592 + void tcp_init(void);
593 +
594 + /* tcp_recovery.c */
595 +-extern void tcp_rack_mark_lost(struct sock *sk);
596 ++extern bool tcp_rack_mark_lost(struct sock *sk);
597 + extern void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, u32 end_seq,
598 + u64 xmit_time);
599 + extern void tcp_rack_reo_timeout(struct sock *sk);
600 +diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
601 +index ec12a52edce2c..eb062fab62579 100644
602 +--- a/net/ipv4/tcp_input.c
603 ++++ b/net/ipv4/tcp_input.c
604 +@@ -2803,7 +2803,8 @@ static void tcp_rack_identify_loss(struct sock *sk, int *ack_flag)
605 + if (sysctl_tcp_recovery & TCP_RACK_LOSS_DETECTION) {
606 + u32 prior_retrans = tp->retrans_out;
607 +
608 +- tcp_rack_mark_lost(sk);
609 ++ if (tcp_rack_mark_lost(sk))
610 ++ *ack_flag &= ~FLAG_SET_XMIT_TIMER;
611 + if (prior_retrans > tp->retrans_out)
612 + *ack_flag |= FLAG_LOST_RETRANS;
613 + }
614 +@@ -3688,15 +3689,16 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
615 +
616 + if (tp->tlp_high_seq)
617 + tcp_process_tlp_ack(sk, ack, flag);
618 +- /* If needed, reset TLP/RTO timer; RACK may later override this. */
619 +- if (flag & FLAG_SET_XMIT_TIMER)
620 +- tcp_set_xmit_timer(sk);
621 +
622 + if (tcp_ack_is_dubious(sk, flag)) {
623 + is_dupack = !(flag & (FLAG_SND_UNA_ADVANCED | FLAG_NOT_DUP));
624 + tcp_fastretrans_alert(sk, acked, is_dupack, &flag, &rexmit);
625 + }
626 +
627 ++ /* If needed, reset TLP/RTO timer when RACK doesn't set. */
628 ++ if (flag & FLAG_SET_XMIT_TIMER)
629 ++ tcp_set_xmit_timer(sk);
630 ++
631 + if ((flag & FLAG_FORWARD_PROGRESS) || !(flag & FLAG_NOT_DUP))
632 + sk_dst_confirm(sk);
633 +
634 +diff --git a/net/ipv4/tcp_recovery.c b/net/ipv4/tcp_recovery.c
635 +index be8ef1e5dfef7..0409cd2c4918f 100644
636 +--- a/net/ipv4/tcp_recovery.c
637 ++++ b/net/ipv4/tcp_recovery.c
638 +@@ -102,13 +102,13 @@ static void tcp_rack_detect_loss(struct sock *sk, u32 *reo_timeout)
639 + }
640 + }
641 +
642 +-void tcp_rack_mark_lost(struct sock *sk)
643 ++bool tcp_rack_mark_lost(struct sock *sk)
644 + {
645 + struct tcp_sock *tp = tcp_sk(sk);
646 + u32 timeout;
647 +
648 + if (!tp->rack.advanced)
649 +- return;
650 ++ return false;
651 +
652 + /* Reset the advanced flag to avoid unnecessary queue scanning */
653 + tp->rack.advanced = 0;
654 +@@ -118,6 +118,7 @@ void tcp_rack_mark_lost(struct sock *sk)
655 + inet_csk_reset_xmit_timer(sk, ICSK_TIME_REO_TIMEOUT,
656 + timeout, inet_csk(sk)->icsk_rto);
657 + }
658 ++ return !!timeout;
659 + }
660 +
661 + /* Record the most recently (re)sent time among the (s)acked packets
662 +diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
663 +index 0e209a88d88a7..651705565dfb9 100644
664 +--- a/net/mac80211/ieee80211_i.h
665 ++++ b/net/mac80211/ieee80211_i.h
666 +@@ -1047,6 +1047,7 @@ enum queue_stop_reason {
667 + IEEE80211_QUEUE_STOP_REASON_FLUSH,
668 + IEEE80211_QUEUE_STOP_REASON_TDLS_TEARDOWN,
669 + IEEE80211_QUEUE_STOP_REASON_RESERVE_TID,
670 ++ IEEE80211_QUEUE_STOP_REASON_IFTYPE_CHANGE,
671 +
672 + IEEE80211_QUEUE_STOP_REASONS,
673 + };
674 +diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
675 +index 6ce13e976b7a2..dc398a1816788 100644
676 +--- a/net/mac80211/iface.c
677 ++++ b/net/mac80211/iface.c
678 +@@ -1559,6 +1559,10 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,
679 + if (ret)
680 + return ret;
681 +
682 ++ ieee80211_stop_vif_queues(local, sdata,
683 ++ IEEE80211_QUEUE_STOP_REASON_IFTYPE_CHANGE);
684 ++ synchronize_net();
685 ++
686 + ieee80211_do_stop(sdata, false);
687 +
688 + ieee80211_teardown_sdata(sdata);
689 +@@ -1579,6 +1583,8 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,
690 + err = ieee80211_do_open(&sdata->wdev, false);
691 + WARN(err, "type change: do_open returned %d", err);
692 +
693 ++ ieee80211_wake_vif_queues(local, sdata,
694 ++ IEEE80211_QUEUE_STOP_REASON_IFTYPE_CHANGE);
695 + return ret;
696 + }
697 +
698 +diff --git a/net/netfilter/nft_dynset.c b/net/netfilter/nft_dynset.c
699 +index 66221ad891a9f..278d765663488 100644
700 +--- a/net/netfilter/nft_dynset.c
701 ++++ b/net/netfilter/nft_dynset.c
702 +@@ -205,8 +205,10 @@ static int nft_dynset_init(const struct nft_ctx *ctx,
703 + nft_set_ext_add_length(&priv->tmpl, NFT_SET_EXT_EXPR,
704 + priv->expr->ops->size);
705 + if (set->flags & NFT_SET_TIMEOUT) {
706 +- if (timeout || set->timeout)
707 ++ if (timeout || set->timeout) {
708 ++ nft_set_ext_add(&priv->tmpl, NFT_SET_EXT_TIMEOUT);
709 + nft_set_ext_add(&priv->tmpl, NFT_SET_EXT_EXPIRATION);
710 ++ }
711 + }
712 +
713 + priv->timeout = timeout;
714 +diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
715 +index 2d642baeafbb2..18957fbf37ff7 100644
716 +--- a/net/nfc/netlink.c
717 ++++ b/net/nfc/netlink.c
718 +@@ -884,6 +884,7 @@ static int nfc_genl_stop_poll(struct sk_buff *skb, struct genl_info *info)
719 +
720 + if (!dev->polling) {
721 + device_unlock(&dev->dev);
722 ++ nfc_put_device(dev);
723 + return -EINVAL;
724 + }
725 +
726 +diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c
727 +index b927730d9ab06..57a07ab80d924 100644
728 +--- a/net/nfc/rawsock.c
729 ++++ b/net/nfc/rawsock.c
730 +@@ -117,7 +117,7 @@ static int rawsock_connect(struct socket *sock, struct sockaddr *_addr,
731 + if (addr->target_idx > dev->target_next_idx - 1 ||
732 + addr->target_idx < dev->target_next_idx - dev->n_targets) {
733 + rc = -EINVAL;
734 +- goto error;
735 ++ goto put_dev;
736 + }
737 +
738 + rc = nfc_activate_target(dev, addr->target_idx, addr->nfc_protocol);
739 +diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c
740 +index 5236a3c2c0ccf..b6414c7bef556 100644
741 +--- a/net/wireless/wext-core.c
742 ++++ b/net/wireless/wext-core.c
743 +@@ -898,8 +898,9 @@ out:
744 + int call_commit_handler(struct net_device *dev)
745 + {
746 + #ifdef CONFIG_WIRELESS_EXT
747 +- if ((netif_running(dev)) &&
748 +- (dev->wireless_handlers->standard[0] != NULL))
749 ++ if (netif_running(dev) &&
750 ++ dev->wireless_handlers &&
751 ++ dev->wireless_handlers->standard[0])
752 + /* Call the commit handler on the driver */
753 + return dev->wireless_handlers->standard[0](dev, NULL,
754 + NULL, NULL);
755 +diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
756 +index 874735742152d..594b8b2c32c85 100644
757 +--- a/net/xfrm/xfrm_input.c
758 ++++ b/net/xfrm/xfrm_input.c
759 +@@ -415,7 +415,7 @@ resume:
760 + /* only the first xfrm gets the encap type */
761 + encap_type = 0;
762 +
763 +- if (async && x->repl->recheck(x, skb, seq)) {
764 ++ if (x->repl->recheck(x, skb, seq)) {
765 + XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATESEQERROR);
766 + goto drop_unlock;
767 + }
768 +diff --git a/tools/testing/selftests/x86/test_syscall_vdso.c b/tools/testing/selftests/x86/test_syscall_vdso.c
769 +index 40370354d4c11..c9c3281077bca 100644
770 +--- a/tools/testing/selftests/x86/test_syscall_vdso.c
771 ++++ b/tools/testing/selftests/x86/test_syscall_vdso.c
772 +@@ -100,12 +100,19 @@ asm (
773 + " shl $32, %r8\n"
774 + " orq $0x7f7f7f7f, %r8\n"
775 + " movq %r8, %r9\n"
776 +- " movq %r8, %r10\n"
777 +- " movq %r8, %r11\n"
778 +- " movq %r8, %r12\n"
779 +- " movq %r8, %r13\n"
780 +- " movq %r8, %r14\n"
781 +- " movq %r8, %r15\n"
782 ++ " incq %r9\n"
783 ++ " movq %r9, %r10\n"
784 ++ " incq %r10\n"
785 ++ " movq %r10, %r11\n"
786 ++ " incq %r11\n"
787 ++ " movq %r11, %r12\n"
788 ++ " incq %r12\n"
789 ++ " movq %r12, %r13\n"
790 ++ " incq %r13\n"
791 ++ " movq %r13, %r14\n"
792 ++ " incq %r14\n"
793 ++ " movq %r14, %r15\n"
794 ++ " incq %r15\n"
795 + " ret\n"
796 + " .code32\n"
797 + " .popsection\n"
798 +@@ -128,12 +135,13 @@ int check_regs64(void)
799 + int err = 0;
800 + int num = 8;
801 + uint64_t *r64 = &regs64.r8;
802 ++ uint64_t expected = 0x7f7f7f7f7f7f7f7fULL;
803 +
804 + if (!kernel_is_64bit)
805 + return 0;
806 +
807 + do {
808 +- if (*r64 == 0x7f7f7f7f7f7f7f7fULL)
809 ++ if (*r64 == expected++)
810 + continue; /* register did not change */
811 + if (syscall_addr != (long)&int80) {
812 + /*
813 +@@ -147,18 +155,17 @@ int check_regs64(void)
814 + continue;
815 + }
816 + } else {
817 +- /* INT80 syscall entrypoint can be used by
818 ++ /*
819 ++ * INT80 syscall entrypoint can be used by
820 + * 64-bit programs too, unlike SYSCALL/SYSENTER.
821 + * Therefore it must preserve R12+
822 + * (they are callee-saved registers in 64-bit C ABI).
823 + *
824 +- * This was probably historically not intended,
825 +- * but R8..11 are clobbered (cleared to 0).
826 +- * IOW: they are the only registers which aren't
827 +- * preserved across INT80 syscall.
828 ++ * Starting in Linux 4.17 (and any kernel that
829 ++ * backports the change), R8..11 are preserved.
830 ++ * Historically (and probably unintentionally), they
831 ++ * were clobbered or zeroed.
832 + */
833 +- if (*r64 == 0 && num <= 11)
834 +- continue;
835 + }
836 + printf("[FAIL]\tR%d has changed:%016llx\n", num, *r64);
837 + err++;