Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.9 commit in: /
Date: Wed, 05 Jan 2022 12:57:12
Message-Id: 1641387416.4fea8ebb536e04bd7a94d05fc3cdf2ef95d9b32e.mpagano@gentoo
1 commit: 4fea8ebb536e04bd7a94d05fc3cdf2ef95d9b32e
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 5 12:56:56 2022 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 5 12:56:56 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=4fea8ebb
7
8 Linux patch 4.9.296
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 +
13 1295_linux-4.9.296.patch | 303 +++++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 307 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index e5a21f07..89c7405b 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -1223,6 +1223,10 @@ Patch: 1294_linux-4.9.295.patch
21 From: http://www.kernel.org
22 Desc: Linux 4.9.295
23
24 +Patch: 1295_linux-4.9.296.patch
25 +From: http://www.kernel.org
26 +Desc: Linux 4.9.296
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/1295_linux-4.9.296.patch b/1295_linux-4.9.296.patch
33 new file mode 100644
34 index 00000000..3813e79b
35 --- /dev/null
36 +++ b/1295_linux-4.9.296.patch
37 @@ -0,0 +1,303 @@
38 +diff --git a/Makefile b/Makefile
39 +index b5afdb8a75219..1ec880bcdb2d6 100644
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -1,6 +1,6 @@
43 + VERSION = 4
44 + PATCHLEVEL = 9
45 +-SUBLEVEL = 295
46 ++SUBLEVEL = 296
47 + EXTRAVERSION =
48 + NAME = Roaring Lionus
49 +
50 +diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
51 +index 2d2422705ccf7..da9813f09d7d7 100644
52 +--- a/drivers/hid/Kconfig
53 ++++ b/drivers/hid/Kconfig
54 +@@ -136,6 +136,7 @@ config HID_APPLEIR
55 +
56 + config HID_ASUS
57 + tristate "Asus"
58 ++ depends on USB_HID
59 + depends on I2C_HID
60 + ---help---
61 + Support for Asus notebook built-in keyboard via i2c.
62 +diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c
63 +index f4445a4e8d6a5..cfa1be4ad8689 100644
64 +--- a/drivers/input/joystick/spaceball.c
65 ++++ b/drivers/input/joystick/spaceball.c
66 +@@ -35,6 +35,7 @@
67 + #include <linux/module.h>
68 + #include <linux/input.h>
69 + #include <linux/serio.h>
70 ++#include <asm/unaligned.h>
71 +
72 + #define DRIVER_DESC "SpaceTec SpaceBall 2003/3003/4000 FLX driver"
73 +
74 +@@ -91,9 +92,15 @@ static void spaceball_process_packet(struct spaceball* spaceball)
75 +
76 + case 'D': /* Ball data */
77 + if (spaceball->idx != 15) return;
78 +- for (i = 0; i < 6; i++)
79 ++ /*
80 ++ * Skip first three bytes; read six axes worth of data.
81 ++ * Axis values are signed 16-bit big-endian.
82 ++ */
83 ++ data += 3;
84 ++ for (i = 0; i < ARRAY_SIZE(spaceball_axes); i++) {
85 + input_report_abs(dev, spaceball_axes[i],
86 +- (__s16)((data[2 * i + 3] << 8) | data[2 * i + 2]));
87 ++ (__s16)get_unaligned_be16(&data[i * 2]));
88 ++ }
89 + break;
90 +
91 + case 'K': /* Button data */
92 +diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
93 +index ef234c9b2f2f5..11773838a34d4 100644
94 +--- a/drivers/input/mouse/appletouch.c
95 ++++ b/drivers/input/mouse/appletouch.c
96 +@@ -929,6 +929,8 @@ static int atp_probe(struct usb_interface *iface,
97 + set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit);
98 + set_bit(BTN_LEFT, input_dev->keybit);
99 +
100 ++ INIT_WORK(&dev->work, atp_reinit);
101 ++
102 + error = input_register_device(dev->input);
103 + if (error)
104 + goto err_free_buffer;
105 +@@ -936,8 +938,6 @@ static int atp_probe(struct usb_interface *iface,
106 + /* save our data pointer in this interface device */
107 + usb_set_intfdata(iface, dev);
108 +
109 +- INIT_WORK(&dev->work, atp_reinit);
110 +-
111 + return 0;
112 +
113 + err_free_buffer:
114 +diff --git a/drivers/net/ethernet/freescale/fman/fman_port.c b/drivers/net/ethernet/freescale/fman/fman_port.c
115 +index 4986f6ba278a3..45ac5cf717ea8 100644
116 +--- a/drivers/net/ethernet/freescale/fman/fman_port.c
117 ++++ b/drivers/net/ethernet/freescale/fman/fman_port.c
118 +@@ -1658,7 +1658,7 @@ static int fman_port_probe(struct platform_device *of_dev)
119 + fman = dev_get_drvdata(&fm_pdev->dev);
120 + if (!fman) {
121 + err = -EINVAL;
122 +- goto return_err;
123 ++ goto put_device;
124 + }
125 +
126 + err = of_property_read_u32(port_node, "cell-index", &val);
127 +@@ -1666,7 +1666,7 @@ static int fman_port_probe(struct platform_device *of_dev)
128 + dev_err(port->dev, "%s: reading cell-index for %s failed\n",
129 + __func__, port_node->full_name);
130 + err = -EINVAL;
131 +- goto return_err;
132 ++ goto put_device;
133 + }
134 + port_id = (u8)val;
135 + port->dts_params.id = port_id;
136 +@@ -1700,7 +1700,7 @@ static int fman_port_probe(struct platform_device *of_dev)
137 + } else {
138 + dev_err(port->dev, "%s: Illegal port type\n", __func__);
139 + err = -EINVAL;
140 +- goto return_err;
141 ++ goto put_device;
142 + }
143 +
144 + port->dts_params.type = port_type;
145 +@@ -1714,7 +1714,7 @@ static int fman_port_probe(struct platform_device *of_dev)
146 + dev_err(port->dev, "%s: incorrect qman-channel-id\n",
147 + __func__);
148 + err = -EINVAL;
149 +- goto return_err;
150 ++ goto put_device;
151 + }
152 + port->dts_params.qman_channel_id = qman_channel_id;
153 + }
154 +@@ -1724,7 +1724,7 @@ static int fman_port_probe(struct platform_device *of_dev)
155 + dev_err(port->dev, "%s: of_address_to_resource() failed\n",
156 + __func__);
157 + err = -ENOMEM;
158 +- goto return_err;
159 ++ goto put_device;
160 + }
161 +
162 + port->dts_params.fman = fman;
163 +@@ -1749,6 +1749,8 @@ static int fman_port_probe(struct platform_device *of_dev)
164 +
165 + return 0;
166 +
167 ++put_device:
168 ++ put_device(&fm_pdev->dev);
169 + return_err:
170 + of_node_put(port_node);
171 + free_port:
172 +diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
173 +index a66be137324c0..76f5703bc4f65 100644
174 +--- a/drivers/platform/x86/apple-gmux.c
175 ++++ b/drivers/platform/x86/apple-gmux.c
176 +@@ -628,7 +628,7 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
177 + }
178 +
179 + gmux_data->iostart = res->start;
180 +- gmux_data->iolen = res->end - res->start;
181 ++ gmux_data->iolen = resource_size(res);
182 +
183 + if (gmux_data->iolen < GMUX_MIN_IO_LEN) {
184 + pr_err("gmux I/O region too small (%lu < %u)\n",
185 +diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
186 +index 4d2172c115c6e..90057c31d01c6 100644
187 +--- a/drivers/scsi/vmw_pvscsi.c
188 ++++ b/drivers/scsi/vmw_pvscsi.c
189 +@@ -581,9 +581,12 @@ static void pvscsi_complete_request(struct pvscsi_adapter *adapter,
190 + * Commands like INQUIRY may transfer less data than
191 + * requested by the initiator via bufflen. Set residual
192 + * count to make upper layer aware of the actual amount
193 +- * of data returned.
194 ++ * of data returned. There are cases when controller
195 ++ * returns zero dataLen with non zero data - do not set
196 ++ * residual count in that case.
197 + */
198 +- scsi_set_resid(cmd, scsi_bufflen(cmd) - e->dataLen);
199 ++ if (e->dataLen && (e->dataLen < scsi_bufflen(cmd)))
200 ++ scsi_set_resid(cmd, scsi_bufflen(cmd) - e->dataLen);
201 + cmd->result = (DID_OK << 16);
202 + break;
203 +
204 +diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
205 +index bcb2daf81b05d..0336392686935 100644
206 +--- a/drivers/usb/gadget/function/f_fs.c
207 ++++ b/drivers/usb/gadget/function/f_fs.c
208 +@@ -1667,11 +1667,15 @@ static void ffs_data_clear(struct ffs_data *ffs)
209 +
210 + BUG_ON(ffs->gadget);
211 +
212 +- if (ffs->epfiles)
213 ++ if (ffs->epfiles) {
214 + ffs_epfiles_destroy(ffs->epfiles, ffs->eps_count);
215 ++ ffs->epfiles = NULL;
216 ++ }
217 +
218 +- if (ffs->ffs_eventfd)
219 ++ if (ffs->ffs_eventfd) {
220 + eventfd_ctx_put(ffs->ffs_eventfd);
221 ++ ffs->ffs_eventfd = NULL;
222 ++ }
223 +
224 + kfree(ffs->raw_descs_data);
225 + kfree(ffs->raw_strings);
226 +@@ -1684,7 +1688,6 @@ static void ffs_data_reset(struct ffs_data *ffs)
227 +
228 + ffs_data_clear(ffs);
229 +
230 +- ffs->epfiles = NULL;
231 + ffs->raw_descs_data = NULL;
232 + ffs->raw_descs = NULL;
233 + ffs->raw_strings = NULL;
234 +diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
235 +index ae67f6383ca32..30c8eeed95074 100644
236 +--- a/drivers/usb/host/xhci-pci.c
237 ++++ b/drivers/usb/host/xhci-pci.c
238 +@@ -92,7 +92,6 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
239 + /* Look for vendor-specific quirks */
240 + if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC &&
241 + (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK ||
242 +- pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1100 ||
243 + pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1400)) {
244 + if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK &&
245 + pdev->revision == 0x0) {
246 +@@ -127,6 +126,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
247 + pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1009)
248 + xhci->quirks |= XHCI_BROKEN_STREAMS;
249 +
250 ++ if (pdev->vendor == PCI_VENDOR_ID_FRESCO_LOGIC &&
251 ++ pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_FL1100)
252 ++ xhci->quirks |= XHCI_TRUST_TX_LENGTH;
253 ++
254 + if (pdev->vendor == PCI_VENDOR_ID_NEC)
255 + xhci->quirks |= XHCI_NEC_HOST;
256 +
257 +diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h
258 +index 399f39ff8048d..1b6d54a328bad 100644
259 +--- a/include/uapi/linux/nfc.h
260 ++++ b/include/uapi/linux/nfc.h
261 +@@ -261,7 +261,7 @@ enum nfc_sdp_attr {
262 + #define NFC_SE_ENABLED 0x1
263 +
264 + struct sockaddr_nfc {
265 +- sa_family_t sa_family;
266 ++ __kernel_sa_family_t sa_family;
267 + __u32 dev_idx;
268 + __u32 target_idx;
269 + __u32 nfc_protocol;
270 +@@ -269,14 +269,14 @@ struct sockaddr_nfc {
271 +
272 + #define NFC_LLCP_MAX_SERVICE_NAME 63
273 + struct sockaddr_nfc_llcp {
274 +- sa_family_t sa_family;
275 ++ __kernel_sa_family_t sa_family;
276 + __u32 dev_idx;
277 + __u32 target_idx;
278 + __u32 nfc_protocol;
279 + __u8 dsap; /* Destination SAP, if known */
280 + __u8 ssap; /* Source SAP to be bound to */
281 + char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */;
282 +- size_t service_name_len;
283 ++ __kernel_size_t service_name_len;
284 + };
285 +
286 + /* NFC socket protocols */
287 +diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
288 +index 689246d079ad4..a8563745980b4 100644
289 +--- a/net/ipv4/af_inet.c
290 ++++ b/net/ipv4/af_inet.c
291 +@@ -1833,6 +1833,10 @@ static int __init inet_init(void)
292 +
293 + tcp_v4_init();
294 +
295 ++ /* Initialise per-cpu ipv4 mibs */
296 ++ if (init_ipv4_mibs())
297 ++ panic("%s: Cannot init ipv4 mibs\n", __func__);
298 ++
299 + /* Setup TCP slab cache for open requests. */
300 + tcp_init();
301 +
302 +@@ -1861,12 +1865,6 @@ static int __init inet_init(void)
303 +
304 + if (init_inet_pernet_ops())
305 + pr_crit("%s: Cannot init ipv4 inet pernet ops\n", __func__);
306 +- /*
307 +- * Initialise per-cpu ipv4 mibs
308 +- */
309 +-
310 +- if (init_ipv4_mibs())
311 +- pr_crit("%s: Cannot init ipv4 mibs\n", __func__);
312 +
313 + ipv4_proc_init();
314 +
315 +diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
316 +index 21da2831e05b4..796174fd90322 100755
317 +--- a/scripts/recordmcount.pl
318 ++++ b/scripts/recordmcount.pl
319 +@@ -250,7 +250,7 @@ if ($arch eq "x86_64") {
320 +
321 + } elsif ($arch eq "s390" && $bits == 64) {
322 + if ($cc =~ /-DCC_USING_HOTPATCH/) {
323 +- $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*c0 04 00 00 00 00\\s*(bcrl\\s*0,|jgnop\\s*)[0-9a-f]+ <([^\+]*)>\$";
324 ++ $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*c0 04 00 00 00 00\\s*(brcl\\s*0,|jgnop\\s*)[0-9a-f]+ <([^\+]*)>\$";
325 + $mcount_adjust = 0;
326 + } else {
327 + $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_(PC|PLT)32DBL\\s+_mcount\\+0x2\$";
328 +diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
329 +index 607c7fc4f24d3..eb9e2b4e81d92 100644
330 +--- a/security/selinux/hooks.c
331 ++++ b/security/selinux/hooks.c
332 +@@ -5194,7 +5194,7 @@ static unsigned int selinux_ip_postroute_compat(struct sk_buff *skb,
333 + struct common_audit_data ad;
334 + struct lsm_network_audit net = {0,};
335 + char *addrp;
336 +- u8 proto;
337 ++ u8 proto = 0;
338 +
339 + if (sk == NULL)
340 + return NF_ACCEPT;