1 |
commit: 576d2c6121c73c74c140804fb35f5aff0cf01dd0 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 1 12:06:13 2020 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 1 12:06:13 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=576d2c61 |
7 |
|
8 |
Linux patch 5.6.1 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1001_linux-5.6.1.patch | 787 +++++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 791 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 5080b3d..e9a8c70 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -43,6 +43,10 @@ EXPERIMENTAL |
21 |
Individual Patch Descriptions: |
22 |
-------------------------------------------------------------------------- |
23 |
|
24 |
+Patch: 1000_linux-5.6.1.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 5.6.1 |
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/1001_linux-5.6.1.patch b/1001_linux-5.6.1.patch |
33 |
new file mode 100644 |
34 |
index 0000000..cbde007 |
35 |
--- /dev/null |
36 |
+++ b/1001_linux-5.6.1.patch |
37 |
@@ -0,0 +1,787 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 4d0711f54047..75d17e7f799b 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 5 |
45 |
+ PATCHLEVEL = 6 |
46 |
+-SUBLEVEL = 0 |
47 |
++SUBLEVEL = 1 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Kleptomaniac Octopus |
50 |
+ |
51 |
+diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c |
52 |
+index 11ea1aff40db..8c6f8c83dd6f 100644 |
53 |
+--- a/drivers/ata/ahci.c |
54 |
++++ b/drivers/ata/ahci.c |
55 |
+@@ -401,6 +401,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { |
56 |
+ { PCI_VDEVICE(INTEL, 0xa252), board_ahci }, /* Lewisburg RAID*/ |
57 |
+ { PCI_VDEVICE(INTEL, 0xa256), board_ahci }, /* Lewisburg RAID*/ |
58 |
+ { PCI_VDEVICE(INTEL, 0xa356), board_ahci }, /* Cannon Lake PCH-H RAID */ |
59 |
++ { PCI_VDEVICE(INTEL, 0x06d7), board_ahci }, /* Comet Lake-H RAID */ |
60 |
+ { PCI_VDEVICE(INTEL, 0x0f22), board_ahci_mobile }, /* Bay Trail AHCI */ |
61 |
+ { PCI_VDEVICE(INTEL, 0x0f23), board_ahci_mobile }, /* Bay Trail AHCI */ |
62 |
+ { PCI_VDEVICE(INTEL, 0x22a3), board_ahci_mobile }, /* Cherry Tr. AHCI */ |
63 |
+diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c |
64 |
+index 039963a7765b..198ddfb8d2b1 100644 |
65 |
+--- a/drivers/media/usb/b2c2/flexcop-usb.c |
66 |
++++ b/drivers/media/usb/b2c2/flexcop-usb.c |
67 |
+@@ -511,6 +511,9 @@ static int flexcop_usb_init(struct flexcop_usb *fc_usb) |
68 |
+ return ret; |
69 |
+ } |
70 |
+ |
71 |
++ if (fc_usb->uintf->cur_altsetting->desc.bNumEndpoints < 1) |
72 |
++ return -ENODEV; |
73 |
++ |
74 |
+ switch (fc_usb->udev->speed) { |
75 |
+ case USB_SPEED_LOW: |
76 |
+ err("cannot handle USB speed because it is too slow."); |
77 |
+@@ -544,9 +547,6 @@ static int flexcop_usb_probe(struct usb_interface *intf, |
78 |
+ struct flexcop_device *fc = NULL; |
79 |
+ int ret; |
80 |
+ |
81 |
+- if (intf->cur_altsetting->desc.bNumEndpoints < 1) |
82 |
+- return -ENODEV; |
83 |
+- |
84 |
+ if ((fc = flexcop_device_kmalloc(sizeof(struct flexcop_usb))) == NULL) { |
85 |
+ err("out of memory\n"); |
86 |
+ return -ENOMEM; |
87 |
+diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c b/drivers/media/usb/dvb-usb/dib0700_core.c |
88 |
+index e53c58ab6488..ef62dd6c5ae4 100644 |
89 |
+--- a/drivers/media/usb/dvb-usb/dib0700_core.c |
90 |
++++ b/drivers/media/usb/dvb-usb/dib0700_core.c |
91 |
+@@ -818,7 +818,7 @@ int dib0700_rc_setup(struct dvb_usb_device *d, struct usb_interface *intf) |
92 |
+ |
93 |
+ /* Starting in firmware 1.20, the RC info is provided on a bulk pipe */ |
94 |
+ |
95 |
+- if (intf->altsetting[0].desc.bNumEndpoints < rc_ep + 1) |
96 |
++ if (intf->cur_altsetting->desc.bNumEndpoints < rc_ep + 1) |
97 |
+ return -ENODEV; |
98 |
+ |
99 |
+ purb = usb_alloc_urb(0, GFP_KERNEL); |
100 |
+@@ -838,7 +838,7 @@ int dib0700_rc_setup(struct dvb_usb_device *d, struct usb_interface *intf) |
101 |
+ * Some devices like the Hauppauge NovaTD model 52009 use an interrupt |
102 |
+ * endpoint, while others use a bulk one. |
103 |
+ */ |
104 |
+- e = &intf->altsetting[0].endpoint[rc_ep].desc; |
105 |
++ e = &intf->cur_altsetting->endpoint[rc_ep].desc; |
106 |
+ if (usb_endpoint_dir_in(e)) { |
107 |
+ if (usb_endpoint_xfer_bulk(e)) { |
108 |
+ pipe = usb_rcvbulkpipe(d->udev, rc_ep); |
109 |
+diff --git a/drivers/media/usb/gspca/ov519.c b/drivers/media/usb/gspca/ov519.c |
110 |
+index f417dfc0b872..0afe70a3f9a2 100644 |
111 |
+--- a/drivers/media/usb/gspca/ov519.c |
112 |
++++ b/drivers/media/usb/gspca/ov519.c |
113 |
+@@ -3477,6 +3477,11 @@ static void ov511_mode_init_regs(struct sd *sd) |
114 |
+ return; |
115 |
+ } |
116 |
+ |
117 |
++ if (alt->desc.bNumEndpoints < 1) { |
118 |
++ sd->gspca_dev.usb_err = -ENODEV; |
119 |
++ return; |
120 |
++ } |
121 |
++ |
122 |
+ packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); |
123 |
+ reg_w(sd, R51x_FIFO_PSIZE, packet_size >> 5); |
124 |
+ |
125 |
+@@ -3603,6 +3608,11 @@ static void ov518_mode_init_regs(struct sd *sd) |
126 |
+ return; |
127 |
+ } |
128 |
+ |
129 |
++ if (alt->desc.bNumEndpoints < 1) { |
130 |
++ sd->gspca_dev.usb_err = -ENODEV; |
131 |
++ return; |
132 |
++ } |
133 |
++ |
134 |
+ packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); |
135 |
+ ov518_reg_w32(sd, R51x_FIFO_PSIZE, packet_size & ~7, 2); |
136 |
+ |
137 |
+diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx.c b/drivers/media/usb/gspca/stv06xx/stv06xx.c |
138 |
+index 79653d409951..95673fc0a99c 100644 |
139 |
+--- a/drivers/media/usb/gspca/stv06xx/stv06xx.c |
140 |
++++ b/drivers/media/usb/gspca/stv06xx/stv06xx.c |
141 |
+@@ -282,6 +282,9 @@ static int stv06xx_start(struct gspca_dev *gspca_dev) |
142 |
+ return -EIO; |
143 |
+ } |
144 |
+ |
145 |
++ if (alt->desc.bNumEndpoints < 1) |
146 |
++ return -ENODEV; |
147 |
++ |
148 |
+ packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); |
149 |
+ err = stv06xx_write_bridge(sd, STV_ISO_SIZE_L, packet_size); |
150 |
+ if (err < 0) |
151 |
+@@ -306,11 +309,21 @@ out: |
152 |
+ |
153 |
+ static int stv06xx_isoc_init(struct gspca_dev *gspca_dev) |
154 |
+ { |
155 |
++ struct usb_interface_cache *intfc; |
156 |
+ struct usb_host_interface *alt; |
157 |
+ struct sd *sd = (struct sd *) gspca_dev; |
158 |
+ |
159 |
++ intfc = gspca_dev->dev->actconfig->intf_cache[0]; |
160 |
++ |
161 |
++ if (intfc->num_altsetting < 2) |
162 |
++ return -ENODEV; |
163 |
++ |
164 |
++ alt = &intfc->altsetting[1]; |
165 |
++ |
166 |
++ if (alt->desc.bNumEndpoints < 1) |
167 |
++ return -ENODEV; |
168 |
++ |
169 |
+ /* Start isoc bandwidth "negotiation" at max isoc bandwidth */ |
170 |
+- alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1]; |
171 |
+ alt->endpoint[0].desc.wMaxPacketSize = |
172 |
+ cpu_to_le16(sd->sensor->max_packet_size[gspca_dev->curr_mode]); |
173 |
+ |
174 |
+@@ -323,6 +336,10 @@ static int stv06xx_isoc_nego(struct gspca_dev *gspca_dev) |
175 |
+ struct usb_host_interface *alt; |
176 |
+ struct sd *sd = (struct sd *) gspca_dev; |
177 |
+ |
178 |
++ /* |
179 |
++ * Existence of altsetting and endpoint was verified in |
180 |
++ * stv06xx_isoc_init() |
181 |
++ */ |
182 |
+ alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1]; |
183 |
+ packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); |
184 |
+ min_packet_size = sd->sensor->min_packet_size[gspca_dev->curr_mode]; |
185 |
+diff --git a/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c b/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c |
186 |
+index 6d1007715ff7..ae382b3b5f7f 100644 |
187 |
+--- a/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c |
188 |
++++ b/drivers/media/usb/gspca/stv06xx/stv06xx_pb0100.c |
189 |
+@@ -185,6 +185,10 @@ static int pb0100_start(struct sd *sd) |
190 |
+ alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); |
191 |
+ if (!alt) |
192 |
+ return -ENODEV; |
193 |
++ |
194 |
++ if (alt->desc.bNumEndpoints < 1) |
195 |
++ return -ENODEV; |
196 |
++ |
197 |
+ packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); |
198 |
+ |
199 |
+ /* If we don't have enough bandwidth use a lower framerate */ |
200 |
+diff --git a/drivers/media/usb/gspca/xirlink_cit.c b/drivers/media/usb/gspca/xirlink_cit.c |
201 |
+index 934a90bd78c2..c579b100f066 100644 |
202 |
+--- a/drivers/media/usb/gspca/xirlink_cit.c |
203 |
++++ b/drivers/media/usb/gspca/xirlink_cit.c |
204 |
+@@ -1442,6 +1442,9 @@ static int cit_get_packet_size(struct gspca_dev *gspca_dev) |
205 |
+ return -EIO; |
206 |
+ } |
207 |
+ |
208 |
++ if (alt->desc.bNumEndpoints < 1) |
209 |
++ return -ENODEV; |
210 |
++ |
211 |
+ return le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); |
212 |
+ } |
213 |
+ |
214 |
+@@ -2626,6 +2629,7 @@ static int sd_start(struct gspca_dev *gspca_dev) |
215 |
+ |
216 |
+ static int sd_isoc_init(struct gspca_dev *gspca_dev) |
217 |
+ { |
218 |
++ struct usb_interface_cache *intfc; |
219 |
+ struct usb_host_interface *alt; |
220 |
+ int max_packet_size; |
221 |
+ |
222 |
+@@ -2641,8 +2645,17 @@ static int sd_isoc_init(struct gspca_dev *gspca_dev) |
223 |
+ break; |
224 |
+ } |
225 |
+ |
226 |
++ intfc = gspca_dev->dev->actconfig->intf_cache[0]; |
227 |
++ |
228 |
++ if (intfc->num_altsetting < 2) |
229 |
++ return -ENODEV; |
230 |
++ |
231 |
++ alt = &intfc->altsetting[1]; |
232 |
++ |
233 |
++ if (alt->desc.bNumEndpoints < 1) |
234 |
++ return -ENODEV; |
235 |
++ |
236 |
+ /* Start isoc bandwidth "negotiation" at max isoc bandwidth */ |
237 |
+- alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1]; |
238 |
+ alt->endpoint[0].desc.wMaxPacketSize = cpu_to_le16(max_packet_size); |
239 |
+ |
240 |
+ return 0; |
241 |
+@@ -2665,6 +2678,9 @@ static int sd_isoc_nego(struct gspca_dev *gspca_dev) |
242 |
+ break; |
243 |
+ } |
244 |
+ |
245 |
++ /* |
246 |
++ * Existence of altsetting and endpoint was verified in sd_isoc_init() |
247 |
++ */ |
248 |
+ alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1]; |
249 |
+ packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); |
250 |
+ if (packet_size <= min_packet_size) |
251 |
+diff --git a/drivers/media/usb/usbtv/usbtv-core.c b/drivers/media/usb/usbtv/usbtv-core.c |
252 |
+index 5095c380b2c1..ee9c656d121f 100644 |
253 |
+--- a/drivers/media/usb/usbtv/usbtv-core.c |
254 |
++++ b/drivers/media/usb/usbtv/usbtv-core.c |
255 |
+@@ -56,7 +56,7 @@ int usbtv_set_regs(struct usbtv *usbtv, const u16 regs[][2], int size) |
256 |
+ |
257 |
+ ret = usb_control_msg(usbtv->udev, pipe, USBTV_REQUEST_REG, |
258 |
+ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
259 |
+- value, index, NULL, 0, 0); |
260 |
++ value, index, NULL, 0, USB_CTRL_GET_TIMEOUT); |
261 |
+ if (ret < 0) |
262 |
+ return ret; |
263 |
+ } |
264 |
+diff --git a/drivers/media/usb/usbtv/usbtv-video.c b/drivers/media/usb/usbtv/usbtv-video.c |
265 |
+index 3d9284a09ee5..b249f037900c 100644 |
266 |
+--- a/drivers/media/usb/usbtv/usbtv-video.c |
267 |
++++ b/drivers/media/usb/usbtv/usbtv-video.c |
268 |
+@@ -800,7 +800,8 @@ static int usbtv_s_ctrl(struct v4l2_ctrl *ctrl) |
269 |
+ ret = usb_control_msg(usbtv->udev, |
270 |
+ usb_rcvctrlpipe(usbtv->udev, 0), USBTV_CONTROL_REG, |
271 |
+ USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
272 |
+- 0, USBTV_BASE + 0x0244, (void *)data, 3, 0); |
273 |
++ 0, USBTV_BASE + 0x0244, (void *)data, 3, |
274 |
++ USB_CTRL_GET_TIMEOUT); |
275 |
+ if (ret < 0) |
276 |
+ goto error; |
277 |
+ } |
278 |
+@@ -851,7 +852,7 @@ static int usbtv_s_ctrl(struct v4l2_ctrl *ctrl) |
279 |
+ ret = usb_control_msg(usbtv->udev, usb_sndctrlpipe(usbtv->udev, 0), |
280 |
+ USBTV_CONTROL_REG, |
281 |
+ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
282 |
+- 0, index, (void *)data, size, 0); |
283 |
++ 0, index, (void *)data, size, USB_CTRL_SET_TIMEOUT); |
284 |
+ |
285 |
+ error: |
286 |
+ if (ret < 0) |
287 |
+diff --git a/drivers/media/v4l2-core/v4l2-device.c b/drivers/media/v4l2-core/v4l2-device.c |
288 |
+index 63d6b147b21e..41da73ce2e98 100644 |
289 |
+--- a/drivers/media/v4l2-core/v4l2-device.c |
290 |
++++ b/drivers/media/v4l2-core/v4l2-device.c |
291 |
+@@ -179,6 +179,7 @@ static void v4l2_subdev_release(struct v4l2_subdev *sd) |
292 |
+ |
293 |
+ if (sd->internal_ops && sd->internal_ops->release) |
294 |
+ sd->internal_ops->release(sd); |
295 |
++ sd->devnode = NULL; |
296 |
+ module_put(owner); |
297 |
+ } |
298 |
+ |
299 |
+diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c |
300 |
+index 93cf28febdf6..7b00d7069e21 100644 |
301 |
+--- a/drivers/staging/kpc2000/kpc2000/core.c |
302 |
++++ b/drivers/staging/kpc2000/kpc2000/core.c |
303 |
+@@ -110,10 +110,10 @@ static ssize_t cpld_reconfigure(struct device *dev, |
304 |
+ const char *buf, size_t count) |
305 |
+ { |
306 |
+ struct kp2000_device *pcard = dev_get_drvdata(dev); |
307 |
+- long wr_val; |
308 |
++ unsigned long wr_val; |
309 |
+ int rv; |
310 |
+ |
311 |
+- rv = kstrtol(buf, 0, &wr_val); |
312 |
++ rv = kstrtoul(buf, 0, &wr_val); |
313 |
+ if (rv < 0) |
314 |
+ return rv; |
315 |
+ if (wr_val > 7) |
316 |
+diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c |
317 |
+index 845c8817281c..f7f09c0d273f 100644 |
318 |
+--- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c |
319 |
++++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c |
320 |
+@@ -32,6 +32,7 @@ static const struct usb_device_id rtw_usb_id_tbl[] = { |
321 |
+ /****** 8188EUS ********/ |
322 |
+ {USB_DEVICE(0x056e, 0x4008)}, /* Elecom WDC-150SU2M */ |
323 |
+ {USB_DEVICE(0x07b8, 0x8179)}, /* Abocom - Abocom */ |
324 |
++ {USB_DEVICE(0x0B05, 0x18F0)}, /* ASUS USB-N10 Nano B1 */ |
325 |
+ {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */ |
326 |
+ {USB_DEVICE(0x2001, 0x3310)}, /* Dlink DWA-123 REV D1 */ |
327 |
+ {USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */ |
328 |
+diff --git a/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt b/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt |
329 |
+index 081d58abd5ac..fca6357e1d45 100644 |
330 |
+--- a/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt |
331 |
++++ b/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt |
332 |
+@@ -6,7 +6,7 @@ SPI |
333 |
+ You have to declare the WFxxx chip in your device tree. |
334 |
+ |
335 |
+ Required properties: |
336 |
+- - compatible: Should be "silabs,wfx-spi" |
337 |
++ - compatible: Should be "silabs,wf200" |
338 |
+ - reg: Chip select address of device |
339 |
+ - spi-max-frequency: Maximum SPI clocking speed of device in Hz |
340 |
+ - interrupts-extended: Should contain interrupt line (interrupt-parent + |
341 |
+@@ -15,6 +15,7 @@ Required properties: |
342 |
+ Optional properties: |
343 |
+ - reset-gpios: phandle of gpio that will be used to reset chip during probe. |
344 |
+ Without this property, you may encounter issues with warm boot. |
345 |
++ (Legacy: when compatible == "silabs,wfx-spi", the gpio is inverted.) |
346 |
+ |
347 |
+ Please consult Documentation/devicetree/bindings/spi/spi-bus.txt for optional |
348 |
+ SPI connection related properties, |
349 |
+@@ -23,12 +24,12 @@ Example: |
350 |
+ |
351 |
+ &spi1 { |
352 |
+ wfx { |
353 |
+- compatible = "silabs,wfx-spi"; |
354 |
++ compatible = "silabs,wf200"; |
355 |
+ pinctrl-names = "default"; |
356 |
+ pinctrl-0 = <&wfx_irq &wfx_gpios>; |
357 |
+ interrupts-extended = <&gpio 16 IRQ_TYPE_EDGE_RISING>; |
358 |
+ wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; |
359 |
+- reset-gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; |
360 |
++ reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>; |
361 |
+ reg = <0>; |
362 |
+ spi-max-frequency = <42000000>; |
363 |
+ }; |
364 |
+diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c |
365 |
+index f8901164c206..5450bd5e1b5d 100644 |
366 |
+--- a/drivers/staging/wfx/bus_sdio.c |
367 |
++++ b/drivers/staging/wfx/bus_sdio.c |
368 |
+@@ -200,25 +200,23 @@ static int wfx_sdio_probe(struct sdio_func *func, |
369 |
+ if (ret) |
370 |
+ goto err0; |
371 |
+ |
372 |
+- ret = wfx_sdio_irq_subscribe(bus); |
373 |
+- if (ret) |
374 |
+- goto err1; |
375 |
+- |
376 |
+ bus->core = wfx_init_common(&func->dev, &wfx_sdio_pdata, |
377 |
+ &wfx_sdio_hwbus_ops, bus); |
378 |
+ if (!bus->core) { |
379 |
+ ret = -EIO; |
380 |
+- goto err2; |
381 |
++ goto err1; |
382 |
+ } |
383 |
+ |
384 |
++ ret = wfx_sdio_irq_subscribe(bus); |
385 |
++ if (ret) |
386 |
++ goto err1; |
387 |
++ |
388 |
+ ret = wfx_probe(bus->core); |
389 |
+ if (ret) |
390 |
+- goto err3; |
391 |
++ goto err2; |
392 |
+ |
393 |
+ return 0; |
394 |
+ |
395 |
+-err3: |
396 |
+- wfx_free_common(bus->core); |
397 |
+ err2: |
398 |
+ wfx_sdio_irq_unsubscribe(bus); |
399 |
+ err1: |
400 |
+@@ -234,7 +232,6 @@ static void wfx_sdio_remove(struct sdio_func *func) |
401 |
+ struct wfx_sdio_priv *bus = sdio_get_drvdata(func); |
402 |
+ |
403 |
+ wfx_release(bus->core); |
404 |
+- wfx_free_common(bus->core); |
405 |
+ wfx_sdio_irq_unsubscribe(bus); |
406 |
+ sdio_claim_host(func); |
407 |
+ sdio_disable_func(func); |
408 |
+diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c |
409 |
+index 40bc33035de2..d6a75bd61595 100644 |
410 |
+--- a/drivers/staging/wfx/bus_spi.c |
411 |
++++ b/drivers/staging/wfx/bus_spi.c |
412 |
+@@ -27,6 +27,8 @@ MODULE_PARM_DESC(gpio_reset, "gpio number for reset. -1 for none."); |
413 |
+ #define SET_WRITE 0x7FFF /* usage: and operation */ |
414 |
+ #define SET_READ 0x8000 /* usage: or operation */ |
415 |
+ |
416 |
++#define WFX_RESET_INVERTED 1 |
417 |
++ |
418 |
+ static const struct wfx_platform_data wfx_spi_pdata = { |
419 |
+ .file_fw = "wfm_wf200", |
420 |
+ .file_pds = "wf200.pds", |
421 |
+@@ -154,6 +156,11 @@ static void wfx_spi_request_rx(struct work_struct *work) |
422 |
+ wfx_bh_request_rx(bus->core); |
423 |
+ } |
424 |
+ |
425 |
++static void wfx_flush_irq_work(void *w) |
426 |
++{ |
427 |
++ flush_work(w); |
428 |
++} |
429 |
++ |
430 |
+ static size_t wfx_spi_align_size(void *priv, size_t size) |
431 |
+ { |
432 |
+ // Most of SPI controllers avoid DMA if buffer size is not 32bit aligned |
433 |
+@@ -201,28 +208,31 @@ static int wfx_spi_probe(struct spi_device *func) |
434 |
+ if (!bus->gpio_reset) { |
435 |
+ dev_warn(&func->dev, "try to load firmware anyway\n"); |
436 |
+ } else { |
437 |
+- gpiod_set_value(bus->gpio_reset, 0); |
438 |
+- udelay(100); |
439 |
++ if (spi_get_device_id(func)->driver_data & WFX_RESET_INVERTED) |
440 |
++ gpiod_toggle_active_low(bus->gpio_reset); |
441 |
+ gpiod_set_value(bus->gpio_reset, 1); |
442 |
++ udelay(100); |
443 |
++ gpiod_set_value(bus->gpio_reset, 0); |
444 |
+ udelay(2000); |
445 |
+ } |
446 |
+ |
447 |
+- ret = devm_request_irq(&func->dev, func->irq, wfx_spi_irq_handler, |
448 |
+- IRQF_TRIGGER_RISING, "wfx", bus); |
449 |
+- if (ret) |
450 |
+- return ret; |
451 |
+- |
452 |
+ INIT_WORK(&bus->request_rx, wfx_spi_request_rx); |
453 |
+ bus->core = wfx_init_common(&func->dev, &wfx_spi_pdata, |
454 |
+ &wfx_spi_hwbus_ops, bus); |
455 |
+ if (!bus->core) |
456 |
+ return -EIO; |
457 |
+ |
458 |
+- ret = wfx_probe(bus->core); |
459 |
++ ret = devm_add_action_or_reset(&func->dev, wfx_flush_irq_work, |
460 |
++ &bus->request_rx); |
461 |
+ if (ret) |
462 |
+- wfx_free_common(bus->core); |
463 |
++ return ret; |
464 |
+ |
465 |
+- return ret; |
466 |
++ ret = devm_request_irq(&func->dev, func->irq, wfx_spi_irq_handler, |
467 |
++ IRQF_TRIGGER_RISING, "wfx", bus); |
468 |
++ if (ret) |
469 |
++ return ret; |
470 |
++ |
471 |
++ return wfx_probe(bus->core); |
472 |
+ } |
473 |
+ |
474 |
+ static int wfx_spi_remove(struct spi_device *func) |
475 |
+@@ -230,11 +240,6 @@ static int wfx_spi_remove(struct spi_device *func) |
476 |
+ struct wfx_spi_priv *bus = spi_get_drvdata(func); |
477 |
+ |
478 |
+ wfx_release(bus->core); |
479 |
+- wfx_free_common(bus->core); |
480 |
+- // A few IRQ will be sent during device release. Hopefully, no IRQ |
481 |
+- // should happen after wdev/wvif are released. |
482 |
+- devm_free_irq(&func->dev, func->irq, bus); |
483 |
+- flush_work(&bus->request_rx); |
484 |
+ return 0; |
485 |
+ } |
486 |
+ |
487 |
+@@ -244,14 +249,16 @@ static int wfx_spi_remove(struct spi_device *func) |
488 |
+ * stripped. |
489 |
+ */ |
490 |
+ static const struct spi_device_id wfx_spi_id[] = { |
491 |
+- { "wfx-spi", 0 }, |
492 |
++ { "wfx-spi", WFX_RESET_INVERTED }, |
493 |
++ { "wf200", 0 }, |
494 |
+ { }, |
495 |
+ }; |
496 |
+ MODULE_DEVICE_TABLE(spi, wfx_spi_id); |
497 |
+ |
498 |
+ #ifdef CONFIG_OF |
499 |
+ static const struct of_device_id wfx_spi_of_match[] = { |
500 |
+- { .compatible = "silabs,wfx-spi" }, |
501 |
++ { .compatible = "silabs,wfx-spi", .data = (void *)WFX_RESET_INVERTED }, |
502 |
++ { .compatible = "silabs,wf200" }, |
503 |
+ { }, |
504 |
+ }; |
505 |
+ MODULE_DEVICE_TABLE(of, wfx_spi_of_match); |
506 |
+diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c |
507 |
+index 84adad64fc30..76b2ff7fc7fe 100644 |
508 |
+--- a/drivers/staging/wfx/main.c |
509 |
++++ b/drivers/staging/wfx/main.c |
510 |
+@@ -262,6 +262,16 @@ static int wfx_send_pdata_pds(struct wfx_dev *wdev) |
511 |
+ return ret; |
512 |
+ } |
513 |
+ |
514 |
++static void wfx_free_common(void *data) |
515 |
++{ |
516 |
++ struct wfx_dev *wdev = data; |
517 |
++ |
518 |
++ mutex_destroy(&wdev->rx_stats_lock); |
519 |
++ mutex_destroy(&wdev->conf_mutex); |
520 |
++ wfx_tx_queues_deinit(wdev); |
521 |
++ ieee80211_free_hw(wdev->hw); |
522 |
++} |
523 |
++ |
524 |
+ struct wfx_dev *wfx_init_common(struct device *dev, |
525 |
+ const struct wfx_platform_data *pdata, |
526 |
+ const struct hwbus_ops *hwbus_ops, |
527 |
+@@ -332,15 +342,10 @@ struct wfx_dev *wfx_init_common(struct device *dev, |
528 |
+ wfx_init_hif_cmd(&wdev->hif_cmd); |
529 |
+ wfx_tx_queues_init(wdev); |
530 |
+ |
531 |
+- return wdev; |
532 |
+-} |
533 |
++ if (devm_add_action_or_reset(dev, wfx_free_common, wdev)) |
534 |
++ return NULL; |
535 |
+ |
536 |
+-void wfx_free_common(struct wfx_dev *wdev) |
537 |
+-{ |
538 |
+- mutex_destroy(&wdev->rx_stats_lock); |
539 |
+- mutex_destroy(&wdev->conf_mutex); |
540 |
+- wfx_tx_queues_deinit(wdev); |
541 |
+- ieee80211_free_hw(wdev->hw); |
542 |
++ return wdev; |
543 |
+ } |
544 |
+ |
545 |
+ int wfx_probe(struct wfx_dev *wdev) |
546 |
+diff --git a/drivers/staging/wfx/main.h b/drivers/staging/wfx/main.h |
547 |
+index 875f8c227803..9c9410072def 100644 |
548 |
+--- a/drivers/staging/wfx/main.h |
549 |
++++ b/drivers/staging/wfx/main.h |
550 |
+@@ -34,7 +34,6 @@ struct wfx_dev *wfx_init_common(struct device *dev, |
551 |
+ const struct wfx_platform_data *pdata, |
552 |
+ const struct hwbus_ops *hwbus_ops, |
553 |
+ void *hwbus_priv); |
554 |
+-void wfx_free_common(struct wfx_dev *wdev); |
555 |
+ |
556 |
+ int wfx_probe(struct wfx_dev *wdev); |
557 |
+ void wfx_release(struct wfx_dev *wdev); |
558 |
+diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c |
559 |
+index 0bcc61feee1d..51d6c55ae91f 100644 |
560 |
+--- a/drivers/staging/wfx/queue.c |
561 |
++++ b/drivers/staging/wfx/queue.c |
562 |
+@@ -130,12 +130,12 @@ static void wfx_tx_queue_clear(struct wfx_dev *wdev, struct wfx_queue *queue, |
563 |
+ spin_lock_bh(&queue->queue.lock); |
564 |
+ while ((item = __skb_dequeue(&queue->queue)) != NULL) |
565 |
+ skb_queue_head(gc_list, item); |
566 |
+- spin_lock_bh(&stats->pending.lock); |
567 |
++ spin_lock_nested(&stats->pending.lock, 1); |
568 |
+ for (i = 0; i < ARRAY_SIZE(stats->link_map_cache); ++i) { |
569 |
+ stats->link_map_cache[i] -= queue->link_map_cache[i]; |
570 |
+ queue->link_map_cache[i] = 0; |
571 |
+ } |
572 |
+- spin_unlock_bh(&stats->pending.lock); |
573 |
++ spin_unlock(&stats->pending.lock); |
574 |
+ spin_unlock_bh(&queue->queue.lock); |
575 |
+ } |
576 |
+ |
577 |
+@@ -207,9 +207,9 @@ void wfx_tx_queue_put(struct wfx_dev *wdev, struct wfx_queue *queue, |
578 |
+ |
579 |
+ ++queue->link_map_cache[tx_priv->link_id]; |
580 |
+ |
581 |
+- spin_lock_bh(&stats->pending.lock); |
582 |
++ spin_lock_nested(&stats->pending.lock, 1); |
583 |
+ ++stats->link_map_cache[tx_priv->link_id]; |
584 |
+- spin_unlock_bh(&stats->pending.lock); |
585 |
++ spin_unlock(&stats->pending.lock); |
586 |
+ spin_unlock_bh(&queue->queue.lock); |
587 |
+ } |
588 |
+ |
589 |
+@@ -237,11 +237,11 @@ static struct sk_buff *wfx_tx_queue_get(struct wfx_dev *wdev, |
590 |
+ __skb_unlink(skb, &queue->queue); |
591 |
+ --queue->link_map_cache[tx_priv->link_id]; |
592 |
+ |
593 |
+- spin_lock_bh(&stats->pending.lock); |
594 |
++ spin_lock_nested(&stats->pending.lock, 1); |
595 |
+ __skb_queue_tail(&stats->pending, skb); |
596 |
+ if (!--stats->link_map_cache[tx_priv->link_id]) |
597 |
+ wakeup_stats = true; |
598 |
+- spin_unlock_bh(&stats->pending.lock); |
599 |
++ spin_unlock(&stats->pending.lock); |
600 |
+ } |
601 |
+ spin_unlock_bh(&queue->queue.lock); |
602 |
+ if (wakeup_stats) |
603 |
+@@ -259,10 +259,10 @@ int wfx_pending_requeue(struct wfx_dev *wdev, struct sk_buff *skb) |
604 |
+ spin_lock_bh(&queue->queue.lock); |
605 |
+ ++queue->link_map_cache[tx_priv->link_id]; |
606 |
+ |
607 |
+- spin_lock_bh(&stats->pending.lock); |
608 |
++ spin_lock_nested(&stats->pending.lock, 1); |
609 |
+ ++stats->link_map_cache[tx_priv->link_id]; |
610 |
+ __skb_unlink(skb, &stats->pending); |
611 |
+- spin_unlock_bh(&stats->pending.lock); |
612 |
++ spin_unlock(&stats->pending.lock); |
613 |
+ __skb_queue_tail(&queue->queue, skb); |
614 |
+ spin_unlock_bh(&queue->queue.lock); |
615 |
+ return 0; |
616 |
+diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c |
617 |
+index b71756ab0394..7fe64fcd385d 100644 |
618 |
+--- a/drivers/staging/wlan-ng/hfa384x_usb.c |
619 |
++++ b/drivers/staging/wlan-ng/hfa384x_usb.c |
620 |
+@@ -3372,6 +3372,8 @@ static void hfa384x_int_rxmonitor(struct wlandevice *wlandev, |
621 |
+ WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN)) { |
622 |
+ pr_debug("overlen frm: len=%zd\n", |
623 |
+ skblen - sizeof(struct p80211_caphdr)); |
624 |
++ |
625 |
++ return; |
626 |
+ } |
627 |
+ |
628 |
+ skb = dev_alloc_skb(skblen); |
629 |
+diff --git a/drivers/staging/wlan-ng/prism2usb.c b/drivers/staging/wlan-ng/prism2usb.c |
630 |
+index 352556f6870a..4689b2170e4f 100644 |
631 |
+--- a/drivers/staging/wlan-ng/prism2usb.c |
632 |
++++ b/drivers/staging/wlan-ng/prism2usb.c |
633 |
+@@ -180,6 +180,7 @@ static void prism2sta_disconnect_usb(struct usb_interface *interface) |
634 |
+ |
635 |
+ cancel_work_sync(&hw->link_bh); |
636 |
+ cancel_work_sync(&hw->commsqual_bh); |
637 |
++ cancel_work_sync(&hw->usb_work); |
638 |
+ |
639 |
+ /* Now we complete any outstanding commands |
640 |
+ * and tell everyone who is waiting for their |
641 |
+diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c |
642 |
+index 47f09a6ce7bd..84d6f7df09a4 100644 |
643 |
+--- a/drivers/usb/class/cdc-acm.c |
644 |
++++ b/drivers/usb/class/cdc-acm.c |
645 |
+@@ -923,16 +923,16 @@ static int set_serial_info(struct tty_struct *tty, struct serial_struct *ss) |
646 |
+ |
647 |
+ mutex_lock(&acm->port.mutex); |
648 |
+ |
649 |
+- if ((ss->close_delay != old_close_delay) || |
650 |
+- (ss->closing_wait != old_closing_wait)) { |
651 |
+- if (!capable(CAP_SYS_ADMIN)) |
652 |
++ if (!capable(CAP_SYS_ADMIN)) { |
653 |
++ if ((ss->close_delay != old_close_delay) || |
654 |
++ (ss->closing_wait != old_closing_wait)) |
655 |
+ retval = -EPERM; |
656 |
+- else { |
657 |
+- acm->port.close_delay = close_delay; |
658 |
+- acm->port.closing_wait = closing_wait; |
659 |
+- } |
660 |
+- } else |
661 |
+- retval = -EOPNOTSUPP; |
662 |
++ else |
663 |
++ retval = -EOPNOTSUPP; |
664 |
++ } else { |
665 |
++ acm->port.close_delay = close_delay; |
666 |
++ acm->port.closing_wait = closing_wait; |
667 |
++ } |
668 |
+ |
669 |
+ mutex_unlock(&acm->port.mutex); |
670 |
+ return retval; |
671 |
+diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c |
672 |
+index 886c9b602f8c..5267ad2989ee 100644 |
673 |
+--- a/drivers/usb/musb/musb_host.c |
674 |
++++ b/drivers/usb/musb/musb_host.c |
675 |
+@@ -1436,10 +1436,7 @@ done: |
676 |
+ * We need to map sg if the transfer_buffer is |
677 |
+ * NULL. |
678 |
+ */ |
679 |
+- if (!urb->transfer_buffer) |
680 |
+- qh->use_sg = true; |
681 |
+- |
682 |
+- if (qh->use_sg) { |
683 |
++ if (!urb->transfer_buffer) { |
684 |
+ /* sg_miter_start is already done in musb_ep_program */ |
685 |
+ if (!sg_miter_next(&qh->sg_miter)) { |
686 |
+ dev_err(musb->controller, "error: sg list empty\n"); |
687 |
+@@ -1447,9 +1444,8 @@ done: |
688 |
+ status = -EINVAL; |
689 |
+ goto done; |
690 |
+ } |
691 |
+- urb->transfer_buffer = qh->sg_miter.addr; |
692 |
+ length = min_t(u32, length, qh->sg_miter.length); |
693 |
+- musb_write_fifo(hw_ep, length, urb->transfer_buffer); |
694 |
++ musb_write_fifo(hw_ep, length, qh->sg_miter.addr); |
695 |
+ qh->sg_miter.consumed = length; |
696 |
+ sg_miter_stop(&qh->sg_miter); |
697 |
+ } else { |
698 |
+@@ -1458,11 +1454,6 @@ done: |
699 |
+ |
700 |
+ qh->segsize = length; |
701 |
+ |
702 |
+- if (qh->use_sg) { |
703 |
+- if (offset + length >= urb->transfer_buffer_length) |
704 |
+- qh->use_sg = false; |
705 |
+- } |
706 |
+- |
707 |
+ musb_ep_select(mbase, epnum); |
708 |
+ musb_writew(epio, MUSB_TXCSR, |
709 |
+ MUSB_TXCSR_H_WZC_BITS | MUSB_TXCSR_TXPKTRDY); |
710 |
+@@ -1977,8 +1968,10 @@ finish: |
711 |
+ urb->actual_length += xfer_len; |
712 |
+ qh->offset += xfer_len; |
713 |
+ if (done) { |
714 |
+- if (qh->use_sg) |
715 |
++ if (qh->use_sg) { |
716 |
+ qh->use_sg = false; |
717 |
++ urb->transfer_buffer = NULL; |
718 |
++ } |
719 |
+ |
720 |
+ if (urb->status == -EINPROGRESS) |
721 |
+ urb->status = status; |
722 |
+diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c |
723 |
+index 5737add6a2a4..4cca0b836f43 100644 |
724 |
+--- a/drivers/usb/serial/io_edgeport.c |
725 |
++++ b/drivers/usb/serial/io_edgeport.c |
726 |
+@@ -710,7 +710,7 @@ static void edge_interrupt_callback(struct urb *urb) |
727 |
+ /* grab the txcredits for the ports if available */ |
728 |
+ position = 2; |
729 |
+ portNumber = 0; |
730 |
+- while ((position < length) && |
731 |
++ while ((position < length - 1) && |
732 |
+ (portNumber < edge_serial->serial->num_ports)) { |
733 |
+ txCredits = data[position] | (data[position+1] << 8); |
734 |
+ if (txCredits) { |
735 |
+diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
736 |
+index 0b5dcf973d94..8bfffca3e4ae 100644 |
737 |
+--- a/drivers/usb/serial/option.c |
738 |
++++ b/drivers/usb/serial/option.c |
739 |
+@@ -1992,8 +1992,14 @@ static const struct usb_device_id option_ids[] = { |
740 |
+ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ |
741 |
+ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ |
742 |
+ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */ |
743 |
++ { USB_DEVICE_INTERFACE_CLASS(0x1435, 0xd191, 0xff), /* Wistron Neweb D19Q1 */ |
744 |
++ .driver_info = RSVD(1) | RSVD(4) }, |
745 |
++ { USB_DEVICE_INTERFACE_CLASS(0x1690, 0x7588, 0xff), /* ASKEY WWHC050 */ |
746 |
++ .driver_info = RSVD(1) | RSVD(4) }, |
747 |
+ { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2031, 0xff), /* Olicard 600 */ |
748 |
+ .driver_info = RSVD(4) }, |
749 |
++ { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2033, 0xff), /* BroadMobi BM806U */ |
750 |
++ .driver_info = RSVD(4) }, |
751 |
+ { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x2060, 0xff), /* BroadMobi BM818 */ |
752 |
+ .driver_info = RSVD(4) }, |
753 |
+ { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x4000, 0xff) }, /* OLICARD300 - MT6225 */ |
754 |
+diff --git a/fs/libfs.c b/fs/libfs.c |
755 |
+index c686bd9caac6..3759fbacf522 100644 |
756 |
+--- a/fs/libfs.c |
757 |
++++ b/fs/libfs.c |
758 |
+@@ -891,7 +891,7 @@ int simple_attr_open(struct inode *inode, struct file *file, |
759 |
+ { |
760 |
+ struct simple_attr *attr; |
761 |
+ |
762 |
+- attr = kmalloc(sizeof(*attr), GFP_KERNEL); |
763 |
++ attr = kzalloc(sizeof(*attr), GFP_KERNEL); |
764 |
+ if (!attr) |
765 |
+ return -ENOMEM; |
766 |
+ |
767 |
+@@ -931,9 +931,11 @@ ssize_t simple_attr_read(struct file *file, char __user *buf, |
768 |
+ if (ret) |
769 |
+ return ret; |
770 |
+ |
771 |
+- if (*ppos) { /* continued read */ |
772 |
++ if (*ppos && attr->get_buf[0]) { |
773 |
++ /* continued read */ |
774 |
+ size = strlen(attr->get_buf); |
775 |
+- } else { /* first read */ |
776 |
++ } else { |
777 |
++ /* first read */ |
778 |
+ u64 val; |
779 |
+ ret = attr->get(attr->data, &val); |
780 |
+ if (ret) |
781 |
+diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c |
782 |
+index 1cc945daa9c8..5080469094af 100644 |
783 |
+--- a/kernel/bpf/verifier.c |
784 |
++++ b/kernel/bpf/verifier.c |
785 |
+@@ -1034,17 +1034,6 @@ static void __reg_bound_offset(struct bpf_reg_state *reg) |
786 |
+ reg->umax_value)); |
787 |
+ } |
788 |
+ |
789 |
+-static void __reg_bound_offset32(struct bpf_reg_state *reg) |
790 |
+-{ |
791 |
+- u64 mask = 0xffffFFFF; |
792 |
+- struct tnum range = tnum_range(reg->umin_value & mask, |
793 |
+- reg->umax_value & mask); |
794 |
+- struct tnum lo32 = tnum_cast(reg->var_off, 4); |
795 |
+- struct tnum hi32 = tnum_lshift(tnum_rshift(reg->var_off, 32), 32); |
796 |
+- |
797 |
+- reg->var_off = tnum_or(hi32, tnum_intersect(lo32, range)); |
798 |
+-} |
799 |
+- |
800 |
+ /* Reset the min/max bounds of a register */ |
801 |
+ static void __mark_reg_unbounded(struct bpf_reg_state *reg) |
802 |
+ { |
803 |
+@@ -5717,10 +5706,6 @@ static void reg_set_min_max(struct bpf_reg_state *true_reg, |
804 |
+ /* We might have learned some bits from the bounds. */ |
805 |
+ __reg_bound_offset(false_reg); |
806 |
+ __reg_bound_offset(true_reg); |
807 |
+- if (is_jmp32) { |
808 |
+- __reg_bound_offset32(false_reg); |
809 |
+- __reg_bound_offset32(true_reg); |
810 |
+- } |
811 |
+ /* Intersecting with the old var_off might have improved our bounds |
812 |
+ * slightly. e.g. if umax was 0x7f...f and var_off was (0; 0xf...fc), |
813 |
+ * then new var_off is (0; 0x7f...fc) which improves our umax. |
814 |
+@@ -5830,10 +5815,6 @@ static void reg_set_min_max_inv(struct bpf_reg_state *true_reg, |
815 |
+ /* We might have learned some bits from the bounds. */ |
816 |
+ __reg_bound_offset(false_reg); |
817 |
+ __reg_bound_offset(true_reg); |
818 |
+- if (is_jmp32) { |
819 |
+- __reg_bound_offset32(false_reg); |
820 |
+- __reg_bound_offset32(true_reg); |
821 |
+- } |
822 |
+ /* Intersecting with the old var_off might have improved our bounds |
823 |
+ * slightly. e.g. if umax was 0x7f...f and var_off was (0; 0xf...fc), |
824 |
+ * then new var_off is (0; 0x7f...fc) which improves our umax. |