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