1 |
commit: 5ea815bec95ab0ee62acf3f6393d811ba8209eba |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 26 12:05:18 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 26 12:05:18 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=5ea815be |
7 |
|
8 |
Linux patch 4.19.192 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1191_linux-4.19.192.patch | 1246 +++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 1250 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 303595a..a935472 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -803,6 +803,10 @@ Patch: 1190_linux-4.19.191.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 4.19.191 |
23 |
|
24 |
+Patch: 1191_linux-4.19.192.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 4.19.192 |
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/1191_linux-4.19.192.patch b/1191_linux-4.19.192.patch |
33 |
new file mode 100644 |
34 |
index 0000000..07efafd |
35 |
--- /dev/null |
36 |
+++ b/1191_linux-4.19.192.patch |
37 |
@@ -0,0 +1,1246 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 586a2d128ffb3..51ee6da4c1ab5 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 4 |
45 |
+ PATCHLEVEL = 19 |
46 |
+-SUBLEVEL = 191 |
47 |
++SUBLEVEL = 192 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = "People's Front" |
50 |
+ |
51 |
+diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c |
52 |
+index 9d28ab14d139c..f3a7375ac3cd9 100644 |
53 |
+--- a/arch/openrisc/kernel/setup.c |
54 |
++++ b/arch/openrisc/kernel/setup.c |
55 |
+@@ -281,6 +281,8 @@ void calibrate_delay(void) |
56 |
+ pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n", |
57 |
+ loops_per_jiffy / (500000 / HZ), |
58 |
+ (loops_per_jiffy / (5000 / HZ)) % 100, loops_per_jiffy); |
59 |
++ |
60 |
++ of_node_put(cpu); |
61 |
+ } |
62 |
+ |
63 |
+ void __init setup_arch(char **cmdline_p) |
64 |
+diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c |
65 |
+index 72cd96a8eb19d..c4192f9e4db9d 100644 |
66 |
+--- a/drivers/cdrom/gdrom.c |
67 |
++++ b/drivers/cdrom/gdrom.c |
68 |
+@@ -775,6 +775,13 @@ static int probe_gdrom_setupqueue(void) |
69 |
+ static int probe_gdrom(struct platform_device *devptr) |
70 |
+ { |
71 |
+ int err; |
72 |
++ |
73 |
++ /* |
74 |
++ * Ensure our "one" device is initialized properly in case of previous |
75 |
++ * usages of it |
76 |
++ */ |
77 |
++ memset(&gd, 0, sizeof(gd)); |
78 |
++ |
79 |
+ /* Start the device */ |
80 |
+ if (gdrom_execute_diagnostic() != 1) { |
81 |
+ pr_warning("ATA Probe for GDROM failed\n"); |
82 |
+@@ -857,6 +864,8 @@ static int remove_gdrom(struct platform_device *devptr) |
83 |
+ if (gdrom_major) |
84 |
+ unregister_blkdev(gdrom_major, GDROM_DEV_NAME); |
85 |
+ unregister_cdrom(gd.cd_info); |
86 |
++ kfree(gd.cd_info); |
87 |
++ kfree(gd.toc); |
88 |
+ |
89 |
+ return 0; |
90 |
+ } |
91 |
+@@ -872,7 +881,7 @@ static struct platform_driver gdrom_driver = { |
92 |
+ static int __init init_gdrom(void) |
93 |
+ { |
94 |
+ int rc; |
95 |
+- gd.toc = NULL; |
96 |
++ |
97 |
+ rc = platform_driver_register(&gdrom_driver); |
98 |
+ if (rc) |
99 |
+ return rc; |
100 |
+@@ -888,8 +897,6 @@ static void __exit exit_gdrom(void) |
101 |
+ { |
102 |
+ platform_device_unregister(pd); |
103 |
+ platform_driver_unregister(&gdrom_driver); |
104 |
+- kfree(gd.toc); |
105 |
+- kfree(gd.cd_info); |
106 |
+ } |
107 |
+ |
108 |
+ module_init(init_gdrom); |
109 |
+diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c |
110 |
+index c7d06a36b23a5..baa7280eccb34 100644 |
111 |
+--- a/drivers/firmware/arm_scpi.c |
112 |
++++ b/drivers/firmware/arm_scpi.c |
113 |
+@@ -563,8 +563,10 @@ static unsigned long scpi_clk_get_val(u16 clk_id) |
114 |
+ |
115 |
+ ret = scpi_send_message(CMD_GET_CLOCK_VALUE, &le_clk_id, |
116 |
+ sizeof(le_clk_id), &rate, sizeof(rate)); |
117 |
++ if (ret) |
118 |
++ return 0; |
119 |
+ |
120 |
+- return ret ? ret : le32_to_cpu(rate); |
121 |
++ return le32_to_cpu(rate); |
122 |
+ } |
123 |
+ |
124 |
+ static int scpi_clk_set_val(u16 clk_id, unsigned long rate) |
125 |
+diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c |
126 |
+index f9b8e3e23a8e8..dc2bd82b32021 100644 |
127 |
+--- a/drivers/hwmon/lm80.c |
128 |
++++ b/drivers/hwmon/lm80.c |
129 |
+@@ -630,7 +630,6 @@ static int lm80_probe(struct i2c_client *client, |
130 |
+ struct device *dev = &client->dev; |
131 |
+ struct device *hwmon_dev; |
132 |
+ struct lm80_data *data; |
133 |
+- int rv; |
134 |
+ |
135 |
+ data = devm_kzalloc(dev, sizeof(struct lm80_data), GFP_KERNEL); |
136 |
+ if (!data) |
137 |
+@@ -643,14 +642,8 @@ static int lm80_probe(struct i2c_client *client, |
138 |
+ lm80_init_client(client); |
139 |
+ |
140 |
+ /* A few vars need to be filled upon startup */ |
141 |
+- rv = lm80_read_value(client, LM80_REG_FAN_MIN(1)); |
142 |
+- if (rv < 0) |
143 |
+- return rv; |
144 |
+- data->fan[f_min][0] = rv; |
145 |
+- rv = lm80_read_value(client, LM80_REG_FAN_MIN(2)); |
146 |
+- if (rv < 0) |
147 |
+- return rv; |
148 |
+- data->fan[f_min][1] = rv; |
149 |
++ data->fan[f_min][0] = lm80_read_value(client, LM80_REG_FAN_MIN(1)); |
150 |
++ data->fan[f_min][1] = lm80_read_value(client, LM80_REG_FAN_MIN(2)); |
151 |
+ |
152 |
+ hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name, |
153 |
+ data, lm80_groups); |
154 |
+diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c |
155 |
+index 1695605eeb528..13513466df01f 100644 |
156 |
+--- a/drivers/infiniband/hw/mlx5/main.c |
157 |
++++ b/drivers/infiniband/hw/mlx5/main.c |
158 |
+@@ -6339,6 +6339,7 @@ static void *mlx5_ib_add_slave_port(struct mlx5_core_dev *mdev) |
159 |
+ |
160 |
+ if (bound) { |
161 |
+ rdma_roce_rescan_device(&dev->ib_dev); |
162 |
++ mpi->ibdev->ib_active = true; |
163 |
+ break; |
164 |
+ } |
165 |
+ } |
166 |
+diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c |
167 |
+index 8a22ab8b29e9b..41c9ede98c265 100644 |
168 |
+--- a/drivers/infiniband/sw/rxe/rxe_qp.c |
169 |
++++ b/drivers/infiniband/sw/rxe/rxe_qp.c |
170 |
+@@ -250,6 +250,7 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, |
171 |
+ if (err) { |
172 |
+ vfree(qp->sq.queue->buf); |
173 |
+ kfree(qp->sq.queue); |
174 |
++ qp->sq.queue = NULL; |
175 |
+ return err; |
176 |
+ } |
177 |
+ |
178 |
+@@ -303,6 +304,7 @@ static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, |
179 |
+ if (err) { |
180 |
+ vfree(qp->rq.queue->buf); |
181 |
+ kfree(qp->rq.queue); |
182 |
++ qp->rq.queue = NULL; |
183 |
+ return err; |
184 |
+ } |
185 |
+ } |
186 |
+@@ -363,6 +365,11 @@ int rxe_qp_from_init(struct rxe_dev *rxe, struct rxe_qp *qp, struct rxe_pd *pd, |
187 |
+ err2: |
188 |
+ rxe_queue_cleanup(qp->sq.queue); |
189 |
+ err1: |
190 |
++ qp->pd = NULL; |
191 |
++ qp->rcq = NULL; |
192 |
++ qp->scq = NULL; |
193 |
++ qp->srq = NULL; |
194 |
++ |
195 |
+ if (srq) |
196 |
+ rxe_drop_ref(srq); |
197 |
+ rxe_drop_ref(scq); |
198 |
+diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c |
199 |
+index fd64df5a57a5e..e5413d93f0a1c 100644 |
200 |
+--- a/drivers/leds/leds-lp5523.c |
201 |
++++ b/drivers/leds/leds-lp5523.c |
202 |
+@@ -320,7 +320,7 @@ static int lp5523_init_program_engine(struct lp55xx_chip *chip) |
203 |
+ usleep_range(3000, 6000); |
204 |
+ ret = lp55xx_read(chip, LP5523_REG_STATUS, &status); |
205 |
+ if (ret) |
206 |
+- return ret; |
207 |
++ goto out; |
208 |
+ status &= LP5523_ENG_STATUS_MASK; |
209 |
+ |
210 |
+ if (status != LP5523_ENG_STATUS_MASK) { |
211 |
+diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c |
212 |
+index 9e930a150aa29..7d96836294713 100644 |
213 |
+--- a/drivers/md/dm-snap.c |
214 |
++++ b/drivers/md/dm-snap.c |
215 |
+@@ -1286,6 +1286,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) |
216 |
+ |
217 |
+ if (!s->store->chunk_size) { |
218 |
+ ti->error = "Chunk size not set"; |
219 |
++ r = -EINVAL; |
220 |
+ goto bad_read_metadata; |
221 |
+ } |
222 |
+ |
223 |
+diff --git a/drivers/media/platform/rcar_drif.c b/drivers/media/platform/rcar_drif.c |
224 |
+index b677d014e7bab..81413ab52475d 100644 |
225 |
+--- a/drivers/media/platform/rcar_drif.c |
226 |
++++ b/drivers/media/platform/rcar_drif.c |
227 |
+@@ -912,7 +912,6 @@ static int rcar_drif_g_fmt_sdr_cap(struct file *file, void *priv, |
228 |
+ { |
229 |
+ struct rcar_drif_sdr *sdr = video_drvdata(file); |
230 |
+ |
231 |
+- memset(f->fmt.sdr.reserved, 0, sizeof(f->fmt.sdr.reserved)); |
232 |
+ f->fmt.sdr.pixelformat = sdr->fmt->pixelformat; |
233 |
+ f->fmt.sdr.buffersize = sdr->fmt->buffersize; |
234 |
+ |
235 |
+diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c |
236 |
+index a4cd6f2cfb862..4fb3dcb038196 100644 |
237 |
+--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c |
238 |
++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c |
239 |
+@@ -1049,7 +1049,7 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode) |
240 |
+ for (i = 0; i < QLCNIC_NUM_ILB_PKT; i++) { |
241 |
+ skb = netdev_alloc_skb(adapter->netdev, QLCNIC_ILB_PKT_SIZE); |
242 |
+ if (!skb) |
243 |
+- break; |
244 |
++ goto error; |
245 |
+ qlcnic_create_loopback_buff(skb->data, adapter->mac_addr); |
246 |
+ skb_put(skb, QLCNIC_ILB_PKT_SIZE); |
247 |
+ adapter->ahw->diag_cnt = 0; |
248 |
+@@ -1073,6 +1073,7 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode) |
249 |
+ cnt++; |
250 |
+ } |
251 |
+ if (cnt != i) { |
252 |
++error: |
253 |
+ dev_err(&adapter->pdev->dev, |
254 |
+ "LB Test: failed, TX[%d], RX[%d]\n", i, cnt); |
255 |
+ if (mode != QLCNIC_ILB_MODE) |
256 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c |
257 |
+index 57694eada9955..f31067659e95f 100644 |
258 |
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c |
259 |
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c |
260 |
+@@ -39,7 +39,7 @@ struct sunxi_priv_data { |
261 |
+ static int sun7i_gmac_init(struct platform_device *pdev, void *priv) |
262 |
+ { |
263 |
+ struct sunxi_priv_data *gmac = priv; |
264 |
+- int ret; |
265 |
++ int ret = 0; |
266 |
+ |
267 |
+ if (gmac->regulator) { |
268 |
+ ret = regulator_enable(gmac->regulator); |
269 |
+@@ -60,11 +60,11 @@ static int sun7i_gmac_init(struct platform_device *pdev, void *priv) |
270 |
+ } else { |
271 |
+ clk_set_rate(gmac->tx_clk, SUN7I_GMAC_MII_RATE); |
272 |
+ ret = clk_prepare(gmac->tx_clk); |
273 |
+- if (ret) |
274 |
+- return ret; |
275 |
++ if (ret && gmac->regulator) |
276 |
++ regulator_disable(gmac->regulator); |
277 |
+ } |
278 |
+ |
279 |
+- return 0; |
280 |
++ return ret; |
281 |
+ } |
282 |
+ |
283 |
+ static void sun7i_gmac_exit(struct platform_device *pdev, void *priv) |
284 |
+diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c |
285 |
+index 602a2025717ab..5894edf79d659 100644 |
286 |
+--- a/drivers/net/ethernet/sun/niu.c |
287 |
++++ b/drivers/net/ethernet/sun/niu.c |
288 |
+@@ -8145,10 +8145,10 @@ static int niu_pci_vpd_scan_props(struct niu *np, u32 start, u32 end) |
289 |
+ "VPD_SCAN: Reading in property [%s] len[%d]\n", |
290 |
+ namebuf, prop_len); |
291 |
+ for (i = 0; i < prop_len; i++) { |
292 |
+- err = niu_pci_eeprom_read(np, off + i); |
293 |
+- if (err >= 0) |
294 |
+- *prop_buf = err; |
295 |
+- ++prop_buf; |
296 |
++ err = niu_pci_eeprom_read(np, off + i); |
297 |
++ if (err < 0) |
298 |
++ return err; |
299 |
++ *prop_buf++ = err; |
300 |
+ } |
301 |
+ } |
302 |
+ |
303 |
+@@ -8159,14 +8159,14 @@ static int niu_pci_vpd_scan_props(struct niu *np, u32 start, u32 end) |
304 |
+ } |
305 |
+ |
306 |
+ /* ESPC_PIO_EN_ENABLE must be set */ |
307 |
+-static void niu_pci_vpd_fetch(struct niu *np, u32 start) |
308 |
++static int niu_pci_vpd_fetch(struct niu *np, u32 start) |
309 |
+ { |
310 |
+ u32 offset; |
311 |
+ int err; |
312 |
+ |
313 |
+ err = niu_pci_eeprom_read16_swp(np, start + 1); |
314 |
+ if (err < 0) |
315 |
+- return; |
316 |
++ return err; |
317 |
+ |
318 |
+ offset = err + 3; |
319 |
+ |
320 |
+@@ -8175,12 +8175,14 @@ static void niu_pci_vpd_fetch(struct niu *np, u32 start) |
321 |
+ u32 end; |
322 |
+ |
323 |
+ err = niu_pci_eeprom_read(np, here); |
324 |
++ if (err < 0) |
325 |
++ return err; |
326 |
+ if (err != 0x90) |
327 |
+- return; |
328 |
++ return -EINVAL; |
329 |
+ |
330 |
+ err = niu_pci_eeprom_read16_swp(np, here + 1); |
331 |
+ if (err < 0) |
332 |
+- return; |
333 |
++ return err; |
334 |
+ |
335 |
+ here = start + offset + 3; |
336 |
+ end = start + offset + err; |
337 |
+@@ -8188,9 +8190,12 @@ static void niu_pci_vpd_fetch(struct niu *np, u32 start) |
338 |
+ offset += err; |
339 |
+ |
340 |
+ err = niu_pci_vpd_scan_props(np, here, end); |
341 |
+- if (err < 0 || err == 1) |
342 |
+- return; |
343 |
++ if (err < 0) |
344 |
++ return err; |
345 |
++ if (err == 1) |
346 |
++ return -EINVAL; |
347 |
+ } |
348 |
++ return 0; |
349 |
+ } |
350 |
+ |
351 |
+ /* ESPC_PIO_EN_ENABLE must be set */ |
352 |
+@@ -9281,8 +9286,11 @@ static int niu_get_invariants(struct niu *np) |
353 |
+ offset = niu_pci_vpd_offset(np); |
354 |
+ netif_printk(np, probe, KERN_DEBUG, np->dev, |
355 |
+ "%s() VPD offset [%08x]\n", __func__, offset); |
356 |
+- if (offset) |
357 |
+- niu_pci_vpd_fetch(np, offset); |
358 |
++ if (offset) { |
359 |
++ err = niu_pci_vpd_fetch(np, offset); |
360 |
++ if (err < 0) |
361 |
++ return err; |
362 |
++ } |
363 |
+ nw64(ESPC_PIO_EN, 0); |
364 |
+ |
365 |
+ if (np->flags & NIU_FLAGS_VPD_VALID) { |
366 |
+diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c |
367 |
+index a3189294ecb80..6d1b6a4a81502 100644 |
368 |
+--- a/drivers/net/wireless/realtek/rtlwifi/base.c |
369 |
++++ b/drivers/net/wireless/realtek/rtlwifi/base.c |
370 |
+@@ -457,9 +457,14 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) |
371 |
+ } |
372 |
+ } |
373 |
+ |
374 |
+-static void _rtl_init_deferred_work(struct ieee80211_hw *hw) |
375 |
++static int _rtl_init_deferred_work(struct ieee80211_hw *hw) |
376 |
+ { |
377 |
+ struct rtl_priv *rtlpriv = rtl_priv(hw); |
378 |
++ struct workqueue_struct *wq; |
379 |
++ |
380 |
++ wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name); |
381 |
++ if (!wq) |
382 |
++ return -ENOMEM; |
383 |
+ |
384 |
+ /* <1> timer */ |
385 |
+ timer_setup(&rtlpriv->works.watchdog_timer, |
386 |
+@@ -468,11 +473,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw) |
387 |
+ rtl_easy_concurrent_retrytimer_callback, 0); |
388 |
+ /* <2> work queue */ |
389 |
+ rtlpriv->works.hw = hw; |
390 |
+- rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name); |
391 |
+- if (unlikely(!rtlpriv->works.rtl_wq)) { |
392 |
+- pr_err("Failed to allocate work queue\n"); |
393 |
+- return; |
394 |
+- } |
395 |
++ rtlpriv->works.rtl_wq = wq; |
396 |
+ |
397 |
+ INIT_DELAYED_WORK(&rtlpriv->works.watchdog_wq, |
398 |
+ (void *)rtl_watchdog_wq_callback); |
399 |
+@@ -486,7 +487,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw) |
400 |
+ (void *)rtl_fwevt_wq_callback); |
401 |
+ INIT_DELAYED_WORK(&rtlpriv->works.c2hcmd_wq, |
402 |
+ (void *)rtl_c2hcmd_wq_callback); |
403 |
+- |
404 |
++ return 0; |
405 |
+ } |
406 |
+ |
407 |
+ void rtl_deinit_deferred_work(struct ieee80211_hw *hw, bool ips_wq) |
408 |
+@@ -586,9 +587,7 @@ int rtl_init_core(struct ieee80211_hw *hw) |
409 |
+ rtlmac->link_state = MAC80211_NOLINK; |
410 |
+ |
411 |
+ /* <6> init deferred work */ |
412 |
+- _rtl_init_deferred_work(hw); |
413 |
+- |
414 |
+- return 0; |
415 |
++ return _rtl_init_deferred_work(hw); |
416 |
+ } |
417 |
+ EXPORT_SYMBOL_GPL(rtl_init_core); |
418 |
+ |
419 |
+diff --git a/drivers/nvme/target/io-cmd-file.c b/drivers/nvme/target/io-cmd-file.c |
420 |
+index 39d972e2595f0..ad6263cf7303c 100644 |
421 |
+--- a/drivers/nvme/target/io-cmd-file.c |
422 |
++++ b/drivers/nvme/target/io-cmd-file.c |
423 |
+@@ -38,9 +38,11 @@ int nvmet_file_ns_enable(struct nvmet_ns *ns) |
424 |
+ |
425 |
+ ns->file = filp_open(ns->device_path, flags, 0); |
426 |
+ if (IS_ERR(ns->file)) { |
427 |
+- pr_err("failed to open file %s: (%ld)\n", |
428 |
+- ns->device_path, PTR_ERR(ns->file)); |
429 |
+- return PTR_ERR(ns->file); |
430 |
++ ret = PTR_ERR(ns->file); |
431 |
++ pr_err("failed to open file %s: (%d)\n", |
432 |
++ ns->device_path, ret); |
433 |
++ ns->file = NULL; |
434 |
++ return ret; |
435 |
+ } |
436 |
+ |
437 |
+ ret = vfs_getattr(&ns->file->f_path, |
438 |
+diff --git a/drivers/platform/x86/dell-smbios-wmi.c b/drivers/platform/x86/dell-smbios-wmi.c |
439 |
+index cf2229ece9ff6..ccccce9b67efe 100644 |
440 |
+--- a/drivers/platform/x86/dell-smbios-wmi.c |
441 |
++++ b/drivers/platform/x86/dell-smbios-wmi.c |
442 |
+@@ -274,7 +274,8 @@ int init_dell_smbios_wmi(void) |
443 |
+ |
444 |
+ void exit_dell_smbios_wmi(void) |
445 |
+ { |
446 |
+- wmi_driver_unregister(&dell_smbios_wmi_driver); |
447 |
++ if (wmi_supported) |
448 |
++ wmi_driver_unregister(&dell_smbios_wmi_driver); |
449 |
+ } |
450 |
+ |
451 |
+ MODULE_ALIAS("wmi:" DELL_WMI_SMBIOS_GUID); |
452 |
+diff --git a/drivers/rapidio/rio_cm.c b/drivers/rapidio/rio_cm.c |
453 |
+index b29fc258eeba4..ab57a1eb519fc 100644 |
454 |
+--- a/drivers/rapidio/rio_cm.c |
455 |
++++ b/drivers/rapidio/rio_cm.c |
456 |
+@@ -2136,6 +2136,14 @@ static int riocm_add_mport(struct device *dev, |
457 |
+ return -ENODEV; |
458 |
+ } |
459 |
+ |
460 |
++ cm->rx_wq = create_workqueue(DRV_NAME "/rxq"); |
461 |
++ if (!cm->rx_wq) { |
462 |
++ rio_release_inb_mbox(mport, cmbox); |
463 |
++ rio_release_outb_mbox(mport, cmbox); |
464 |
++ kfree(cm); |
465 |
++ return -ENOMEM; |
466 |
++ } |
467 |
++ |
468 |
+ /* |
469 |
+ * Allocate and register inbound messaging buffers to be ready |
470 |
+ * to receive channel and system management requests |
471 |
+@@ -2146,15 +2154,6 @@ static int riocm_add_mport(struct device *dev, |
472 |
+ cm->rx_slots = RIOCM_RX_RING_SIZE; |
473 |
+ mutex_init(&cm->rx_lock); |
474 |
+ riocm_rx_fill(cm, RIOCM_RX_RING_SIZE); |
475 |
+- cm->rx_wq = create_workqueue(DRV_NAME "/rxq"); |
476 |
+- if (!cm->rx_wq) { |
477 |
+- riocm_error("failed to allocate IBMBOX_%d on %s", |
478 |
+- cmbox, mport->name); |
479 |
+- rio_release_outb_mbox(mport, cmbox); |
480 |
+- kfree(cm); |
481 |
+- return -ENOMEM; |
482 |
+- } |
483 |
+- |
484 |
+ INIT_WORK(&cm->rx_work, rio_ibmsg_handler); |
485 |
+ |
486 |
+ cm->tx_slot = 0; |
487 |
+diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c |
488 |
+index 3007eecfa509b..7451355f20e08 100644 |
489 |
+--- a/drivers/scsi/qla2xxx/qla_nx.c |
490 |
++++ b/drivers/scsi/qla2xxx/qla_nx.c |
491 |
+@@ -1107,7 +1107,8 @@ qla82xx_write_flash_dword(struct qla_hw_data *ha, uint32_t flashaddr, |
492 |
+ return ret; |
493 |
+ } |
494 |
+ |
495 |
+- if (qla82xx_flash_set_write_enable(ha)) |
496 |
++ ret = qla82xx_flash_set_write_enable(ha); |
497 |
++ if (ret < 0) |
498 |
+ goto done_write; |
499 |
+ |
500 |
+ qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_WDATA, data); |
501 |
+diff --git a/drivers/scsi/ufs/ufs-hisi.c b/drivers/scsi/ufs/ufs-hisi.c |
502 |
+index c2cee73a8560d..2bb8bdc2539bc 100644 |
503 |
+--- a/drivers/scsi/ufs/ufs-hisi.c |
504 |
++++ b/drivers/scsi/ufs/ufs-hisi.c |
505 |
+@@ -543,21 +543,24 @@ static int ufs_hisi_init_common(struct ufs_hba *hba) |
506 |
+ host->hba = hba; |
507 |
+ ufshcd_set_variant(hba, host); |
508 |
+ |
509 |
+- host->rst = devm_reset_control_get(dev, "rst"); |
510 |
++ host->rst = devm_reset_control_get(dev, "rst"); |
511 |
+ if (IS_ERR(host->rst)) { |
512 |
+ dev_err(dev, "%s: failed to get reset control\n", __func__); |
513 |
+- return PTR_ERR(host->rst); |
514 |
++ err = PTR_ERR(host->rst); |
515 |
++ goto error; |
516 |
+ } |
517 |
+ |
518 |
+ ufs_hisi_set_pm_lvl(hba); |
519 |
+ |
520 |
+ err = ufs_hisi_get_resource(host); |
521 |
+- if (err) { |
522 |
+- ufshcd_set_variant(hba, NULL); |
523 |
+- return err; |
524 |
+- } |
525 |
++ if (err) |
526 |
++ goto error; |
527 |
+ |
528 |
+ return 0; |
529 |
++ |
530 |
++error: |
531 |
++ ufshcd_set_variant(hba, NULL); |
532 |
++ return err; |
533 |
+ } |
534 |
+ |
535 |
+ static int ufs_hi3660_init(struct ufs_hba *hba) |
536 |
+diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c |
537 |
+index 330522be708fa..0515b5e6326d7 100644 |
538 |
+--- a/drivers/tty/serial/mvebu-uart.c |
539 |
++++ b/drivers/tty/serial/mvebu-uart.c |
540 |
+@@ -807,9 +807,6 @@ static int mvebu_uart_probe(struct platform_device *pdev) |
541 |
+ return -EINVAL; |
542 |
+ } |
543 |
+ |
544 |
+- if (!match) |
545 |
+- return -ENODEV; |
546 |
+- |
547 |
+ /* Assume that all UART ports have a DT alias or none has */ |
548 |
+ id = of_alias_get_id(pdev->dev.of_node, "serial"); |
549 |
+ if (!pdev->dev.of_node || id < 0) |
550 |
+diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c |
551 |
+index 1fad4978a3b41..b2b5f19fb2fb9 100644 |
552 |
+--- a/drivers/tty/vt/vt.c |
553 |
++++ b/drivers/tty/vt/vt.c |
554 |
+@@ -1169,7 +1169,7 @@ static inline int resize_screen(struct vc_data *vc, int width, int height, |
555 |
+ /* Resizes the resolution of the display adapater */ |
556 |
+ int err = 0; |
557 |
+ |
558 |
+- if (vc->vc_mode != KD_GRAPHICS && vc->vc_sw->con_resize) |
559 |
++ if (vc->vc_sw->con_resize) |
560 |
+ err = vc->vc_sw->con_resize(vc, width, height, user); |
561 |
+ |
562 |
+ return err; |
563 |
+diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c |
564 |
+index 2e959563af534..ce6c7dd7bc126 100644 |
565 |
+--- a/drivers/tty/vt/vt_ioctl.c |
566 |
++++ b/drivers/tty/vt/vt_ioctl.c |
567 |
+@@ -895,17 +895,17 @@ int vt_ioctl(struct tty_struct *tty, |
568 |
+ if (vcp) { |
569 |
+ int ret; |
570 |
+ int save_scan_lines = vcp->vc_scan_lines; |
571 |
+- int save_font_height = vcp->vc_font.height; |
572 |
++ int save_cell_height = vcp->vc_cell_height; |
573 |
+ |
574 |
+ if (v.v_vlin) |
575 |
+ vcp->vc_scan_lines = v.v_vlin; |
576 |
+ if (v.v_clin) |
577 |
+- vcp->vc_font.height = v.v_clin; |
578 |
++ vcp->vc_cell_height = v.v_clin; |
579 |
+ vcp->vc_resize_user = 1; |
580 |
+ ret = vc_resize(vcp, v.v_cols, v.v_rows); |
581 |
+ if (ret) { |
582 |
+ vcp->vc_scan_lines = save_scan_lines; |
583 |
+- vcp->vc_font.height = save_font_height; |
584 |
++ vcp->vc_cell_height = save_cell_height; |
585 |
+ console_unlock(); |
586 |
+ return ret; |
587 |
+ } |
588 |
+diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c |
589 |
+index 55507df335bdd..a992d922b3a71 100644 |
590 |
+--- a/drivers/video/console/vgacon.c |
591 |
++++ b/drivers/video/console/vgacon.c |
592 |
+@@ -384,7 +384,7 @@ static void vgacon_init(struct vc_data *c, int init) |
593 |
+ vc_resize(c, vga_video_num_columns, vga_video_num_lines); |
594 |
+ |
595 |
+ c->vc_scan_lines = vga_scan_lines; |
596 |
+- c->vc_font.height = vga_video_font_height; |
597 |
++ c->vc_font.height = c->vc_cell_height = vga_video_font_height; |
598 |
+ c->vc_complement_mask = 0x7700; |
599 |
+ if (vga_512_chars) |
600 |
+ c->vc_hi_font_mask = 0x0800; |
601 |
+@@ -517,32 +517,32 @@ static void vgacon_cursor(struct vc_data *c, int mode) |
602 |
+ switch (c->vc_cursor_type & 0x0f) { |
603 |
+ case CUR_UNDERLINE: |
604 |
+ vgacon_set_cursor_size(c->vc_x, |
605 |
+- c->vc_font.height - |
606 |
+- (c->vc_font.height < |
607 |
++ c->vc_cell_height - |
608 |
++ (c->vc_cell_height < |
609 |
+ 10 ? 2 : 3), |
610 |
+- c->vc_font.height - |
611 |
+- (c->vc_font.height < |
612 |
++ c->vc_cell_height - |
613 |
++ (c->vc_cell_height < |
614 |
+ 10 ? 1 : 2)); |
615 |
+ break; |
616 |
+ case CUR_TWO_THIRDS: |
617 |
+ vgacon_set_cursor_size(c->vc_x, |
618 |
+- c->vc_font.height / 3, |
619 |
+- c->vc_font.height - |
620 |
+- (c->vc_font.height < |
621 |
++ c->vc_cell_height / 3, |
622 |
++ c->vc_cell_height - |
623 |
++ (c->vc_cell_height < |
624 |
+ 10 ? 1 : 2)); |
625 |
+ break; |
626 |
+ case CUR_LOWER_THIRD: |
627 |
+ vgacon_set_cursor_size(c->vc_x, |
628 |
+- (c->vc_font.height * 2) / 3, |
629 |
+- c->vc_font.height - |
630 |
+- (c->vc_font.height < |
631 |
++ (c->vc_cell_height * 2) / 3, |
632 |
++ c->vc_cell_height - |
633 |
++ (c->vc_cell_height < |
634 |
+ 10 ? 1 : 2)); |
635 |
+ break; |
636 |
+ case CUR_LOWER_HALF: |
637 |
+ vgacon_set_cursor_size(c->vc_x, |
638 |
+- c->vc_font.height / 2, |
639 |
+- c->vc_font.height - |
640 |
+- (c->vc_font.height < |
641 |
++ c->vc_cell_height / 2, |
642 |
++ c->vc_cell_height - |
643 |
++ (c->vc_cell_height < |
644 |
+ 10 ? 1 : 2)); |
645 |
+ break; |
646 |
+ case CUR_NONE: |
647 |
+@@ -553,7 +553,7 @@ static void vgacon_cursor(struct vc_data *c, int mode) |
648 |
+ break; |
649 |
+ default: |
650 |
+ vgacon_set_cursor_size(c->vc_x, 1, |
651 |
+- c->vc_font.height); |
652 |
++ c->vc_cell_height); |
653 |
+ break; |
654 |
+ } |
655 |
+ break; |
656 |
+@@ -564,13 +564,13 @@ static int vgacon_doresize(struct vc_data *c, |
657 |
+ unsigned int width, unsigned int height) |
658 |
+ { |
659 |
+ unsigned long flags; |
660 |
+- unsigned int scanlines = height * c->vc_font.height; |
661 |
++ unsigned int scanlines = height * c->vc_cell_height; |
662 |
+ u8 scanlines_lo = 0, r7 = 0, vsync_end = 0, mode, max_scan; |
663 |
+ |
664 |
+ raw_spin_lock_irqsave(&vga_lock, flags); |
665 |
+ |
666 |
+ vgacon_xres = width * VGA_FONTWIDTH; |
667 |
+- vgacon_yres = height * c->vc_font.height; |
668 |
++ vgacon_yres = height * c->vc_cell_height; |
669 |
+ if (vga_video_type >= VIDEO_TYPE_VGAC) { |
670 |
+ outb_p(VGA_CRTC_MAX_SCAN, vga_video_port_reg); |
671 |
+ max_scan = inb_p(vga_video_port_val); |
672 |
+@@ -625,9 +625,9 @@ static int vgacon_doresize(struct vc_data *c, |
673 |
+ static int vgacon_switch(struct vc_data *c) |
674 |
+ { |
675 |
+ int x = c->vc_cols * VGA_FONTWIDTH; |
676 |
+- int y = c->vc_rows * c->vc_font.height; |
677 |
++ int y = c->vc_rows * c->vc_cell_height; |
678 |
+ int rows = screen_info.orig_video_lines * vga_default_font_height/ |
679 |
+- c->vc_font.height; |
680 |
++ c->vc_cell_height; |
681 |
+ /* |
682 |
+ * We need to save screen size here as it's the only way |
683 |
+ * we can spot the screen has been resized and we need to |
684 |
+@@ -1058,7 +1058,7 @@ static int vgacon_adjust_height(struct vc_data *vc, unsigned fontheight) |
685 |
+ cursor_size_lastto = 0; |
686 |
+ c->vc_sw->con_cursor(c, CM_DRAW); |
687 |
+ } |
688 |
+- c->vc_font.height = fontheight; |
689 |
++ c->vc_font.height = c->vc_cell_height = fontheight; |
690 |
+ vc_resize(c, 0, rows); /* Adjust console size */ |
691 |
+ } |
692 |
+ } |
693 |
+@@ -1106,12 +1106,20 @@ static int vgacon_resize(struct vc_data *c, unsigned int width, |
694 |
+ if ((width << 1) * height > vga_vram_size) |
695 |
+ return -EINVAL; |
696 |
+ |
697 |
++ if (user) { |
698 |
++ /* |
699 |
++ * Ho ho! Someone (svgatextmode, eh?) may have reprogrammed |
700 |
++ * the video mode! Set the new defaults then and go away. |
701 |
++ */ |
702 |
++ screen_info.orig_video_cols = width; |
703 |
++ screen_info.orig_video_lines = height; |
704 |
++ vga_default_font_height = c->vc_cell_height; |
705 |
++ return 0; |
706 |
++ } |
707 |
+ if (width % 2 || width > screen_info.orig_video_cols || |
708 |
+ height > (screen_info.orig_video_lines * vga_default_font_height)/ |
709 |
+- c->vc_font.height) |
710 |
+- /* let svgatextmode tinker with video timings and |
711 |
+- return success */ |
712 |
+- return (user) ? 0 : -EINVAL; |
713 |
++ c->vc_cell_height) |
714 |
++ return -EINVAL; |
715 |
+ |
716 |
+ if (con_is_visible(c) && !vga_is_gfx) /* who knows */ |
717 |
+ vgacon_doresize(c, width, height); |
718 |
+diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c |
719 |
+index cf0e025416e5e..bf7959fdf9f44 100644 |
720 |
+--- a/drivers/video/fbdev/core/fbcon.c |
721 |
++++ b/drivers/video/fbdev/core/fbcon.c |
722 |
+@@ -2025,7 +2025,7 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width, |
723 |
+ return -EINVAL; |
724 |
+ |
725 |
+ DPRINTK("resize now %ix%i\n", var.xres, var.yres); |
726 |
+- if (con_is_visible(vc)) { |
727 |
++ if (con_is_visible(vc) && vc->vc_mode == KD_TEXT) { |
728 |
+ var.activate = FB_ACTIVATE_NOW | |
729 |
+ FB_ACTIVATE_FORCE; |
730 |
+ fb_set_var(info, &var); |
731 |
+diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c |
732 |
+index 59e1cae579481..03c0b1b8747b9 100644 |
733 |
+--- a/drivers/video/fbdev/hgafb.c |
734 |
++++ b/drivers/video/fbdev/hgafb.c |
735 |
+@@ -286,7 +286,7 @@ static int hga_card_detect(void) |
736 |
+ |
737 |
+ hga_vram = ioremap(0xb0000, hga_vram_len); |
738 |
+ if (!hga_vram) |
739 |
+- goto error; |
740 |
++ return -ENOMEM; |
741 |
+ |
742 |
+ if (request_region(0x3b0, 12, "hgafb")) |
743 |
+ release_io_ports = 1; |
744 |
+@@ -346,13 +346,18 @@ static int hga_card_detect(void) |
745 |
+ hga_type_name = "Hercules"; |
746 |
+ break; |
747 |
+ } |
748 |
+- return 1; |
749 |
++ return 0; |
750 |
+ error: |
751 |
+ if (release_io_ports) |
752 |
+ release_region(0x3b0, 12); |
753 |
+ if (release_io_port) |
754 |
+ release_region(0x3bf, 1); |
755 |
+- return 0; |
756 |
++ |
757 |
++ iounmap(hga_vram); |
758 |
++ |
759 |
++ pr_err("hgafb: HGA card not detected.\n"); |
760 |
++ |
761 |
++ return -EINVAL; |
762 |
+ } |
763 |
+ |
764 |
+ /** |
765 |
+@@ -550,13 +555,11 @@ static struct fb_ops hgafb_ops = { |
766 |
+ static int hgafb_probe(struct platform_device *pdev) |
767 |
+ { |
768 |
+ struct fb_info *info; |
769 |
++ int ret; |
770 |
+ |
771 |
+- if (! hga_card_detect()) { |
772 |
+- printk(KERN_INFO "hgafb: HGA card not detected.\n"); |
773 |
+- if (hga_vram) |
774 |
+- iounmap(hga_vram); |
775 |
+- return -EINVAL; |
776 |
+- } |
777 |
++ ret = hga_card_detect(); |
778 |
++ if (ret) |
779 |
++ return ret; |
780 |
+ |
781 |
+ printk(KERN_INFO "hgafb: %s with %ldK of memory detected.\n", |
782 |
+ hga_type_name, hga_vram_len/1024); |
783 |
+diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c |
784 |
+index ffcf553719a31..ecdcf358ad5ea 100644 |
785 |
+--- a/drivers/video/fbdev/imsttfb.c |
786 |
++++ b/drivers/video/fbdev/imsttfb.c |
787 |
+@@ -1516,11 +1516,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
788 |
+ info->fix.smem_start = addr; |
789 |
+ info->screen_base = (__u8 *)ioremap(addr, par->ramdac == IBM ? |
790 |
+ 0x400000 : 0x800000); |
791 |
+- if (!info->screen_base) { |
792 |
+- release_mem_region(addr, size); |
793 |
+- framebuffer_release(info); |
794 |
+- return -ENOMEM; |
795 |
+- } |
796 |
+ info->fix.mmio_start = addr + 0x800000; |
797 |
+ par->dc_regs = ioremap(addr + 0x800000, 0x1000); |
798 |
+ par->cmap_regs_phys = addr + 0x840000; |
799 |
+diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c |
800 |
+index 1e2a996c75158..4fb6aacf96143 100644 |
801 |
+--- a/drivers/xen/xen-pciback/xenbus.c |
802 |
++++ b/drivers/xen/xen-pciback/xenbus.c |
803 |
+@@ -358,7 +358,8 @@ out: |
804 |
+ return err; |
805 |
+ } |
806 |
+ |
807 |
+-static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev) |
808 |
++static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev, |
809 |
++ enum xenbus_state state) |
810 |
+ { |
811 |
+ int err = 0; |
812 |
+ int num_devs; |
813 |
+@@ -372,9 +373,7 @@ static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev) |
814 |
+ dev_dbg(&pdev->xdev->dev, "Reconfiguring device ...\n"); |
815 |
+ |
816 |
+ mutex_lock(&pdev->dev_lock); |
817 |
+- /* Make sure we only reconfigure once */ |
818 |
+- if (xenbus_read_driver_state(pdev->xdev->nodename) != |
819 |
+- XenbusStateReconfiguring) |
820 |
++ if (xenbus_read_driver_state(pdev->xdev->nodename) != state) |
821 |
+ goto out; |
822 |
+ |
823 |
+ err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename, "num_devs", "%d", |
824 |
+@@ -499,6 +498,10 @@ static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev) |
825 |
+ } |
826 |
+ } |
827 |
+ |
828 |
++ if (state != XenbusStateReconfiguring) |
829 |
++ /* Make sure we only reconfigure once. */ |
830 |
++ goto out; |
831 |
++ |
832 |
+ err = xenbus_switch_state(pdev->xdev, XenbusStateReconfigured); |
833 |
+ if (err) { |
834 |
+ xenbus_dev_fatal(pdev->xdev, err, |
835 |
+@@ -524,7 +527,7 @@ static void xen_pcibk_frontend_changed(struct xenbus_device *xdev, |
836 |
+ break; |
837 |
+ |
838 |
+ case XenbusStateReconfiguring: |
839 |
+- xen_pcibk_reconfigure(pdev); |
840 |
++ xen_pcibk_reconfigure(pdev, XenbusStateReconfiguring); |
841 |
+ break; |
842 |
+ |
843 |
+ case XenbusStateConnected: |
844 |
+@@ -663,6 +666,15 @@ static void xen_pcibk_be_watch(struct xenbus_watch *watch, |
845 |
+ xen_pcibk_setup_backend(pdev); |
846 |
+ break; |
847 |
+ |
848 |
++ case XenbusStateInitialised: |
849 |
++ /* |
850 |
++ * We typically move to Initialised when the first device was |
851 |
++ * added. Hence subsequent devices getting added may need |
852 |
++ * reconfiguring. |
853 |
++ */ |
854 |
++ xen_pcibk_reconfigure(pdev, XenbusStateInitialised); |
855 |
++ break; |
856 |
++ |
857 |
+ default: |
858 |
+ break; |
859 |
+ } |
860 |
+diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c |
861 |
+index 9d94abaff8fc4..5a14f518cd979 100644 |
862 |
+--- a/fs/cifs/smb2ops.c |
863 |
++++ b/fs/cifs/smb2ops.c |
864 |
+@@ -1174,6 +1174,8 @@ smb2_copychunk_range(const unsigned int xid, |
865 |
+ cpu_to_le32(min_t(u32, len, tcon->max_bytes_chunk)); |
866 |
+ |
867 |
+ /* Request server copy to target from src identified by key */ |
868 |
++ kfree(retbuf); |
869 |
++ retbuf = NULL; |
870 |
+ rc = SMB2_ioctl(xid, tcon, trgtfile->fid.persistent_fid, |
871 |
+ trgtfile->fid.volatile_fid, FSCTL_SRV_COPYCHUNK_WRITE, |
872 |
+ true /* is_fsctl */, (char *)pcchunk, |
873 |
+diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c |
874 |
+index 8e5353bd72cfd..708f931c36f14 100644 |
875 |
+--- a/fs/ecryptfs/crypto.c |
876 |
++++ b/fs/ecryptfs/crypto.c |
877 |
+@@ -325,10 +325,8 @@ static int crypt_scatterlist(struct ecryptfs_crypt_stat *crypt_stat, |
878 |
+ struct extent_crypt_result ecr; |
879 |
+ int rc = 0; |
880 |
+ |
881 |
+- if (!crypt_stat || !crypt_stat->tfm |
882 |
+- || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED)) |
883 |
+- return -EINVAL; |
884 |
+- |
885 |
++ BUG_ON(!crypt_stat || !crypt_stat->tfm |
886 |
++ || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED)); |
887 |
+ if (unlikely(ecryptfs_verbosity > 0)) { |
888 |
+ ecryptfs_printk(KERN_DEBUG, "Key size [%zd]; key:\n", |
889 |
+ crypt_stat->key_size); |
890 |
+diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h |
891 |
+index fea64f2692a05..8b5bc3a47bf5f 100644 |
892 |
+--- a/include/linux/console_struct.h |
893 |
++++ b/include/linux/console_struct.h |
894 |
+@@ -62,6 +62,7 @@ struct vc_data { |
895 |
+ unsigned int vc_rows; |
896 |
+ unsigned int vc_size_row; /* Bytes per row */ |
897 |
+ unsigned int vc_scan_lines; /* # of scan lines */ |
898 |
++ unsigned int vc_cell_height; /* CRTC character cell height */ |
899 |
+ unsigned long vc_origin; /* [!] Start of real screen */ |
900 |
+ unsigned long vc_scr_end; /* [!] End of real screen */ |
901 |
+ unsigned long vc_visible_origin; /* [!] Top of visible window */ |
902 |
+diff --git a/kernel/locking/mutex-debug.c b/kernel/locking/mutex-debug.c |
903 |
+index 9aa713629387c..839df4383799c 100644 |
904 |
+--- a/kernel/locking/mutex-debug.c |
905 |
++++ b/kernel/locking/mutex-debug.c |
906 |
+@@ -57,7 +57,7 @@ void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, |
907 |
+ task->blocked_on = waiter; |
908 |
+ } |
909 |
+ |
910 |
+-void mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, |
911 |
++void debug_mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, |
912 |
+ struct task_struct *task) |
913 |
+ { |
914 |
+ DEBUG_LOCKS_WARN_ON(list_empty(&waiter->list)); |
915 |
+@@ -65,7 +65,7 @@ void mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, |
916 |
+ DEBUG_LOCKS_WARN_ON(task->blocked_on != waiter); |
917 |
+ task->blocked_on = NULL; |
918 |
+ |
919 |
+- list_del_init(&waiter->list); |
920 |
++ INIT_LIST_HEAD(&waiter->list); |
921 |
+ waiter->task = NULL; |
922 |
+ } |
923 |
+ |
924 |
+diff --git a/kernel/locking/mutex-debug.h b/kernel/locking/mutex-debug.h |
925 |
+index 1edd3f45a4ecb..53e631e1d76da 100644 |
926 |
+--- a/kernel/locking/mutex-debug.h |
927 |
++++ b/kernel/locking/mutex-debug.h |
928 |
+@@ -22,7 +22,7 @@ extern void debug_mutex_free_waiter(struct mutex_waiter *waiter); |
929 |
+ extern void debug_mutex_add_waiter(struct mutex *lock, |
930 |
+ struct mutex_waiter *waiter, |
931 |
+ struct task_struct *task); |
932 |
+-extern void mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, |
933 |
++extern void debug_mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, |
934 |
+ struct task_struct *task); |
935 |
+ extern void debug_mutex_unlock(struct mutex *lock); |
936 |
+ extern void debug_mutex_init(struct mutex *lock, const char *name, |
937 |
+diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c |
938 |
+index b3da782cdfbd7..354151fef06ae 100644 |
939 |
+--- a/kernel/locking/mutex.c |
940 |
++++ b/kernel/locking/mutex.c |
941 |
+@@ -177,7 +177,7 @@ static inline bool __mutex_waiter_is_first(struct mutex *lock, struct mutex_wait |
942 |
+ * Add @waiter to a given location in the lock wait_list and set the |
943 |
+ * FLAG_WAITERS flag if it's the first waiter. |
944 |
+ */ |
945 |
+-static void __sched |
946 |
++static void |
947 |
+ __mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, |
948 |
+ struct list_head *list) |
949 |
+ { |
950 |
+@@ -188,6 +188,16 @@ __mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, |
951 |
+ __mutex_set_flag(lock, MUTEX_FLAG_WAITERS); |
952 |
+ } |
953 |
+ |
954 |
++static void |
955 |
++__mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter) |
956 |
++{ |
957 |
++ list_del(&waiter->list); |
958 |
++ if (likely(list_empty(&lock->wait_list))) |
959 |
++ __mutex_clear_flag(lock, MUTEX_FLAGS); |
960 |
++ |
961 |
++ debug_mutex_remove_waiter(lock, waiter, current); |
962 |
++} |
963 |
++ |
964 |
+ /* |
965 |
+ * Give up ownership to a specific task, when @task = NULL, this is equivalent |
966 |
+ * to a regular unlock. Sets PICKUP on a handoff, clears HANDOF, preserves |
967 |
+@@ -1040,9 +1050,7 @@ acquired: |
968 |
+ __ww_mutex_check_waiters(lock, ww_ctx); |
969 |
+ } |
970 |
+ |
971 |
+- mutex_remove_waiter(lock, &waiter, current); |
972 |
+- if (likely(list_empty(&lock->wait_list))) |
973 |
+- __mutex_clear_flag(lock, MUTEX_FLAGS); |
974 |
++ __mutex_remove_waiter(lock, &waiter); |
975 |
+ |
976 |
+ debug_mutex_free_waiter(&waiter); |
977 |
+ |
978 |
+@@ -1059,7 +1067,7 @@ skip_wait: |
979 |
+ |
980 |
+ err: |
981 |
+ __set_current_state(TASK_RUNNING); |
982 |
+- mutex_remove_waiter(lock, &waiter, current); |
983 |
++ __mutex_remove_waiter(lock, &waiter); |
984 |
+ err_early_kill: |
985 |
+ spin_unlock(&lock->wait_lock); |
986 |
+ debug_mutex_free_waiter(&waiter); |
987 |
+diff --git a/kernel/locking/mutex.h b/kernel/locking/mutex.h |
988 |
+index 1c2287d3fa719..f0c710b1d1927 100644 |
989 |
+--- a/kernel/locking/mutex.h |
990 |
++++ b/kernel/locking/mutex.h |
991 |
+@@ -10,12 +10,10 @@ |
992 |
+ * !CONFIG_DEBUG_MUTEXES case. Most of them are NOPs: |
993 |
+ */ |
994 |
+ |
995 |
+-#define mutex_remove_waiter(lock, waiter, task) \ |
996 |
+- __list_del((waiter)->list.prev, (waiter)->list.next) |
997 |
+- |
998 |
+ #define debug_mutex_wake_waiter(lock, waiter) do { } while (0) |
999 |
+ #define debug_mutex_free_waiter(waiter) do { } while (0) |
1000 |
+ #define debug_mutex_add_waiter(lock, waiter, ti) do { } while (0) |
1001 |
++#define debug_mutex_remove_waiter(lock, waiter, ti) do { } while (0) |
1002 |
+ #define debug_mutex_unlock(lock) do { } while (0) |
1003 |
+ #define debug_mutex_init(lock, name, key) do { } while (0) |
1004 |
+ |
1005 |
+diff --git a/kernel/ptrace.c b/kernel/ptrace.c |
1006 |
+index ecdb7402072fa..af74e843221b3 100644 |
1007 |
+--- a/kernel/ptrace.c |
1008 |
++++ b/kernel/ptrace.c |
1009 |
+@@ -163,6 +163,21 @@ void __ptrace_unlink(struct task_struct *child) |
1010 |
+ spin_unlock(&child->sighand->siglock); |
1011 |
+ } |
1012 |
+ |
1013 |
++static bool looks_like_a_spurious_pid(struct task_struct *task) |
1014 |
++{ |
1015 |
++ if (task->exit_code != ((PTRACE_EVENT_EXEC << 8) | SIGTRAP)) |
1016 |
++ return false; |
1017 |
++ |
1018 |
++ if (task_pid_vnr(task) == task->ptrace_message) |
1019 |
++ return false; |
1020 |
++ /* |
1021 |
++ * The tracee changed its pid but the PTRACE_EVENT_EXEC event |
1022 |
++ * was not wait()'ed, most probably debugger targets the old |
1023 |
++ * leader which was destroyed in de_thread(). |
1024 |
++ */ |
1025 |
++ return true; |
1026 |
++} |
1027 |
++ |
1028 |
+ /* Ensure that nothing can wake it up, even SIGKILL */ |
1029 |
+ static bool ptrace_freeze_traced(struct task_struct *task) |
1030 |
+ { |
1031 |
+@@ -173,7 +188,8 @@ static bool ptrace_freeze_traced(struct task_struct *task) |
1032 |
+ return ret; |
1033 |
+ |
1034 |
+ spin_lock_irq(&task->sighand->siglock); |
1035 |
+- if (task_is_traced(task) && !__fatal_signal_pending(task)) { |
1036 |
++ if (task_is_traced(task) && !looks_like_a_spurious_pid(task) && |
1037 |
++ !__fatal_signal_pending(task)) { |
1038 |
+ task->state = __TASK_TRACED; |
1039 |
+ ret = true; |
1040 |
+ } |
1041 |
+diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c |
1042 |
+index cc2f7ca91ccdd..719ae1dff7b4e 100644 |
1043 |
+--- a/net/bluetooth/smp.c |
1044 |
++++ b/net/bluetooth/smp.c |
1045 |
+@@ -2703,6 +2703,15 @@ static int smp_cmd_public_key(struct l2cap_conn *conn, struct sk_buff *skb) |
1046 |
+ if (skb->len < sizeof(*key)) |
1047 |
+ return SMP_INVALID_PARAMS; |
1048 |
+ |
1049 |
++ /* Check if remote and local public keys are the same and debug key is |
1050 |
++ * not in use. |
1051 |
++ */ |
1052 |
++ if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) && |
1053 |
++ !crypto_memneq(key, smp->local_pk, 64)) { |
1054 |
++ bt_dev_err(hdev, "Remote and local public keys are identical"); |
1055 |
++ return SMP_UNSPECIFIED; |
1056 |
++ } |
1057 |
++ |
1058 |
+ memcpy(smp->remote_pk, key, 64); |
1059 |
+ |
1060 |
+ if (test_bit(SMP_FLAG_REMOTE_OOB, &smp->flags)) { |
1061 |
+diff --git a/sound/firewire/Kconfig b/sound/firewire/Kconfig |
1062 |
+index 0cb65d0864cc0..a2ed164d80b49 100644 |
1063 |
+--- a/sound/firewire/Kconfig |
1064 |
++++ b/sound/firewire/Kconfig |
1065 |
+@@ -37,7 +37,7 @@ config SND_OXFW |
1066 |
+ * Mackie(Loud) Onyx 1640i (former model) |
1067 |
+ * Mackie(Loud) Onyx Satellite |
1068 |
+ * Mackie(Loud) Tapco Link.Firewire |
1069 |
+- * Mackie(Loud) d.2 pro/d.4 pro |
1070 |
++ * Mackie(Loud) d.4 pro |
1071 |
+ * Mackie(Loud) U.420/U.420d |
1072 |
+ * TASCAM FireOne |
1073 |
+ * Stanton Controllers & Systems 1 Deck/Mixer |
1074 |
+@@ -83,7 +83,7 @@ config SND_BEBOB |
1075 |
+ * PreSonus FIREBOX/FIREPOD/FP10/Inspire1394 |
1076 |
+ * BridgeCo RDAudio1/Audio5 |
1077 |
+ * Mackie Onyx 1220/1620/1640 (FireWire I/O Card) |
1078 |
+- * Mackie d.2 (FireWire Option) |
1079 |
++ * Mackie d.2 (FireWire Option) and d.2 Pro |
1080 |
+ * Stanton FinalScratch 2 (ScratchAmp) |
1081 |
+ * Tascam IF-FW/DM |
1082 |
+ * Behringer XENIX UFX 1204/1604 |
1083 |
+diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c |
1084 |
+index 5636e89ce5c75..2bcfeee758538 100644 |
1085 |
+--- a/sound/firewire/bebob/bebob.c |
1086 |
++++ b/sound/firewire/bebob/bebob.c |
1087 |
+@@ -414,7 +414,7 @@ static const struct ieee1394_device_id bebob_id_table[] = { |
1088 |
+ SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010049, &spec_normal), |
1089 |
+ /* Mackie, Onyx 1220/1620/1640 (Firewire I/O Card) */ |
1090 |
+ SND_BEBOB_DEV_ENTRY(VEN_MACKIE2, 0x00010065, &spec_normal), |
1091 |
+- /* Mackie, d.2 (Firewire Option) */ |
1092 |
++ // Mackie, d.2 (Firewire option card) and d.2 Pro (the card is built-in). |
1093 |
+ SND_BEBOB_DEV_ENTRY(VEN_MACKIE1, 0x00010067, &spec_normal), |
1094 |
+ /* Stanton, ScratchAmp */ |
1095 |
+ SND_BEBOB_DEV_ENTRY(VEN_STANTON, 0x00000001, &spec_normal), |
1096 |
+diff --git a/sound/firewire/dice/dice-alesis.c b/sound/firewire/dice/dice-alesis.c |
1097 |
+index f5b325263b674..39a4ef8c85430 100644 |
1098 |
+--- a/sound/firewire/dice/dice-alesis.c |
1099 |
++++ b/sound/firewire/dice/dice-alesis.c |
1100 |
+@@ -16,7 +16,7 @@ alesis_io14_tx_pcm_chs[MAX_STREAMS][SND_DICE_RATE_MODE_COUNT] = { |
1101 |
+ static const unsigned int |
1102 |
+ alesis_io26_tx_pcm_chs[MAX_STREAMS][SND_DICE_RATE_MODE_COUNT] = { |
1103 |
+ {10, 10, 4}, /* Tx0 = Analog + S/PDIF. */ |
1104 |
+- {16, 8, 0}, /* Tx1 = ADAT1 + ADAT2. */ |
1105 |
++ {16, 4, 0}, /* Tx1 = ADAT1 + ADAT2 (available at low rate). */ |
1106 |
+ }; |
1107 |
+ |
1108 |
+ int snd_dice_detect_alesis_formats(struct snd_dice *dice) |
1109 |
+diff --git a/sound/firewire/dice/dice-tcelectronic.c b/sound/firewire/dice/dice-tcelectronic.c |
1110 |
+index a8875d24ba2aa..43a3bcb15b3d1 100644 |
1111 |
+--- a/sound/firewire/dice/dice-tcelectronic.c |
1112 |
++++ b/sound/firewire/dice/dice-tcelectronic.c |
1113 |
+@@ -38,8 +38,8 @@ static const struct dice_tc_spec konnekt_24d = { |
1114 |
+ }; |
1115 |
+ |
1116 |
+ static const struct dice_tc_spec konnekt_live = { |
1117 |
+- .tx_pcm_chs = {{16, 16, 16}, {0, 0, 0} }, |
1118 |
+- .rx_pcm_chs = {{16, 16, 16}, {0, 0, 0} }, |
1119 |
++ .tx_pcm_chs = {{16, 16, 6}, {0, 0, 0} }, |
1120 |
++ .rx_pcm_chs = {{16, 16, 6}, {0, 0, 0} }, |
1121 |
+ .has_midi = true, |
1122 |
+ }; |
1123 |
+ |
1124 |
+diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c |
1125 |
+index 4ecaf69569dcb..3c9aa797747b0 100644 |
1126 |
+--- a/sound/firewire/oxfw/oxfw.c |
1127 |
++++ b/sound/firewire/oxfw/oxfw.c |
1128 |
+@@ -400,7 +400,6 @@ static const struct ieee1394_device_id oxfw_id_table[] = { |
1129 |
+ * Onyx-i series (former models): 0x081216 |
1130 |
+ * Mackie Onyx Satellite: 0x00200f |
1131 |
+ * Tapco LINK.firewire 4x6: 0x000460 |
1132 |
+- * d.2 pro: Unknown |
1133 |
+ * d.4 pro: Unknown |
1134 |
+ * U.420: Unknown |
1135 |
+ * U.420d: Unknown |
1136 |
+diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c |
1137 |
+index 1eb8b61a185be..d77dcba276b54 100644 |
1138 |
+--- a/sound/isa/sb/sb8.c |
1139 |
++++ b/sound/isa/sb/sb8.c |
1140 |
+@@ -111,10 +111,6 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev) |
1141 |
+ |
1142 |
+ /* block the 0x388 port to avoid PnP conflicts */ |
1143 |
+ acard->fm_res = request_region(0x388, 4, "SoundBlaster FM"); |
1144 |
+- if (!acard->fm_res) { |
1145 |
+- err = -EBUSY; |
1146 |
+- goto _err; |
1147 |
+- } |
1148 |
+ |
1149 |
+ if (port[dev] != SNDRV_AUTO_PORT) { |
1150 |
+ if ((err = snd_sbdsp_create(card, port[dev], irq[dev], |
1151 |
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
1152 |
+index c4a9141a449cc..f9ebbee3824bb 100644 |
1153 |
+--- a/sound/pci/hda/patch_realtek.c |
1154 |
++++ b/sound/pci/hda/patch_realtek.c |
1155 |
+@@ -388,7 +388,6 @@ static void alc_fill_eapd_coef(struct hda_codec *codec) |
1156 |
+ case 0x10ec0282: |
1157 |
+ case 0x10ec0283: |
1158 |
+ case 0x10ec0286: |
1159 |
+- case 0x10ec0287: |
1160 |
+ case 0x10ec0288: |
1161 |
+ case 0x10ec0285: |
1162 |
+ case 0x10ec0298: |
1163 |
+@@ -399,6 +398,10 @@ static void alc_fill_eapd_coef(struct hda_codec *codec) |
1164 |
+ case 0x10ec0275: |
1165 |
+ alc_update_coef_idx(codec, 0xe, 0, 1<<0); |
1166 |
+ break; |
1167 |
++ case 0x10ec0287: |
1168 |
++ alc_update_coef_idx(codec, 0x10, 1<<9, 0); |
1169 |
++ alc_write_coef_idx(codec, 0x8, 0x4ab7); |
1170 |
++ break; |
1171 |
+ case 0x10ec0293: |
1172 |
+ alc_update_coef_idx(codec, 0xa, 1<<13, 0); |
1173 |
+ break; |
1174 |
+@@ -7166,12 +7169,19 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1175 |
+ SND_PCI_QUIRK(0x1558, 0x50b8, "Clevo NK50SZ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1176 |
+ SND_PCI_QUIRK(0x1558, 0x50d5, "Clevo NP50D5", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1177 |
+ SND_PCI_QUIRK(0x1558, 0x50f0, "Clevo NH50A[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1178 |
++ SND_PCI_QUIRK(0x1558, 0x50f2, "Clevo NH50E[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1179 |
+ SND_PCI_QUIRK(0x1558, 0x50f3, "Clevo NH58DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1180 |
++ SND_PCI_QUIRK(0x1558, 0x50f5, "Clevo NH55EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1181 |
++ SND_PCI_QUIRK(0x1558, 0x50f6, "Clevo NH55DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1182 |
+ SND_PCI_QUIRK(0x1558, 0x5101, "Clevo S510WU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1183 |
+ SND_PCI_QUIRK(0x1558, 0x5157, "Clevo W517GU1", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1184 |
+ SND_PCI_QUIRK(0x1558, 0x51a1, "Clevo NS50MU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1185 |
+ SND_PCI_QUIRK(0x1558, 0x70a1, "Clevo NB70T[HJK]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1186 |
+ SND_PCI_QUIRK(0x1558, 0x70b3, "Clevo NK70SB", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1187 |
++ SND_PCI_QUIRK(0x1558, 0x70f2, "Clevo NH79EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1188 |
++ SND_PCI_QUIRK(0x1558, 0x70f3, "Clevo NH77DPQ", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1189 |
++ SND_PCI_QUIRK(0x1558, 0x70f4, "Clevo NH77EPY", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1190 |
++ SND_PCI_QUIRK(0x1558, 0x70f6, "Clevo NH77DPQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1191 |
+ SND_PCI_QUIRK(0x1558, 0x8228, "Clevo NR40BU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1192 |
+ SND_PCI_QUIRK(0x1558, 0x8520, "Clevo NH50D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1193 |
+ SND_PCI_QUIRK(0x1558, 0x8521, "Clevo NH77D[CD]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1194 |
+@@ -7189,9 +7199,17 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
1195 |
+ SND_PCI_QUIRK(0x1558, 0x8a51, "Clevo NH70RCQ-Y", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1196 |
+ SND_PCI_QUIRK(0x1558, 0x8d50, "Clevo NH55RCQ-M", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1197 |
+ SND_PCI_QUIRK(0x1558, 0x951d, "Clevo N950T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1198 |
++ SND_PCI_QUIRK(0x1558, 0x9600, "Clevo N960K[PR]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1199 |
+ SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1200 |
+ SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1201 |
+ SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL53RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1202 |
++ SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL5XNU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1203 |
++ SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1204 |
++ SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1205 |
++ SND_PCI_QUIRK(0x1558, 0xb022, "Clevo NH77D[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1206 |
++ SND_PCI_QUIRK(0x1558, 0xc018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1207 |
++ SND_PCI_QUIRK(0x1558, 0xc019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1208 |
++ SND_PCI_QUIRK(0x1558, 0xc022, "Clevo NH77[DC][QW]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), |
1209 |
+ SND_PCI_QUIRK(0x17aa, 0x1036, "Lenovo P520", ALC233_FIXUP_LENOVO_MULTI_CODECS), |
1210 |
+ SND_PCI_QUIRK(0x17aa, 0x1048, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC), |
1211 |
+ SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), |
1212 |
+diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c |
1213 |
+index 18b436e7a2cc1..2163fd6dce664 100644 |
1214 |
+--- a/sound/usb/line6/driver.c |
1215 |
++++ b/sound/usb/line6/driver.c |
1216 |
+@@ -705,6 +705,10 @@ static int line6_init_cap_control(struct usb_line6 *line6) |
1217 |
+ line6->buffer_message = kmalloc(LINE6_MIDI_MESSAGE_MAXLEN, GFP_KERNEL); |
1218 |
+ if (!line6->buffer_message) |
1219 |
+ return -ENOMEM; |
1220 |
++ |
1221 |
++ ret = line6_init_midi(line6); |
1222 |
++ if (ret < 0) |
1223 |
++ return ret; |
1224 |
+ } else { |
1225 |
+ ret = line6_hwdep_init(line6); |
1226 |
+ if (ret < 0) |
1227 |
+diff --git a/sound/usb/line6/pod.c b/sound/usb/line6/pod.c |
1228 |
+index 020c81818951d..dff8e7d5f3050 100644 |
1229 |
+--- a/sound/usb/line6/pod.c |
1230 |
++++ b/sound/usb/line6/pod.c |
1231 |
+@@ -420,11 +420,6 @@ static int pod_init(struct usb_line6 *line6, |
1232 |
+ if (err < 0) |
1233 |
+ return err; |
1234 |
+ |
1235 |
+- /* initialize MIDI subsystem: */ |
1236 |
+- err = line6_init_midi(line6); |
1237 |
+- if (err < 0) |
1238 |
+- return err; |
1239 |
+- |
1240 |
+ /* initialize PCM subsystem: */ |
1241 |
+ err = line6_init_pcm(line6, &pod_pcm_properties); |
1242 |
+ if (err < 0) |
1243 |
+diff --git a/sound/usb/line6/variax.c b/sound/usb/line6/variax.c |
1244 |
+index e8c852b2ce350..163a08a8244d7 100644 |
1245 |
+--- a/sound/usb/line6/variax.c |
1246 |
++++ b/sound/usb/line6/variax.c |
1247 |
+@@ -217,7 +217,6 @@ static int variax_init(struct usb_line6 *line6, |
1248 |
+ const struct usb_device_id *id) |
1249 |
+ { |
1250 |
+ struct usb_line6_variax *variax = (struct usb_line6_variax *) line6; |
1251 |
+- int err; |
1252 |
+ |
1253 |
+ line6->process_message = line6_variax_process_message; |
1254 |
+ line6->disconnect = line6_variax_disconnect; |
1255 |
+@@ -233,11 +232,6 @@ static int variax_init(struct usb_line6 *line6, |
1256 |
+ if (variax->buffer_activate == NULL) |
1257 |
+ return -ENOMEM; |
1258 |
+ |
1259 |
+- /* initialize MIDI subsystem: */ |
1260 |
+- err = line6_init_midi(&variax->line6); |
1261 |
+- if (err < 0) |
1262 |
+- return err; |
1263 |
+- |
1264 |
+ /* initiate startup procedure: */ |
1265 |
+ variax_startup1(variax); |
1266 |
+ return 0; |
1267 |
+diff --git a/sound/usb/midi.c b/sound/usb/midi.c |
1268 |
+index 4553db0ef0841..1ac8c84c3369a 100644 |
1269 |
+--- a/sound/usb/midi.c |
1270 |
++++ b/sound/usb/midi.c |
1271 |
+@@ -1890,8 +1890,12 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi *umidi, |
1272 |
+ ms_ep = find_usb_ms_endpoint_descriptor(hostep); |
1273 |
+ if (!ms_ep) |
1274 |
+ continue; |
1275 |
++ if (ms_ep->bLength <= sizeof(*ms_ep)) |
1276 |
++ continue; |
1277 |
+ if (ms_ep->bNumEmbMIDIJack > 0x10) |
1278 |
+ continue; |
1279 |
++ if (ms_ep->bLength < sizeof(*ms_ep) + ms_ep->bNumEmbMIDIJack) |
1280 |
++ continue; |
1281 |
+ if (usb_endpoint_dir_out(ep)) { |
1282 |
+ if (endpoints[epidx].out_ep) { |
1283 |
+ if (++epidx >= MIDI_MAX_ENDPOINTS) { |