1 |
commit: cb9441340a64181b506c6d7d2165a65e4bf6b799 |
2 |
Author: Alice Ferrazzi <alicef <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 22 10:07:56 2018 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 21 15:01:16 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=cb944134 |
7 |
|
8 |
linux kernel 4.4.151 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1150_linux-4.4.151.patch | 596 +++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 600 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 4bbc43a..de81070 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -643,6 +643,10 @@ Patch: 1149_linux-4.4.150.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 4.4.150 |
23 |
|
24 |
+Patch: 1150_linux-4.4.151.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 4.4.151 |
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/1150_linux-4.4.151.patch b/1150_linux-4.4.151.patch |
33 |
new file mode 100644 |
34 |
index 0000000..425ec73 |
35 |
--- /dev/null |
36 |
+++ b/1150_linux-4.4.151.patch |
37 |
@@ -0,0 +1,596 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 7789195c6a59..04199cf99dd5 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,6 +1,6 @@ |
43 |
+ VERSION = 4 |
44 |
+ PATCHLEVEL = 4 |
45 |
+-SUBLEVEL = 150 |
46 |
++SUBLEVEL = 151 |
47 |
+ EXTRAVERSION = |
48 |
+ NAME = Blurry Fish Butt |
49 |
+ |
50 |
+diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h |
51 |
+index 4de6c282c02a..68a55273ce0f 100644 |
52 |
+--- a/arch/x86/include/asm/pgtable.h |
53 |
++++ b/arch/x86/include/asm/pgtable.h |
54 |
+@@ -173,6 +173,11 @@ static inline unsigned long pud_pfn(pud_t pud) |
55 |
+ return (pfn & pud_pfn_mask(pud)) >> PAGE_SHIFT; |
56 |
+ } |
57 |
+ |
58 |
++static inline unsigned long pgd_pfn(pgd_t pgd) |
59 |
++{ |
60 |
++ return (pgd_val(pgd) & PTE_PFN_MASK) >> PAGE_SHIFT; |
61 |
++} |
62 |
++ |
63 |
+ #define pte_page(pte) pfn_to_page(pte_pfn(pte)) |
64 |
+ |
65 |
+ static inline int pmd_large(pmd_t pte) |
66 |
+@@ -578,8 +583,7 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd) |
67 |
+ * Currently stuck as a macro due to indirect forward reference to |
68 |
+ * linux/mmzone.h's __section_mem_map_addr() definition: |
69 |
+ */ |
70 |
+-#define pmd_page(pmd) \ |
71 |
+- pfn_to_page((pmd_val(pmd) & pmd_pfn_mask(pmd)) >> PAGE_SHIFT) |
72 |
++#define pmd_page(pmd) pfn_to_page(pmd_pfn(pmd)) |
73 |
+ |
74 |
+ /* |
75 |
+ * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD] |
76 |
+@@ -647,8 +651,7 @@ static inline unsigned long pud_page_vaddr(pud_t pud) |
77 |
+ * Currently stuck as a macro due to indirect forward reference to |
78 |
+ * linux/mmzone.h's __section_mem_map_addr() definition: |
79 |
+ */ |
80 |
+-#define pud_page(pud) \ |
81 |
+- pfn_to_page((pud_val(pud) & pud_pfn_mask(pud)) >> PAGE_SHIFT) |
82 |
++#define pud_page(pud) pfn_to_page(pud_pfn(pud)) |
83 |
+ |
84 |
+ /* Find an entry in the second-level page table.. */ |
85 |
+ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address) |
86 |
+@@ -688,7 +691,7 @@ static inline unsigned long pgd_page_vaddr(pgd_t pgd) |
87 |
+ * Currently stuck as a macro due to indirect forward reference to |
88 |
+ * linux/mmzone.h's __section_mem_map_addr() definition: |
89 |
+ */ |
90 |
+-#define pgd_page(pgd) pfn_to_page(pgd_val(pgd) >> PAGE_SHIFT) |
91 |
++#define pgd_page(pgd) pfn_to_page(pgd_pfn(pgd)) |
92 |
+ |
93 |
+ /* to find an entry in a page-table-directory. */ |
94 |
+ static inline unsigned long pud_index(unsigned long address) |
95 |
+diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c |
96 |
+index e3322adaaae0..4f07029de209 100644 |
97 |
+--- a/drivers/acpi/sleep.c |
98 |
++++ b/drivers/acpi/sleep.c |
99 |
+@@ -124,6 +124,12 @@ void __init acpi_nvs_nosave_s3(void) |
100 |
+ nvs_nosave_s3 = true; |
101 |
+ } |
102 |
+ |
103 |
++static int __init init_nvs_save_s3(const struct dmi_system_id *d) |
104 |
++{ |
105 |
++ nvs_nosave_s3 = false; |
106 |
++ return 0; |
107 |
++} |
108 |
++ |
109 |
+ /* |
110 |
+ * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the |
111 |
+ * user to request that behavior by using the 'acpi_old_suspend_ordering' |
112 |
+@@ -318,6 +324,27 @@ static struct dmi_system_id acpisleep_dmi_table[] __initdata = { |
113 |
+ DMI_MATCH(DMI_PRODUCT_NAME, "K54HR"), |
114 |
+ }, |
115 |
+ }, |
116 |
++ { |
117 |
++ .callback = init_nvs_save_s3, |
118 |
++ .ident = "Asus 1025C", |
119 |
++ .matches = { |
120 |
++ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
121 |
++ DMI_MATCH(DMI_PRODUCT_NAME, "1025C"), |
122 |
++ }, |
123 |
++ }, |
124 |
++ /* |
125 |
++ * https://bugzilla.kernel.org/show_bug.cgi?id=189431 |
126 |
++ * Lenovo G50-45 is a platform later than 2012, but needs nvs memory |
127 |
++ * saving during S3. |
128 |
++ */ |
129 |
++ { |
130 |
++ .callback = init_nvs_save_s3, |
131 |
++ .ident = "Lenovo G50-45", |
132 |
++ .matches = { |
133 |
++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
134 |
++ DMI_MATCH(DMI_PRODUCT_NAME, "80E3"), |
135 |
++ }, |
136 |
++ }, |
137 |
+ {}, |
138 |
+ }; |
139 |
+ |
140 |
+diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c |
141 |
+index e4c43a17b333..8088c34336aa 100644 |
142 |
+--- a/drivers/isdn/i4l/isdn_common.c |
143 |
++++ b/drivers/isdn/i4l/isdn_common.c |
144 |
+@@ -1655,13 +1655,7 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg) |
145 |
+ } else |
146 |
+ return -EINVAL; |
147 |
+ case IIOCDBGVAR: |
148 |
+- if (arg) { |
149 |
+- if (copy_to_user(argp, &dev, sizeof(ulong))) |
150 |
+- return -EFAULT; |
151 |
+- return 0; |
152 |
+- } else |
153 |
+- return -EINVAL; |
154 |
+- break; |
155 |
++ return -EINVAL; |
156 |
+ default: |
157 |
+ if ((cmd & IIOCDRVCTL) == IIOCDRVCTL) |
158 |
+ cmd = ((cmd >> _IOC_NRSHIFT) & _IOC_NRMASK) & ISDN_DRVIOCTL_MASK; |
159 |
+diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c |
160 |
+index 8435c3f204c1..a30d68c4b689 100644 |
161 |
+--- a/drivers/tty/serial/8250/8250_dw.c |
162 |
++++ b/drivers/tty/serial/8250/8250_dw.c |
163 |
+@@ -224,7 +224,7 @@ static void dw8250_set_termios(struct uart_port *p, struct ktermios *termios, |
164 |
+ unsigned int rate; |
165 |
+ int ret; |
166 |
+ |
167 |
+- if (IS_ERR(d->clk) || !old) |
168 |
++ if (IS_ERR(d->clk)) |
169 |
+ goto out; |
170 |
+ |
171 |
+ clk_disable_unprepare(d->clk); |
172 |
+diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
173 |
+index d982c455e18e..2b81939fecd7 100644 |
174 |
+--- a/drivers/usb/serial/option.c |
175 |
++++ b/drivers/usb/serial/option.c |
176 |
+@@ -199,6 +199,8 @@ static void option_instat_callback(struct urb *urb); |
177 |
+ #define DELL_PRODUCT_5800_V2_MINICARD_VZW 0x8196 /* Novatel E362 */ |
178 |
+ #define DELL_PRODUCT_5804_MINICARD_ATT 0x819b /* Novatel E371 */ |
179 |
+ |
180 |
++#define DELL_PRODUCT_5821E 0x81d7 |
181 |
++ |
182 |
+ #define KYOCERA_VENDOR_ID 0x0c88 |
183 |
+ #define KYOCERA_PRODUCT_KPC650 0x17da |
184 |
+ #define KYOCERA_PRODUCT_KPC680 0x180a |
185 |
+@@ -1033,6 +1035,8 @@ static const struct usb_device_id option_ids[] = { |
186 |
+ { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5800_MINICARD_VZW, 0xff, 0xff, 0xff) }, |
187 |
+ { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5800_V2_MINICARD_VZW, 0xff, 0xff, 0xff) }, |
188 |
+ { USB_DEVICE_AND_INTERFACE_INFO(DELL_VENDOR_ID, DELL_PRODUCT_5804_MINICARD_ATT, 0xff, 0xff, 0xff) }, |
189 |
++ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5821E), |
190 |
++ .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, |
191 |
+ { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */ |
192 |
+ { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, |
193 |
+ { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) }, |
194 |
+diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c |
195 |
+index 07d1ecd564f7..8960a46c83bb 100644 |
196 |
+--- a/drivers/usb/serial/sierra.c |
197 |
++++ b/drivers/usb/serial/sierra.c |
198 |
+@@ -790,9 +790,9 @@ static void sierra_close(struct usb_serial_port *port) |
199 |
+ kfree(urb->transfer_buffer); |
200 |
+ usb_free_urb(urb); |
201 |
+ usb_autopm_put_interface_async(serial->interface); |
202 |
+- spin_lock(&portdata->lock); |
203 |
++ spin_lock_irq(&portdata->lock); |
204 |
+ portdata->outstanding_urbs--; |
205 |
+- spin_unlock(&portdata->lock); |
206 |
++ spin_unlock_irq(&portdata->lock); |
207 |
+ } |
208 |
+ |
209 |
+ sierra_stop_rx_urbs(port); |
210 |
+diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h |
211 |
+index e9eb2d6791b3..f7a35fcaaaf6 100644 |
212 |
+--- a/include/net/af_vsock.h |
213 |
++++ b/include/net/af_vsock.h |
214 |
+@@ -62,7 +62,8 @@ struct vsock_sock { |
215 |
+ struct list_head pending_links; |
216 |
+ struct list_head accept_queue; |
217 |
+ bool rejected; |
218 |
+- struct delayed_work dwork; |
219 |
++ struct delayed_work connect_work; |
220 |
++ struct delayed_work pending_work; |
221 |
+ u32 peer_shutdown; |
222 |
+ bool sent_request; |
223 |
+ bool ignore_connecting_rst; |
224 |
+@@ -73,7 +74,6 @@ struct vsock_sock { |
225 |
+ |
226 |
+ s64 vsock_stream_has_data(struct vsock_sock *vsk); |
227 |
+ s64 vsock_stream_has_space(struct vsock_sock *vsk); |
228 |
+-void vsock_pending_work(struct work_struct *work); |
229 |
+ struct sock *__vsock_create(struct net *net, |
230 |
+ struct socket *sock, |
231 |
+ struct sock *parent, |
232 |
+diff --git a/include/net/llc.h b/include/net/llc.h |
233 |
+index e8e61d4fb458..82d989995d18 100644 |
234 |
+--- a/include/net/llc.h |
235 |
++++ b/include/net/llc.h |
236 |
+@@ -116,6 +116,11 @@ static inline void llc_sap_hold(struct llc_sap *sap) |
237 |
+ atomic_inc(&sap->refcnt); |
238 |
+ } |
239 |
+ |
240 |
++static inline bool llc_sap_hold_safe(struct llc_sap *sap) |
241 |
++{ |
242 |
++ return atomic_inc_not_zero(&sap->refcnt); |
243 |
++} |
244 |
++ |
245 |
+ void llc_sap_close(struct llc_sap *sap); |
246 |
+ |
247 |
+ static inline void llc_sap_put(struct llc_sap *sap) |
248 |
+diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c |
249 |
+index f52bcbf2e58c..2209fd2ff2e3 100644 |
250 |
+--- a/net/bluetooth/sco.c |
251 |
++++ b/net/bluetooth/sco.c |
252 |
+@@ -392,7 +392,8 @@ static void sco_sock_cleanup_listen(struct sock *parent) |
253 |
+ */ |
254 |
+ static void sco_sock_kill(struct sock *sk) |
255 |
+ { |
256 |
+- if (!sock_flag(sk, SOCK_ZAPPED) || sk->sk_socket) |
257 |
++ if (!sock_flag(sk, SOCK_ZAPPED) || sk->sk_socket || |
258 |
++ sock_flag(sk, SOCK_DEAD)) |
259 |
+ return; |
260 |
+ |
261 |
+ BT_DBG("sk %p state %d", sk, sk->sk_state); |
262 |
+diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c |
263 |
+index 86a2ed0fb219..161dfcf86126 100644 |
264 |
+--- a/net/dccp/ccids/ccid2.c |
265 |
++++ b/net/dccp/ccids/ccid2.c |
266 |
+@@ -228,14 +228,16 @@ static void ccid2_cwnd_restart(struct sock *sk, const u32 now) |
267 |
+ struct ccid2_hc_tx_sock *hc = ccid2_hc_tx_sk(sk); |
268 |
+ u32 cwnd = hc->tx_cwnd, restart_cwnd, |
269 |
+ iwnd = rfc3390_bytes_to_packets(dccp_sk(sk)->dccps_mss_cache); |
270 |
++ s32 delta = now - hc->tx_lsndtime; |
271 |
+ |
272 |
+ hc->tx_ssthresh = max(hc->tx_ssthresh, (cwnd >> 1) + (cwnd >> 2)); |
273 |
+ |
274 |
+ /* don't reduce cwnd below the initial window (IW) */ |
275 |
+ restart_cwnd = min(cwnd, iwnd); |
276 |
+- cwnd >>= (now - hc->tx_lsndtime) / hc->tx_rto; |
277 |
+- hc->tx_cwnd = max(cwnd, restart_cwnd); |
278 |
+ |
279 |
++ while ((delta -= hc->tx_rto) >= 0 && cwnd > restart_cwnd) |
280 |
++ cwnd >>= 1; |
281 |
++ hc->tx_cwnd = max(cwnd, restart_cwnd); |
282 |
+ hc->tx_cwnd_stamp = now; |
283 |
+ hc->tx_cwnd_used = 0; |
284 |
+ |
285 |
+diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c |
286 |
+index 92df832a1896..591d18785285 100644 |
287 |
+--- a/net/l2tp/l2tp_core.c |
288 |
++++ b/net/l2tp/l2tp_core.c |
289 |
+@@ -1145,7 +1145,7 @@ int l2tp_xmit_skb(struct l2tp_session *session, struct sk_buff *skb, int hdr_len |
290 |
+ |
291 |
+ /* Get routing info from the tunnel socket */ |
292 |
+ skb_dst_drop(skb); |
293 |
+- skb_dst_set(skb, dst_clone(__sk_dst_check(sk, 0))); |
294 |
++ skb_dst_set(skb, sk_dst_check(sk, 0)); |
295 |
+ |
296 |
+ inet = inet_sk(sk); |
297 |
+ fl = &inet->cork.fl; |
298 |
+diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c |
299 |
+index 842851cef698..e896a2c53b12 100644 |
300 |
+--- a/net/llc/llc_core.c |
301 |
++++ b/net/llc/llc_core.c |
302 |
+@@ -73,8 +73,8 @@ struct llc_sap *llc_sap_find(unsigned char sap_value) |
303 |
+ |
304 |
+ rcu_read_lock_bh(); |
305 |
+ sap = __llc_sap_find(sap_value); |
306 |
+- if (sap) |
307 |
+- llc_sap_hold(sap); |
308 |
++ if (!sap || !llc_sap_hold_safe(sap)) |
309 |
++ sap = NULL; |
310 |
+ rcu_read_unlock_bh(); |
311 |
+ return sap; |
312 |
+ } |
313 |
+diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c |
314 |
+index 403746b20263..040d853f48b9 100644 |
315 |
+--- a/net/sched/cls_tcindex.c |
316 |
++++ b/net/sched/cls_tcindex.c |
317 |
+@@ -382,22 +382,20 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, |
318 |
+ tcf_bind_filter(tp, &cr.res, base); |
319 |
+ } |
320 |
+ |
321 |
+- if (old_r) |
322 |
+- tcf_exts_change(tp, &r->exts, &e); |
323 |
+- else |
324 |
+- tcf_exts_change(tp, &cr.exts, &e); |
325 |
+- |
326 |
+ if (old_r && old_r != r) |
327 |
+ tcindex_filter_result_init(old_r); |
328 |
+ |
329 |
+ oldp = p; |
330 |
+ r->res = cr.res; |
331 |
++ tcf_exts_change(tp, &r->exts, &e); |
332 |
++ |
333 |
+ rcu_assign_pointer(tp->root, cp); |
334 |
+ |
335 |
+ if (r == &new_filter_result) { |
336 |
+ struct tcindex_filter *nfp; |
337 |
+ struct tcindex_filter __rcu **fp; |
338 |
+ |
339 |
++ f->result.res = r->res; |
340 |
+ tcf_exts_change(tp, &f->result.exts, &r->exts); |
341 |
+ |
342 |
+ fp = cp->h + (handle % cp->hash); |
343 |
+diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c |
344 |
+index 60324f7c72bd..7f1d166ce612 100644 |
345 |
+--- a/net/vmw_vsock/af_vsock.c |
346 |
++++ b/net/vmw_vsock/af_vsock.c |
347 |
+@@ -430,14 +430,14 @@ static int vsock_send_shutdown(struct sock *sk, int mode) |
348 |
+ return transport->shutdown(vsock_sk(sk), mode); |
349 |
+ } |
350 |
+ |
351 |
+-void vsock_pending_work(struct work_struct *work) |
352 |
++static void vsock_pending_work(struct work_struct *work) |
353 |
+ { |
354 |
+ struct sock *sk; |
355 |
+ struct sock *listener; |
356 |
+ struct vsock_sock *vsk; |
357 |
+ bool cleanup; |
358 |
+ |
359 |
+- vsk = container_of(work, struct vsock_sock, dwork.work); |
360 |
++ vsk = container_of(work, struct vsock_sock, pending_work.work); |
361 |
+ sk = sk_vsock(vsk); |
362 |
+ listener = vsk->listener; |
363 |
+ cleanup = true; |
364 |
+@@ -477,7 +477,6 @@ out: |
365 |
+ sock_put(sk); |
366 |
+ sock_put(listener); |
367 |
+ } |
368 |
+-EXPORT_SYMBOL_GPL(vsock_pending_work); |
369 |
+ |
370 |
+ /**** SOCKET OPERATIONS ****/ |
371 |
+ |
372 |
+@@ -576,6 +575,8 @@ static int __vsock_bind(struct sock *sk, struct sockaddr_vm *addr) |
373 |
+ return retval; |
374 |
+ } |
375 |
+ |
376 |
++static void vsock_connect_timeout(struct work_struct *work); |
377 |
++ |
378 |
+ struct sock *__vsock_create(struct net *net, |
379 |
+ struct socket *sock, |
380 |
+ struct sock *parent, |
381 |
+@@ -618,6 +619,8 @@ struct sock *__vsock_create(struct net *net, |
382 |
+ vsk->sent_request = false; |
383 |
+ vsk->ignore_connecting_rst = false; |
384 |
+ vsk->peer_shutdown = 0; |
385 |
++ INIT_DELAYED_WORK(&vsk->connect_work, vsock_connect_timeout); |
386 |
++ INIT_DELAYED_WORK(&vsk->pending_work, vsock_pending_work); |
387 |
+ |
388 |
+ psk = parent ? vsock_sk(parent) : NULL; |
389 |
+ if (parent) { |
390 |
+@@ -1094,7 +1097,7 @@ static void vsock_connect_timeout(struct work_struct *work) |
391 |
+ struct sock *sk; |
392 |
+ struct vsock_sock *vsk; |
393 |
+ |
394 |
+- vsk = container_of(work, struct vsock_sock, dwork.work); |
395 |
++ vsk = container_of(work, struct vsock_sock, connect_work.work); |
396 |
+ sk = sk_vsock(vsk); |
397 |
+ |
398 |
+ lock_sock(sk); |
399 |
+@@ -1195,9 +1198,7 @@ static int vsock_stream_connect(struct socket *sock, struct sockaddr *addr, |
400 |
+ * timeout fires. |
401 |
+ */ |
402 |
+ sock_hold(sk); |
403 |
+- INIT_DELAYED_WORK(&vsk->dwork, |
404 |
+- vsock_connect_timeout); |
405 |
+- schedule_delayed_work(&vsk->dwork, timeout); |
406 |
++ schedule_delayed_work(&vsk->connect_work, timeout); |
407 |
+ |
408 |
+ /* Skip ahead to preserve error code set above. */ |
409 |
+ goto out_wait; |
410 |
+diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c |
411 |
+index 662bdd20a748..589c8b9908a5 100644 |
412 |
+--- a/net/vmw_vsock/vmci_transport.c |
413 |
++++ b/net/vmw_vsock/vmci_transport.c |
414 |
+@@ -1099,8 +1099,7 @@ static int vmci_transport_recv_listen(struct sock *sk, |
415 |
+ vpending->listener = sk; |
416 |
+ sock_hold(sk); |
417 |
+ sock_hold(pending); |
418 |
+- INIT_DELAYED_WORK(&vpending->dwork, vsock_pending_work); |
419 |
+- schedule_delayed_work(&vpending->dwork, HZ); |
420 |
++ schedule_delayed_work(&vpending->pending_work, HZ); |
421 |
+ |
422 |
+ out: |
423 |
+ return err; |
424 |
+diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c |
425 |
+index f05cb6a8cbe0..78ffe445d775 100644 |
426 |
+--- a/sound/core/memalloc.c |
427 |
++++ b/sound/core/memalloc.c |
428 |
+@@ -239,16 +239,12 @@ int snd_dma_alloc_pages_fallback(int type, struct device *device, size_t size, |
429 |
+ int err; |
430 |
+ |
431 |
+ while ((err = snd_dma_alloc_pages(type, device, size, dmab)) < 0) { |
432 |
+- size_t aligned_size; |
433 |
+ if (err != -ENOMEM) |
434 |
+ return err; |
435 |
+ if (size <= PAGE_SIZE) |
436 |
+ return -ENOMEM; |
437 |
+- aligned_size = PAGE_SIZE << get_order(size); |
438 |
+- if (size != aligned_size) |
439 |
+- size = aligned_size; |
440 |
+- else |
441 |
+- size >>= 1; |
442 |
++ size >>= 1; |
443 |
++ size = PAGE_SIZE << get_order(size); |
444 |
+ } |
445 |
+ if (! dmab->area) |
446 |
+ return -ENOMEM; |
447 |
+diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c |
448 |
+index ef494ffc1369..975a7c939d2f 100644 |
449 |
+--- a/sound/core/seq/seq_virmidi.c |
450 |
++++ b/sound/core/seq/seq_virmidi.c |
451 |
+@@ -163,6 +163,7 @@ static void snd_virmidi_output_trigger(struct snd_rawmidi_substream *substream, |
452 |
+ int count, res; |
453 |
+ unsigned char buf[32], *pbuf; |
454 |
+ unsigned long flags; |
455 |
++ bool check_resched = !in_atomic(); |
456 |
+ |
457 |
+ if (up) { |
458 |
+ vmidi->trigger = 1; |
459 |
+@@ -200,6 +201,15 @@ static void snd_virmidi_output_trigger(struct snd_rawmidi_substream *substream, |
460 |
+ vmidi->event.type = SNDRV_SEQ_EVENT_NONE; |
461 |
+ } |
462 |
+ } |
463 |
++ if (!check_resched) |
464 |
++ continue; |
465 |
++ /* do temporary unlock & cond_resched() for avoiding |
466 |
++ * CPU soft lockup, which may happen via a write from |
467 |
++ * a huge rawmidi buffer |
468 |
++ */ |
469 |
++ spin_unlock_irqrestore(&substream->runtime->lock, flags); |
470 |
++ cond_resched(); |
471 |
++ spin_lock_irqsave(&substream->runtime->lock, flags); |
472 |
+ } |
473 |
+ out: |
474 |
+ spin_unlock_irqrestore(&substream->runtime->lock, flags); |
475 |
+diff --git a/sound/pci/cs5535audio/cs5535audio.h b/sound/pci/cs5535audio/cs5535audio.h |
476 |
+index 0579daa62215..425d1b664029 100644 |
477 |
+--- a/sound/pci/cs5535audio/cs5535audio.h |
478 |
++++ b/sound/pci/cs5535audio/cs5535audio.h |
479 |
+@@ -66,9 +66,9 @@ struct cs5535audio_dma_ops { |
480 |
+ }; |
481 |
+ |
482 |
+ struct cs5535audio_dma_desc { |
483 |
+- u32 addr; |
484 |
+- u16 size; |
485 |
+- u16 ctlreserved; |
486 |
++ __le32 addr; |
487 |
++ __le16 size; |
488 |
++ __le16 ctlreserved; |
489 |
+ }; |
490 |
+ |
491 |
+ struct cs5535audio_dma { |
492 |
+diff --git a/sound/pci/cs5535audio/cs5535audio_pcm.c b/sound/pci/cs5535audio/cs5535audio_pcm.c |
493 |
+index 9c2dc911d8d7..709f1c584d3e 100644 |
494 |
+--- a/sound/pci/cs5535audio/cs5535audio_pcm.c |
495 |
++++ b/sound/pci/cs5535audio/cs5535audio_pcm.c |
496 |
+@@ -158,8 +158,8 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au, |
497 |
+ lastdesc->addr = cpu_to_le32((u32) dma->desc_buf.addr); |
498 |
+ lastdesc->size = 0; |
499 |
+ lastdesc->ctlreserved = cpu_to_le16(PRD_JMP); |
500 |
+- jmpprd_addr = cpu_to_le32(lastdesc->addr + |
501 |
+- (sizeof(struct cs5535audio_dma_desc)*periods)); |
502 |
++ jmpprd_addr = (u32)dma->desc_buf.addr + |
503 |
++ sizeof(struct cs5535audio_dma_desc) * periods; |
504 |
+ |
505 |
+ dma->substream = substream; |
506 |
+ dma->period_bytes = period_bytes; |
507 |
+diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c |
508 |
+index d0b55c866370..cabccb10210e 100644 |
509 |
+--- a/sound/pci/hda/hda_intel.c |
510 |
++++ b/sound/pci/hda/hda_intel.c |
511 |
+@@ -2069,7 +2069,7 @@ out_free: |
512 |
+ */ |
513 |
+ static struct snd_pci_quirk power_save_blacklist[] = { |
514 |
+ /* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */ |
515 |
+- SND_PCI_QUIRK(0x1849, 0x0c0c, "Asrock B85M-ITX", 0), |
516 |
++ SND_PCI_QUIRK(0x1849, 0xc892, "Asrock B85M-ITX", 0), |
517 |
+ /* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */ |
518 |
+ SND_PCI_QUIRK(0x1043, 0x8733, "Asus Prime X370-Pro", 0), |
519 |
+ /* https://bugzilla.redhat.com/show_bug.cgi?id=1572975 */ |
520 |
+diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c |
521 |
+index cb19af145f46..a1a3ce8c3f56 100644 |
522 |
+--- a/sound/pci/hda/patch_conexant.c |
523 |
++++ b/sound/pci/hda/patch_conexant.c |
524 |
+@@ -205,6 +205,7 @@ static void cx_auto_reboot_notify(struct hda_codec *codec) |
525 |
+ struct conexant_spec *spec = codec->spec; |
526 |
+ |
527 |
+ switch (codec->core.vendor_id) { |
528 |
++ case 0x14f12008: /* CX8200 */ |
529 |
+ case 0x14f150f2: /* CX20722 */ |
530 |
+ case 0x14f150f4: /* CX20724 */ |
531 |
+ break; |
532 |
+@@ -212,13 +213,14 @@ static void cx_auto_reboot_notify(struct hda_codec *codec) |
533 |
+ return; |
534 |
+ } |
535 |
+ |
536 |
+- /* Turn the CX20722 codec into D3 to avoid spurious noises |
537 |
++ /* Turn the problematic codec into D3 to avoid spurious noises |
538 |
+ from the internal speaker during (and after) reboot */ |
539 |
+ cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false); |
540 |
+ |
541 |
+ snd_hda_codec_set_power_to_all(codec, codec->core.afg, AC_PWRST_D3); |
542 |
+ snd_hda_codec_write(codec, codec->core.afg, 0, |
543 |
+ AC_VERB_SET_POWER_STATE, AC_PWRST_D3); |
544 |
++ msleep(10); |
545 |
+ } |
546 |
+ |
547 |
+ static void cx_auto_free(struct hda_codec *codec) |
548 |
+diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c |
549 |
+index 8e457ea27f89..1997bb048d8b 100644 |
550 |
+--- a/sound/pci/vx222/vx222_ops.c |
551 |
++++ b/sound/pci/vx222/vx222_ops.c |
552 |
+@@ -275,7 +275,7 @@ static void vx2_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
553 |
+ length >>= 2; /* in 32bit words */ |
554 |
+ /* Transfer using pseudo-dma. */ |
555 |
+ for (; length > 0; length--) { |
556 |
+- outl(cpu_to_le32(*addr), port); |
557 |
++ outl(*addr, port); |
558 |
+ addr++; |
559 |
+ } |
560 |
+ addr = (u32 *)runtime->dma_area; |
561 |
+@@ -285,7 +285,7 @@ static void vx2_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
562 |
+ count >>= 2; /* in 32bit words */ |
563 |
+ /* Transfer using pseudo-dma. */ |
564 |
+ for (; count > 0; count--) { |
565 |
+- outl(cpu_to_le32(*addr), port); |
566 |
++ outl(*addr, port); |
567 |
+ addr++; |
568 |
+ } |
569 |
+ |
570 |
+@@ -313,7 +313,7 @@ static void vx2_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
571 |
+ length >>= 2; /* in 32bit words */ |
572 |
+ /* Transfer using pseudo-dma. */ |
573 |
+ for (; length > 0; length--) |
574 |
+- *addr++ = le32_to_cpu(inl(port)); |
575 |
++ *addr++ = inl(port); |
576 |
+ addr = (u32 *)runtime->dma_area; |
577 |
+ pipe->hw_ptr = 0; |
578 |
+ } |
579 |
+@@ -321,7 +321,7 @@ static void vx2_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
580 |
+ count >>= 2; /* in 32bit words */ |
581 |
+ /* Transfer using pseudo-dma. */ |
582 |
+ for (; count > 0; count--) |
583 |
+- *addr++ = le32_to_cpu(inl(port)); |
584 |
++ *addr++ = inl(port); |
585 |
+ |
586 |
+ vx2_release_pseudo_dma(chip); |
587 |
+ } |
588 |
+diff --git a/sound/pcmcia/vx/vxp_ops.c b/sound/pcmcia/vx/vxp_ops.c |
589 |
+index 56aa1ba73ccc..49a883341eff 100644 |
590 |
+--- a/sound/pcmcia/vx/vxp_ops.c |
591 |
++++ b/sound/pcmcia/vx/vxp_ops.c |
592 |
+@@ -375,7 +375,7 @@ static void vxp_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
593 |
+ length >>= 1; /* in 16bit words */ |
594 |
+ /* Transfer using pseudo-dma. */ |
595 |
+ for (; length > 0; length--) { |
596 |
+- outw(cpu_to_le16(*addr), port); |
597 |
++ outw(*addr, port); |
598 |
+ addr++; |
599 |
+ } |
600 |
+ addr = (unsigned short *)runtime->dma_area; |
601 |
+@@ -385,7 +385,7 @@ static void vxp_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
602 |
+ count >>= 1; /* in 16bit words */ |
603 |
+ /* Transfer using pseudo-dma. */ |
604 |
+ for (; count > 0; count--) { |
605 |
+- outw(cpu_to_le16(*addr), port); |
606 |
++ outw(*addr, port); |
607 |
+ addr++; |
608 |
+ } |
609 |
+ vx_release_pseudo_dma(chip); |
610 |
+@@ -417,7 +417,7 @@ static void vxp_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
611 |
+ length >>= 1; /* in 16bit words */ |
612 |
+ /* Transfer using pseudo-dma. */ |
613 |
+ for (; length > 0; length--) |
614 |
+- *addr++ = le16_to_cpu(inw(port)); |
615 |
++ *addr++ = inw(port); |
616 |
+ addr = (unsigned short *)runtime->dma_area; |
617 |
+ pipe->hw_ptr = 0; |
618 |
+ } |
619 |
+@@ -425,12 +425,12 @@ static void vxp_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime, |
620 |
+ count >>= 1; /* in 16bit words */ |
621 |
+ /* Transfer using pseudo-dma. */ |
622 |
+ for (; count > 1; count--) |
623 |
+- *addr++ = le16_to_cpu(inw(port)); |
624 |
++ *addr++ = inw(port); |
625 |
+ /* Disable DMA */ |
626 |
+ pchip->regDIALOG &= ~VXP_DLG_DMAREAD_SEL_MASK; |
627 |
+ vx_outb(chip, DIALOG, pchip->regDIALOG); |
628 |
+ /* Read the last word (16 bits) */ |
629 |
+- *addr = le16_to_cpu(inw(port)); |
630 |
++ *addr = inw(port); |
631 |
+ /* Disable 16-bit accesses */ |
632 |
+ pchip->regDIALOG &= ~VXP_DLG_DMA16_SEL_MASK; |
633 |
+ vx_outb(chip, DIALOG, pchip->regDIALOG); |