1 |
commit: 86b7ffe045ff19b2b5b7e86f152a158e967c33d7 |
2 |
Author: Alice Ferrazzi <alicef <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 30 13:17:18 2021 +0000 |
4 |
Commit: Alice Ferrazzi <alicef <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 30 13:17:36 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=86b7ffe0 |
7 |
|
8 |
Linux patch 4.9.254 |
9 |
|
10 |
Signed-off-by: Alice Ferrazzi <alicef <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1253_linux-4.9.254.patch | 571 +++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 575 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 2b0c6da..d62c153 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -1055,6 +1055,10 @@ Patch: 1252_linux-4.9.253.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 4.9.253 |
23 |
|
24 |
+Patch: 1253_linux-4.9.254.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 4.9.254 |
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/1253_linux-4.9.254.patch b/1253_linux-4.9.254.patch |
33 |
new file mode 100644 |
34 |
index 0000000..b812f33 |
35 |
--- /dev/null |
36 |
+++ b/1253_linux-4.9.254.patch |
37 |
@@ -0,0 +1,571 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 62a07bdcfacb7..ea9ea119460d4 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,6 +1,6 @@ |
43 |
+ VERSION = 4 |
44 |
+ PATCHLEVEL = 9 |
45 |
+-SUBLEVEL = 253 |
46 |
++SUBLEVEL = 254 |
47 |
+ EXTRAVERSION = |
48 |
+ NAME = Roaring Lionus |
49 |
+ |
50 |
+diff --git a/arch/sh/drivers/dma/Kconfig b/arch/sh/drivers/dma/Kconfig |
51 |
+index 78bc97b1d0270..ac834e9e0e0a4 100644 |
52 |
+--- a/arch/sh/drivers/dma/Kconfig |
53 |
++++ b/arch/sh/drivers/dma/Kconfig |
54 |
+@@ -62,8 +62,7 @@ config PVR2_DMA |
55 |
+ |
56 |
+ config G2_DMA |
57 |
+ tristate "G2 Bus DMA support" |
58 |
+- depends on SH_DREAMCAST |
59 |
+- select SH_DMA_API |
60 |
++ depends on SH_DREAMCAST && SH_DMA_API |
61 |
+ help |
62 |
+ This enables support for the DMA controller for the Dreamcast's |
63 |
+ G2 bus. Drivers that want this will generally enable this on |
64 |
+diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile |
65 |
+index 89b163351e642..7be7acd6a5409 100644 |
66 |
+--- a/arch/x86/boot/compressed/Makefile |
67 |
++++ b/arch/x86/boot/compressed/Makefile |
68 |
+@@ -35,6 +35,8 @@ KBUILD_CFLAGS += -mno-mmx -mno-sse |
69 |
+ KBUILD_CFLAGS += $(call cc-option,-ffreestanding) |
70 |
+ KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) |
71 |
+ KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) |
72 |
++# Disable relocation relaxation in case the link is not PIE. |
73 |
++KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mrelax-relocations=no) |
74 |
+ |
75 |
+ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ |
76 |
+ GCOV_PROFILE := n |
77 |
+diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c |
78 |
+index f49e2b7880ac2..5aa4a01f698fe 100644 |
79 |
+--- a/drivers/acpi/scan.c |
80 |
++++ b/drivers/acpi/scan.c |
81 |
+@@ -585,6 +585,8 @@ static int acpi_get_device_data(acpi_handle handle, struct acpi_device **device, |
82 |
+ if (!device) |
83 |
+ return -EINVAL; |
84 |
+ |
85 |
++ *device = NULL; |
86 |
++ |
87 |
+ status = acpi_get_data_full(handle, acpi_scan_drop_device, |
88 |
+ (void **)device, callback); |
89 |
+ if (ACPI_FAILURE(status) || !*device) { |
90 |
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c |
91 |
+index 7deb81b6dbac6..4b571cc6bc70f 100644 |
92 |
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c |
93 |
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c |
94 |
+@@ -75,7 +75,7 @@ shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd) |
95 |
+ nvkm_debug(subdev, "%08x: type %02x, %d bytes\n", |
96 |
+ image.base, image.type, image.size); |
97 |
+ |
98 |
+- if (!shadow_fetch(bios, mthd, image.size)) { |
99 |
++ if (!shadow_fetch(bios, mthd, image.base + image.size)) { |
100 |
+ nvkm_debug(subdev, "%08x: fetch failed\n", image.base); |
101 |
+ return 0; |
102 |
+ } |
103 |
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c |
104 |
+index a5783f4d972e3..c49795e779be4 100644 |
105 |
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c |
106 |
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c |
107 |
+@@ -33,7 +33,7 @@ static void |
108 |
+ gm200_i2c_aux_fini(struct gm200_i2c_aux *aux) |
109 |
+ { |
110 |
+ struct nvkm_device *device = aux->base.pad->i2c->subdev.device; |
111 |
+- nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00310000, 0x00000000); |
112 |
++ nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00710000, 0x00000000); |
113 |
+ } |
114 |
+ |
115 |
+ static int |
116 |
+@@ -54,10 +54,10 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux) |
117 |
+ AUX_ERR(&aux->base, "begin idle timeout %08x", ctrl); |
118 |
+ return -EBUSY; |
119 |
+ } |
120 |
+- } while (ctrl & 0x03010000); |
121 |
++ } while (ctrl & 0x07010000); |
122 |
+ |
123 |
+ /* set some magic, and wait up to 1ms for it to appear */ |
124 |
+- nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00300000, ureq); |
125 |
++ nvkm_mask(device, 0x00d954 + (aux->ch * 0x50), 0x00700000, ureq); |
126 |
+ timeout = 1000; |
127 |
+ do { |
128 |
+ ctrl = nvkm_rd32(device, 0x00d954 + (aux->ch * 0x50)); |
129 |
+@@ -67,7 +67,7 @@ gm200_i2c_aux_init(struct gm200_i2c_aux *aux) |
130 |
+ gm200_i2c_aux_fini(aux); |
131 |
+ return -EBUSY; |
132 |
+ } |
133 |
+- } while ((ctrl & 0x03000000) != urep); |
134 |
++ } while ((ctrl & 0x07000000) != urep); |
135 |
+ |
136 |
+ return 0; |
137 |
+ } |
138 |
+diff --git a/drivers/hwtracing/stm/heartbeat.c b/drivers/hwtracing/stm/heartbeat.c |
139 |
+index 3da7b673aab25..3957ce678265d 100644 |
140 |
+--- a/drivers/hwtracing/stm/heartbeat.c |
141 |
++++ b/drivers/hwtracing/stm/heartbeat.c |
142 |
+@@ -72,7 +72,7 @@ static void stm_heartbeat_unlink(struct stm_source_data *data) |
143 |
+ |
144 |
+ static int stm_heartbeat_init(void) |
145 |
+ { |
146 |
+- int i, ret = -ENOMEM; |
147 |
++ int i, ret; |
148 |
+ |
149 |
+ if (nr_devs < 0 || nr_devs > STM_HEARTBEAT_MAX) |
150 |
+ return -EINVAL; |
151 |
+@@ -80,8 +80,10 @@ static int stm_heartbeat_init(void) |
152 |
+ for (i = 0; i < nr_devs; i++) { |
153 |
+ stm_heartbeat[i].data.name = |
154 |
+ kasprintf(GFP_KERNEL, "heartbeat.%d", i); |
155 |
+- if (!stm_heartbeat[i].data.name) |
156 |
++ if (!stm_heartbeat[i].data.name) { |
157 |
++ ret = -ENOMEM; |
158 |
+ goto fail_unregister; |
159 |
++ } |
160 |
+ |
161 |
+ stm_heartbeat[i].data.nr_chans = 1; |
162 |
+ stm_heartbeat[i].data.link = stm_heartbeat_link; |
163 |
+diff --git a/drivers/i2c/busses/i2c-octeon-core.c b/drivers/i2c/busses/i2c-octeon-core.c |
164 |
+index 5e63b17f935d5..e5ad3f9cd372f 100644 |
165 |
+--- a/drivers/i2c/busses/i2c-octeon-core.c |
166 |
++++ b/drivers/i2c/busses/i2c-octeon-core.c |
167 |
+@@ -383,7 +383,7 @@ static int octeon_i2c_read(struct octeon_i2c *i2c, int target, |
168 |
+ |
169 |
+ data[i] = octeon_i2c_data_read(i2c); |
170 |
+ if (recv_len && i == 0) { |
171 |
+- if (data[i] > I2C_SMBUS_BLOCK_MAX + 1) |
172 |
++ if (data[i] > I2C_SMBUS_BLOCK_MAX) |
173 |
+ return -EPROTO; |
174 |
+ length += data[i]; |
175 |
+ } |
176 |
+diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c |
177 |
+index 788b3d6fd1cc9..b15a02f502df9 100644 |
178 |
+--- a/drivers/iio/dac/ad5504.c |
179 |
++++ b/drivers/iio/dac/ad5504.c |
180 |
+@@ -189,9 +189,9 @@ static ssize_t ad5504_write_dac_powerdown(struct iio_dev *indio_dev, |
181 |
+ return ret; |
182 |
+ |
183 |
+ if (pwr_down) |
184 |
+- st->pwr_down_mask |= (1 << chan->channel); |
185 |
+- else |
186 |
+ st->pwr_down_mask &= ~(1 << chan->channel); |
187 |
++ else |
188 |
++ st->pwr_down_mask |= (1 << chan->channel); |
189 |
+ |
190 |
+ ret = ad5504_spi_write(st, AD5504_ADDR_CTRL, |
191 |
+ AD5504_DAC_PWRDWN_MODE(st->pwr_down_mode) | |
192 |
+diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c |
193 |
+index 62e3dc19b6099..5d120c3cee57d 100644 |
194 |
+--- a/drivers/md/dm-table.c |
195 |
++++ b/drivers/md/dm-table.c |
196 |
+@@ -396,14 +396,23 @@ int dm_get_device(struct dm_target *ti, const char *path, fmode_t mode, |
197 |
+ { |
198 |
+ int r; |
199 |
+ dev_t dev; |
200 |
++ unsigned int major, minor; |
201 |
++ char dummy; |
202 |
+ struct dm_dev_internal *dd; |
203 |
+ struct dm_table *t = ti->table; |
204 |
+ |
205 |
+ BUG_ON(!t); |
206 |
+ |
207 |
+- dev = dm_get_dev_t(path); |
208 |
+- if (!dev) |
209 |
+- return -ENODEV; |
210 |
++ if (sscanf(path, "%u:%u%c", &major, &minor, &dummy) == 2) { |
211 |
++ /* Extract the major/minor numbers */ |
212 |
++ dev = MKDEV(major, minor); |
213 |
++ if (MAJOR(dev) != major || MINOR(dev) != minor) |
214 |
++ return -EOVERFLOW; |
215 |
++ } else { |
216 |
++ dev = dm_get_dev_t(path); |
217 |
++ if (!dev) |
218 |
++ return -ENODEV; |
219 |
++ } |
220 |
+ |
221 |
+ dd = find_device(&t->devices, dev); |
222 |
+ if (!dd) { |
223 |
+diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c |
224 |
+index c7508d9a4c6fb..164078609f98e 100644 |
225 |
+--- a/drivers/net/can/dev.c |
226 |
++++ b/drivers/net/can/dev.c |
227 |
+@@ -555,11 +555,11 @@ static void can_restart(struct net_device *dev) |
228 |
+ } |
229 |
+ cf->can_id |= CAN_ERR_RESTARTED; |
230 |
+ |
231 |
+- netif_rx_ni(skb); |
232 |
+- |
233 |
+ stats->rx_packets++; |
234 |
+ stats->rx_bytes += cf->can_dlc; |
235 |
+ |
236 |
++ netif_rx_ni(skb); |
237 |
++ |
238 |
+ restart: |
239 |
+ netdev_dbg(dev, "restarted\n"); |
240 |
+ priv->can_stats.restarts++; |
241 |
+diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c |
242 |
+index c387be5c926b7..5ec0042bc3840 100644 |
243 |
+--- a/drivers/net/dsa/b53/b53_common.c |
244 |
++++ b/drivers/net/dsa/b53/b53_common.c |
245 |
+@@ -946,7 +946,7 @@ static int b53_vlan_prepare(struct dsa_switch *ds, int port, |
246 |
+ if ((is5325(dev) || is5365(dev)) && vlan->vid_begin == 0) |
247 |
+ return -EOPNOTSUPP; |
248 |
+ |
249 |
+- if (vlan->vid_end > dev->num_vlans) |
250 |
++ if (vlan->vid_end >= dev->num_vlans) |
251 |
+ return -ERANGE; |
252 |
+ |
253 |
+ b53_enable_vlan(dev, true); |
254 |
+diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c |
255 |
+index 6f8d4810ce979..7458b1a70e5d6 100644 |
256 |
+--- a/drivers/net/ethernet/renesas/sh_eth.c |
257 |
++++ b/drivers/net/ethernet/renesas/sh_eth.c |
258 |
+@@ -2411,10 +2411,10 @@ static int sh_eth_close(struct net_device *ndev) |
259 |
+ /* Free all the skbuffs in the Rx queue and the DMA buffer. */ |
260 |
+ sh_eth_ring_free(ndev); |
261 |
+ |
262 |
+- pm_runtime_put_sync(&mdp->pdev->dev); |
263 |
+- |
264 |
+ mdp->is_opened = 0; |
265 |
+ |
266 |
++ pm_runtime_put(&mdp->pdev->dev); |
267 |
++ |
268 |
+ return 0; |
269 |
+ } |
270 |
+ |
271 |
+diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c |
272 |
+index ad80e4223c2d3..a767d942bfca5 100644 |
273 |
+--- a/drivers/scsi/ufs/ufshcd.c |
274 |
++++ b/drivers/scsi/ufs/ufshcd.c |
275 |
+@@ -4552,19 +4552,16 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) |
276 |
+ { |
277 |
+ struct Scsi_Host *host; |
278 |
+ struct ufs_hba *hba; |
279 |
+- unsigned int tag; |
280 |
+ u32 pos; |
281 |
+ int err; |
282 |
+- u8 resp = 0xF; |
283 |
+- struct ufshcd_lrb *lrbp; |
284 |
++ u8 resp = 0xF, lun; |
285 |
+ unsigned long flags; |
286 |
+ |
287 |
+ host = cmd->device->host; |
288 |
+ hba = shost_priv(host); |
289 |
+- tag = cmd->request->tag; |
290 |
+ |
291 |
+- lrbp = &hba->lrb[tag]; |
292 |
+- err = ufshcd_issue_tm_cmd(hba, lrbp->lun, 0, UFS_LOGICAL_RESET, &resp); |
293 |
++ lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun); |
294 |
++ err = ufshcd_issue_tm_cmd(hba, lun, 0, UFS_LOGICAL_RESET, &resp); |
295 |
+ if (err || resp != UPIU_TASK_MANAGEMENT_FUNC_COMPL) { |
296 |
+ if (!err) |
297 |
+ err = resp; |
298 |
+@@ -4573,7 +4570,7 @@ static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd) |
299 |
+ |
300 |
+ /* clear the commands that were pending for corresponding LUN */ |
301 |
+ for_each_set_bit(pos, &hba->outstanding_reqs, hba->nutrs) { |
302 |
+- if (hba->lrb[pos].lun == lrbp->lun) { |
303 |
++ if (hba->lrb[pos].lun == lun) { |
304 |
+ err = ufshcd_clear_cmd(hba, pos); |
305 |
+ if (err) |
306 |
+ break; |
307 |
+diff --git a/drivers/usb/gadget/udc/bdc/Kconfig b/drivers/usb/gadget/udc/bdc/Kconfig |
308 |
+index 0d7b8c9f72fda..778df4badf888 100644 |
309 |
+--- a/drivers/usb/gadget/udc/bdc/Kconfig |
310 |
++++ b/drivers/usb/gadget/udc/bdc/Kconfig |
311 |
+@@ -14,7 +14,7 @@ if USB_BDC_UDC |
312 |
+ comment "Platform Support" |
313 |
+ config USB_BDC_PCI |
314 |
+ tristate "BDC support for PCIe based platforms" |
315 |
+- depends on PCI |
316 |
++ depends on PCI && BROKEN |
317 |
+ default USB_BDC_UDC |
318 |
+ help |
319 |
+ Enable support for platforms which have BDC connected through PCIe, such as Lego3 FPGA platform. |
320 |
+diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c |
321 |
+index 99c7cf4822c33..34ad964d54d11 100644 |
322 |
+--- a/drivers/usb/gadget/udc/core.c |
323 |
++++ b/drivers/usb/gadget/udc/core.c |
324 |
+@@ -1424,10 +1424,13 @@ static ssize_t usb_udc_softconn_store(struct device *dev, |
325 |
+ struct device_attribute *attr, const char *buf, size_t n) |
326 |
+ { |
327 |
+ struct usb_udc *udc = container_of(dev, struct usb_udc, dev); |
328 |
++ ssize_t ret; |
329 |
+ |
330 |
++ mutex_lock(&udc_lock); |
331 |
+ if (!udc->driver) { |
332 |
+ dev_err(dev, "soft-connect without a gadget driver\n"); |
333 |
+- return -EOPNOTSUPP; |
334 |
++ ret = -EOPNOTSUPP; |
335 |
++ goto out; |
336 |
+ } |
337 |
+ |
338 |
+ if (sysfs_streq(buf, "connect")) { |
339 |
+@@ -1439,10 +1442,14 @@ static ssize_t usb_udc_softconn_store(struct device *dev, |
340 |
+ usb_gadget_udc_stop(udc); |
341 |
+ } else { |
342 |
+ dev_err(dev, "unsupported command '%s'\n", buf); |
343 |
+- return -EINVAL; |
344 |
++ ret = -EINVAL; |
345 |
++ goto out; |
346 |
+ } |
347 |
+ |
348 |
+- return n; |
349 |
++ ret = n; |
350 |
++out: |
351 |
++ mutex_unlock(&udc_lock); |
352 |
++ return ret; |
353 |
+ } |
354 |
+ static DEVICE_ATTR(soft_connect, S_IWUSR, NULL, usb_udc_softconn_store); |
355 |
+ |
356 |
+diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c |
357 |
+index b3d6cc1a8021b..52c4176afae96 100644 |
358 |
+--- a/drivers/usb/host/ehci-hcd.c |
359 |
++++ b/drivers/usb/host/ehci-hcd.c |
360 |
+@@ -587,6 +587,7 @@ static int ehci_run (struct usb_hcd *hcd) |
361 |
+ struct ehci_hcd *ehci = hcd_to_ehci (hcd); |
362 |
+ u32 temp; |
363 |
+ u32 hcc_params; |
364 |
++ int rc; |
365 |
+ |
366 |
+ hcd->uses_new_polling = 1; |
367 |
+ |
368 |
+@@ -642,9 +643,20 @@ static int ehci_run (struct usb_hcd *hcd) |
369 |
+ down_write(&ehci_cf_port_reset_rwsem); |
370 |
+ ehci->rh_state = EHCI_RH_RUNNING; |
371 |
+ ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); |
372 |
++ |
373 |
++ /* Wait until HC become operational */ |
374 |
+ ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ |
375 |
+ msleep(5); |
376 |
++ rc = ehci_handshake(ehci, &ehci->regs->status, STS_HALT, 0, 100 * 1000); |
377 |
++ |
378 |
+ up_write(&ehci_cf_port_reset_rwsem); |
379 |
++ |
380 |
++ if (rc) { |
381 |
++ ehci_err(ehci, "USB %x.%x, controller refused to start: %d\n", |
382 |
++ ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), rc); |
383 |
++ return rc; |
384 |
++ } |
385 |
++ |
386 |
+ ehci->last_periodic_enable = ktime_get_real(); |
387 |
+ |
388 |
+ temp = HC_VERSION(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); |
389 |
+diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c |
390 |
+index 3a3926ff7b857..643c427bb2773 100644 |
391 |
+--- a/drivers/usb/host/ehci-hub.c |
392 |
++++ b/drivers/usb/host/ehci-hub.c |
393 |
+@@ -350,6 +350,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) |
394 |
+ |
395 |
+ unlink_empty_async_suspended(ehci); |
396 |
+ |
397 |
++ /* Some Synopsys controllers mistakenly leave IAA turned on */ |
398 |
++ ehci_writel(ehci, STS_IAA, &ehci->regs->status); |
399 |
++ |
400 |
+ /* Any IAA cycle that started before the suspend is now invalid */ |
401 |
+ end_iaa_cycle(ehci); |
402 |
+ ehci_handle_start_intr_unlinks(ehci); |
403 |
+diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c |
404 |
+index 1468dca77facf..6e1d65fda97e0 100644 |
405 |
+--- a/drivers/usb/host/xhci-ring.c |
406 |
++++ b/drivers/usb/host/xhci-ring.c |
407 |
+@@ -2851,6 +2851,8 @@ static void queue_trb(struct xhci_hcd *xhci, struct xhci_ring *ring, |
408 |
+ trb->field[0] = cpu_to_le32(field1); |
409 |
+ trb->field[1] = cpu_to_le32(field2); |
410 |
+ trb->field[2] = cpu_to_le32(field3); |
411 |
++ /* make sure TRB is fully written before giving it to the controller */ |
412 |
++ wmb(); |
413 |
+ trb->field[3] = cpu_to_le32(field4); |
414 |
+ inc_enq(xhci, ring, more_trbs_coming); |
415 |
+ } |
416 |
+diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c |
417 |
+index 97d57a94776ac..040c43097d558 100644 |
418 |
+--- a/drivers/usb/host/xhci-tegra.c |
419 |
++++ b/drivers/usb/host/xhci-tegra.c |
420 |
+@@ -579,6 +579,13 @@ static void tegra_xusb_mbox_handle(struct tegra_xusb *tegra, |
421 |
+ enable); |
422 |
+ if (err < 0) |
423 |
+ break; |
424 |
++ |
425 |
++ /* |
426 |
++ * wait 500us for LFPS detector to be disabled before |
427 |
++ * sending ACK |
428 |
++ */ |
429 |
++ if (!enable) |
430 |
++ usleep_range(500, 1000); |
431 |
+ } |
432 |
+ |
433 |
+ if (err < 0) { |
434 |
+diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h |
435 |
+index 61650c1830d45..d830eddacdc60 100644 |
436 |
+--- a/include/linux/compiler-gcc.h |
437 |
++++ b/include/linux/compiler-gcc.h |
438 |
+@@ -149,6 +149,12 @@ |
439 |
+ |
440 |
+ #if GCC_VERSION < 30200 |
441 |
+ # error Sorry, your compiler is too old - please upgrade it. |
442 |
++#elif defined(CONFIG_ARM64) && GCC_VERSION < 50100 && !defined(__clang__) |
443 |
++/* |
444 |
++ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293 |
445 |
++ * https://lore.kernel.org/r/20210107111841.GN1551@××××××××××××××××××.uk |
446 |
++ */ |
447 |
++# error Sorry, your version of GCC is too old - please use 5.1 or newer. |
448 |
+ #endif |
449 |
+ |
450 |
+ #if GCC_VERSION < 30300 |
451 |
+diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c |
452 |
+index 335c00209f746..78bdfbefd996c 100644 |
453 |
+--- a/kernel/bpf/verifier.c |
454 |
++++ b/kernel/bpf/verifier.c |
455 |
+@@ -1732,12 +1732,11 @@ static void adjust_reg_min_max_vals(struct bpf_verifier_env *env, |
456 |
+ * unsigned shift, so make the appropriate casts. |
457 |
+ */ |
458 |
+ if (min_val < 0 || dst_reg->min_value < 0) |
459 |
+- dst_reg->min_value = BPF_REGISTER_MIN_RANGE; |
460 |
++ reset_reg_range_values(regs, insn->dst_reg); |
461 |
+ else |
462 |
+- dst_reg->min_value = |
463 |
+- (u64)(dst_reg->min_value) >> min_val; |
464 |
++ dst_reg->min_value = (u64)(dst_reg->min_value) >> max_val; |
465 |
+ if (dst_reg->max_value != BPF_REGISTER_MAX_RANGE) |
466 |
+- dst_reg->max_value >>= max_val; |
467 |
++ dst_reg->max_value >>= min_val; |
468 |
+ break; |
469 |
+ default: |
470 |
+ reset_reg_range_values(regs, insn->dst_reg); |
471 |
+diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c |
472 |
+index 55f60d2edc3fb..4ec8bf634f89f 100644 |
473 |
+--- a/kernel/trace/ring_buffer.c |
474 |
++++ b/kernel/trace/ring_buffer.c |
475 |
+@@ -4289,6 +4289,8 @@ void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu) |
476 |
+ |
477 |
+ if (!cpumask_test_cpu(cpu, buffer->cpumask)) |
478 |
+ return; |
479 |
++ /* prevent another thread from changing buffer sizes */ |
480 |
++ mutex_lock(&buffer->mutex); |
481 |
+ |
482 |
+ atomic_inc(&buffer->resize_disabled); |
483 |
+ atomic_inc(&cpu_buffer->record_disabled); |
484 |
+@@ -4312,6 +4314,8 @@ void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu) |
485 |
+ |
486 |
+ atomic_dec(&cpu_buffer->record_disabled); |
487 |
+ atomic_dec(&buffer->resize_disabled); |
488 |
++ |
489 |
++ mutex_unlock(&buffer->mutex); |
490 |
+ } |
491 |
+ EXPORT_SYMBOL_GPL(ring_buffer_reset_cpu); |
492 |
+ |
493 |
+diff --git a/mm/slub.c b/mm/slub.c |
494 |
+index 7ccfc043c28e2..5c48a8a0524a2 100644 |
495 |
+--- a/mm/slub.c |
496 |
++++ b/mm/slub.c |
497 |
+@@ -5648,10 +5648,8 @@ static int sysfs_slab_add(struct kmem_cache *s) |
498 |
+ |
499 |
+ s->kobj.kset = cache_kset(s); |
500 |
+ err = kobject_init_and_add(&s->kobj, &slab_ktype, NULL, "%s", name); |
501 |
+- if (err) { |
502 |
+- kobject_put(&s->kobj); |
503 |
++ if (err) |
504 |
+ goto out; |
505 |
+- } |
506 |
+ |
507 |
+ err = sysfs_create_group(&s->kobj, &slab_attr_group); |
508 |
+ if (err) |
509 |
+diff --git a/net/core/skbuff.c b/net/core/skbuff.c |
510 |
+index 5582a4ed7c2fb..79034fb861b52 100644 |
511 |
+--- a/net/core/skbuff.c |
512 |
++++ b/net/core/skbuff.c |
513 |
+@@ -428,7 +428,11 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int len, |
514 |
+ |
515 |
+ len += NET_SKB_PAD; |
516 |
+ |
517 |
+- if ((len > SKB_WITH_OVERHEAD(PAGE_SIZE)) || |
518 |
++ /* If requested length is either too small or too big, |
519 |
++ * we use kmalloc() for skb->head allocation. |
520 |
++ */ |
521 |
++ if (len <= SKB_WITH_OVERHEAD(1024) || |
522 |
++ len > SKB_WITH_OVERHEAD(PAGE_SIZE) || |
523 |
+ (gfp_mask & (__GFP_DIRECT_RECLAIM | GFP_DMA))) { |
524 |
+ skb = __alloc_skb(len, gfp_mask, SKB_ALLOC_RX, NUMA_NO_NODE); |
525 |
+ if (!skb) |
526 |
+diff --git a/net/ipv4/netfilter/ipt_rpfilter.c b/net/ipv4/netfilter/ipt_rpfilter.c |
527 |
+index 78cc64eddfc18..32a363465e0a4 100644 |
528 |
+--- a/net/ipv4/netfilter/ipt_rpfilter.c |
529 |
++++ b/net/ipv4/netfilter/ipt_rpfilter.c |
530 |
+@@ -92,7 +92,7 @@ static bool rpfilter_mt(const struct sk_buff *skb, struct xt_action_param *par) |
531 |
+ flow.saddr = rpfilter_get_saddr(iph->daddr); |
532 |
+ flow.flowi4_oif = 0; |
533 |
+ flow.flowi4_mark = info->flags & XT_RPFILTER_VALID_MARK ? skb->mark : 0; |
534 |
+- flow.flowi4_tos = RT_TOS(iph->tos); |
535 |
++ flow.flowi4_tos = iph->tos & IPTOS_RT_MASK; |
536 |
+ flow.flowi4_scope = RT_SCOPE_UNIVERSE; |
537 |
+ |
538 |
+ return rpfilter_lookup_reverse(par->net, &flow, par->in, info->flags) ^ invert; |
539 |
+diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c |
540 |
+index a4c00242a90b3..6119ab33a56ea 100644 |
541 |
+--- a/net/ipv6/addrconf.c |
542 |
++++ b/net/ipv6/addrconf.c |
543 |
+@@ -2285,6 +2285,7 @@ static void addrconf_add_mroute(struct net_device *dev) |
544 |
+ .fc_dst_len = 8, |
545 |
+ .fc_flags = RTF_UP, |
546 |
+ .fc_nlinfo.nl_net = dev_net(dev), |
547 |
++ .fc_protocol = RTPROT_KERNEL, |
548 |
+ }; |
549 |
+ |
550 |
+ ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0); |
551 |
+diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c |
552 |
+index ab66e2b38e662..70ee78d8f8fb8 100644 |
553 |
+--- a/net/sched/cls_tcindex.c |
554 |
++++ b/net/sched/cls_tcindex.c |
555 |
+@@ -307,9 +307,13 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, |
556 |
+ if (tb[TCA_TCINDEX_MASK]) |
557 |
+ cp->mask = nla_get_u16(tb[TCA_TCINDEX_MASK]); |
558 |
+ |
559 |
+- if (tb[TCA_TCINDEX_SHIFT]) |
560 |
++ if (tb[TCA_TCINDEX_SHIFT]) { |
561 |
+ cp->shift = nla_get_u32(tb[TCA_TCINDEX_SHIFT]); |
562 |
+- |
563 |
++ if (cp->shift > 16) { |
564 |
++ err = -EINVAL; |
565 |
++ goto errout; |
566 |
++ } |
567 |
++ } |
568 |
+ if (!cp->hash) { |
569 |
+ /* Hash not specified, use perfect hash if the upper limit |
570 |
+ * of the hashing index is below the threshold. |
571 |
+diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c |
572 |
+index c939459172353..247b68790a522 100644 |
573 |
+--- a/sound/core/seq/oss/seq_oss_synth.c |
574 |
++++ b/sound/core/seq/oss/seq_oss_synth.c |
575 |
+@@ -624,7 +624,8 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in |
576 |
+ |
577 |
+ if (info->is_midi) { |
578 |
+ struct midi_info minf; |
579 |
+- snd_seq_oss_midi_make_info(dp, info->midi_mapped, &minf); |
580 |
++ if (snd_seq_oss_midi_make_info(dp, info->midi_mapped, &minf)) |
581 |
++ return -ENXIO; |
582 |
+ inf->synth_type = SYNTH_TYPE_MIDI; |
583 |
+ inf->synth_subtype = 0; |
584 |
+ inf->nr_voices = 16; |
585 |
+diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c |
586 |
+index fc30d1e8aa76a..9dd104c308e1d 100644 |
587 |
+--- a/sound/pci/hda/patch_via.c |
588 |
++++ b/sound/pci/hda/patch_via.c |
589 |
+@@ -135,6 +135,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec) |
590 |
+ spec->codec_type = VT1708S; |
591 |
+ spec->gen.indep_hp = 1; |
592 |
+ spec->gen.keep_eapd_on = 1; |
593 |
++ spec->gen.dac_min_mute = 1; |
594 |
+ spec->gen.pcm_playback_hook = via_playback_pcm_hook; |
595 |
+ spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; |
596 |
+ codec->power_save_node = 1; |
597 |
+diff --git a/sound/soc/intel/boards/haswell.c b/sound/soc/intel/boards/haswell.c |
598 |
+index 11d0cc2b0e390..060da95770416 100644 |
599 |
+--- a/sound/soc/intel/boards/haswell.c |
600 |
++++ b/sound/soc/intel/boards/haswell.c |
601 |
+@@ -197,6 +197,7 @@ static struct platform_driver haswell_audio = { |
602 |
+ .probe = haswell_audio_probe, |
603 |
+ .driver = { |
604 |
+ .name = "haswell-audio", |
605 |
++ .pm = &snd_soc_pm_ops, |
606 |
+ }, |
607 |
+ }; |
608 |
+ |