1 |
commit: d6ffacb5a8ff3ee50bcac8ad34d6ced843efac2a |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 26 12:04:30 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 26 12:04:30 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=d6ffacb5 |
7 |
|
8 |
Linux patch 4.14.234 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1233_linux-4.14.234.patch | 967 ++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 971 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 6676af6..a7d7a76 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -975,6 +975,10 @@ Patch: 1232_linux-4.14.233.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 4.14.233 |
23 |
|
24 |
+Patch: 1233_linux-4.14.234.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 4.14.234 |
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/1233_linux-4.14.234.patch b/1233_linux-4.14.234.patch |
33 |
new file mode 100644 |
34 |
index 0000000..803e409 |
35 |
--- /dev/null |
36 |
+++ b/1233_linux-4.14.234.patch |
37 |
@@ -0,0 +1,967 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 1dedc8fbd320a..bb3ee5cd6f3ca 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 4 |
45 |
+ PATCHLEVEL = 14 |
46 |
+-SUBLEVEL = 233 |
47 |
++SUBLEVEL = 234 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Petit Gorille |
50 |
+ |
51 |
+diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c |
52 |
+index dbf5ee95a0d5f..b29aa3237e76f 100644 |
53 |
+--- a/arch/openrisc/kernel/setup.c |
54 |
++++ b/arch/openrisc/kernel/setup.c |
55 |
+@@ -260,6 +260,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/hwmon/lm80.c b/drivers/hwmon/lm80.c |
110 |
+index f9b8e3e23a8e8..dc2bd82b32021 100644 |
111 |
+--- a/drivers/hwmon/lm80.c |
112 |
++++ b/drivers/hwmon/lm80.c |
113 |
+@@ -630,7 +630,6 @@ static int lm80_probe(struct i2c_client *client, |
114 |
+ struct device *dev = &client->dev; |
115 |
+ struct device *hwmon_dev; |
116 |
+ struct lm80_data *data; |
117 |
+- int rv; |
118 |
+ |
119 |
+ data = devm_kzalloc(dev, sizeof(struct lm80_data), GFP_KERNEL); |
120 |
+ if (!data) |
121 |
+@@ -643,14 +642,8 @@ static int lm80_probe(struct i2c_client *client, |
122 |
+ lm80_init_client(client); |
123 |
+ |
124 |
+ /* A few vars need to be filled upon startup */ |
125 |
+- rv = lm80_read_value(client, LM80_REG_FAN_MIN(1)); |
126 |
+- if (rv < 0) |
127 |
+- return rv; |
128 |
+- data->fan[f_min][0] = rv; |
129 |
+- rv = lm80_read_value(client, LM80_REG_FAN_MIN(2)); |
130 |
+- if (rv < 0) |
131 |
+- return rv; |
132 |
+- data->fan[f_min][1] = rv; |
133 |
++ data->fan[f_min][0] = lm80_read_value(client, LM80_REG_FAN_MIN(1)); |
134 |
++ data->fan[f_min][1] = lm80_read_value(client, LM80_REG_FAN_MIN(2)); |
135 |
+ |
136 |
+ hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name, |
137 |
+ data, lm80_groups); |
138 |
+diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c |
139 |
+index ef7fd5dfad468..28c7b91531b60 100644 |
140 |
+--- a/drivers/infiniband/sw/rxe/rxe_qp.c |
141 |
++++ b/drivers/infiniband/sw/rxe/rxe_qp.c |
142 |
+@@ -258,6 +258,7 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, |
143 |
+ if (err) { |
144 |
+ vfree(qp->sq.queue->buf); |
145 |
+ kfree(qp->sq.queue); |
146 |
++ qp->sq.queue = NULL; |
147 |
+ return err; |
148 |
+ } |
149 |
+ |
150 |
+@@ -311,6 +312,7 @@ static int rxe_qp_init_resp(struct rxe_dev *rxe, struct rxe_qp *qp, |
151 |
+ if (err) { |
152 |
+ vfree(qp->rq.queue->buf); |
153 |
+ kfree(qp->rq.queue); |
154 |
++ qp->rq.queue = NULL; |
155 |
+ return err; |
156 |
+ } |
157 |
+ } |
158 |
+@@ -370,6 +372,11 @@ int rxe_qp_from_init(struct rxe_dev *rxe, struct rxe_qp *qp, struct rxe_pd *pd, |
159 |
+ err2: |
160 |
+ rxe_queue_cleanup(qp->sq.queue); |
161 |
+ err1: |
162 |
++ qp->pd = NULL; |
163 |
++ qp->rcq = NULL; |
164 |
++ qp->scq = NULL; |
165 |
++ qp->srq = NULL; |
166 |
++ |
167 |
+ if (srq) |
168 |
+ rxe_drop_ref(srq); |
169 |
+ rxe_drop_ref(scq); |
170 |
+diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c |
171 |
+index 13838d72e2971..b1c0e6b983722 100644 |
172 |
+--- a/drivers/leds/leds-lp5523.c |
173 |
++++ b/drivers/leds/leds-lp5523.c |
174 |
+@@ -320,7 +320,7 @@ static int lp5523_init_program_engine(struct lp55xx_chip *chip) |
175 |
+ usleep_range(3000, 6000); |
176 |
+ ret = lp55xx_read(chip, LP5523_REG_STATUS, &status); |
177 |
+ if (ret) |
178 |
+- return ret; |
179 |
++ goto out; |
180 |
+ status &= LP5523_ENG_STATUS_MASK; |
181 |
+ |
182 |
+ if (status != LP5523_ENG_STATUS_MASK) { |
183 |
+diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c |
184 |
+index 2b7ffc32e2604..d7ba14f1e6aa4 100644 |
185 |
+--- a/drivers/md/dm-snap.c |
186 |
++++ b/drivers/md/dm-snap.c |
187 |
+@@ -1286,6 +1286,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) |
188 |
+ |
189 |
+ if (!s->store->chunk_size) { |
190 |
+ ti->error = "Chunk size not set"; |
191 |
++ r = -EINVAL; |
192 |
+ goto bad_read_metadata; |
193 |
+ } |
194 |
+ |
195 |
+diff --git a/drivers/media/platform/rcar_drif.c b/drivers/media/platform/rcar_drif.c |
196 |
+index 3871ed6a1fcbf..522364ff0d5d8 100644 |
197 |
+--- a/drivers/media/platform/rcar_drif.c |
198 |
++++ b/drivers/media/platform/rcar_drif.c |
199 |
+@@ -915,7 +915,6 @@ static int rcar_drif_g_fmt_sdr_cap(struct file *file, void *priv, |
200 |
+ { |
201 |
+ struct rcar_drif_sdr *sdr = video_drvdata(file); |
202 |
+ |
203 |
+- memset(f->fmt.sdr.reserved, 0, sizeof(f->fmt.sdr.reserved)); |
204 |
+ f->fmt.sdr.pixelformat = sdr->fmt->pixelformat; |
205 |
+ f->fmt.sdr.buffersize = sdr->fmt->buffersize; |
206 |
+ |
207 |
+diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c |
208 |
+index da042bc520d46..cd8268b47d029 100644 |
209 |
+--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c |
210 |
++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c |
211 |
+@@ -1048,7 +1048,7 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode) |
212 |
+ for (i = 0; i < QLCNIC_NUM_ILB_PKT; i++) { |
213 |
+ skb = netdev_alloc_skb(adapter->netdev, QLCNIC_ILB_PKT_SIZE); |
214 |
+ if (!skb) |
215 |
+- break; |
216 |
++ goto error; |
217 |
+ qlcnic_create_loopback_buff(skb->data, adapter->mac_addr); |
218 |
+ skb_put(skb, QLCNIC_ILB_PKT_SIZE); |
219 |
+ adapter->ahw->diag_cnt = 0; |
220 |
+@@ -1072,6 +1072,7 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode) |
221 |
+ cnt++; |
222 |
+ } |
223 |
+ if (cnt != i) { |
224 |
++error: |
225 |
+ dev_err(&adapter->pdev->dev, |
226 |
+ "LB Test: failed, TX[%d], RX[%d]\n", i, cnt); |
227 |
+ if (mode != QLCNIC_ILB_MODE) |
228 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c |
229 |
+index 57694eada9955..f31067659e95f 100644 |
230 |
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c |
231 |
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c |
232 |
+@@ -39,7 +39,7 @@ struct sunxi_priv_data { |
233 |
+ static int sun7i_gmac_init(struct platform_device *pdev, void *priv) |
234 |
+ { |
235 |
+ struct sunxi_priv_data *gmac = priv; |
236 |
+- int ret; |
237 |
++ int ret = 0; |
238 |
+ |
239 |
+ if (gmac->regulator) { |
240 |
+ ret = regulator_enable(gmac->regulator); |
241 |
+@@ -60,11 +60,11 @@ static int sun7i_gmac_init(struct platform_device *pdev, void *priv) |
242 |
+ } else { |
243 |
+ clk_set_rate(gmac->tx_clk, SUN7I_GMAC_MII_RATE); |
244 |
+ ret = clk_prepare(gmac->tx_clk); |
245 |
+- if (ret) |
246 |
+- return ret; |
247 |
++ if (ret && gmac->regulator) |
248 |
++ regulator_disable(gmac->regulator); |
249 |
+ } |
250 |
+ |
251 |
+- return 0; |
252 |
++ return ret; |
253 |
+ } |
254 |
+ |
255 |
+ static void sun7i_gmac_exit(struct platform_device *pdev, void *priv) |
256 |
+diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c |
257 |
+index 32ab44d00790e..d39cde74826da 100644 |
258 |
+--- a/drivers/net/ethernet/sun/niu.c |
259 |
++++ b/drivers/net/ethernet/sun/niu.c |
260 |
+@@ -8164,10 +8164,10 @@ static int niu_pci_vpd_scan_props(struct niu *np, u32 start, u32 end) |
261 |
+ "VPD_SCAN: Reading in property [%s] len[%d]\n", |
262 |
+ namebuf, prop_len); |
263 |
+ for (i = 0; i < prop_len; i++) { |
264 |
+- err = niu_pci_eeprom_read(np, off + i); |
265 |
+- if (err >= 0) |
266 |
+- *prop_buf = err; |
267 |
+- ++prop_buf; |
268 |
++ err = niu_pci_eeprom_read(np, off + i); |
269 |
++ if (err < 0) |
270 |
++ return err; |
271 |
++ *prop_buf++ = err; |
272 |
+ } |
273 |
+ } |
274 |
+ |
275 |
+@@ -8178,14 +8178,14 @@ static int niu_pci_vpd_scan_props(struct niu *np, u32 start, u32 end) |
276 |
+ } |
277 |
+ |
278 |
+ /* ESPC_PIO_EN_ENABLE must be set */ |
279 |
+-static void niu_pci_vpd_fetch(struct niu *np, u32 start) |
280 |
++static int niu_pci_vpd_fetch(struct niu *np, u32 start) |
281 |
+ { |
282 |
+ u32 offset; |
283 |
+ int err; |
284 |
+ |
285 |
+ err = niu_pci_eeprom_read16_swp(np, start + 1); |
286 |
+ if (err < 0) |
287 |
+- return; |
288 |
++ return err; |
289 |
+ |
290 |
+ offset = err + 3; |
291 |
+ |
292 |
+@@ -8194,12 +8194,14 @@ static void niu_pci_vpd_fetch(struct niu *np, u32 start) |
293 |
+ u32 end; |
294 |
+ |
295 |
+ err = niu_pci_eeprom_read(np, here); |
296 |
++ if (err < 0) |
297 |
++ return err; |
298 |
+ if (err != 0x90) |
299 |
+- return; |
300 |
++ return -EINVAL; |
301 |
+ |
302 |
+ err = niu_pci_eeprom_read16_swp(np, here + 1); |
303 |
+ if (err < 0) |
304 |
+- return; |
305 |
++ return err; |
306 |
+ |
307 |
+ here = start + offset + 3; |
308 |
+ end = start + offset + err; |
309 |
+@@ -8207,9 +8209,12 @@ static void niu_pci_vpd_fetch(struct niu *np, u32 start) |
310 |
+ offset += err; |
311 |
+ |
312 |
+ err = niu_pci_vpd_scan_props(np, here, end); |
313 |
+- if (err < 0 || err == 1) |
314 |
+- return; |
315 |
++ if (err < 0) |
316 |
++ return err; |
317 |
++ if (err == 1) |
318 |
++ return -EINVAL; |
319 |
+ } |
320 |
++ return 0; |
321 |
+ } |
322 |
+ |
323 |
+ /* ESPC_PIO_EN_ENABLE must be set */ |
324 |
+@@ -9300,8 +9305,11 @@ static int niu_get_invariants(struct niu *np) |
325 |
+ offset = niu_pci_vpd_offset(np); |
326 |
+ netif_printk(np, probe, KERN_DEBUG, np->dev, |
327 |
+ "%s() VPD offset [%08x]\n", __func__, offset); |
328 |
+- if (offset) |
329 |
+- niu_pci_vpd_fetch(np, offset); |
330 |
++ if (offset) { |
331 |
++ err = niu_pci_vpd_fetch(np, offset); |
332 |
++ if (err < 0) |
333 |
++ return err; |
334 |
++ } |
335 |
+ nw64(ESPC_PIO_EN, 0); |
336 |
+ |
337 |
+ if (np->flags & NIU_FLAGS_VPD_VALID) { |
338 |
+diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c |
339 |
+index 4a3c713ad3247..55be9986ed54e 100644 |
340 |
+--- a/drivers/net/wireless/realtek/rtlwifi/base.c |
341 |
++++ b/drivers/net/wireless/realtek/rtlwifi/base.c |
342 |
+@@ -456,9 +456,14 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) |
343 |
+ } |
344 |
+ } |
345 |
+ |
346 |
+-static void _rtl_init_deferred_work(struct ieee80211_hw *hw) |
347 |
++static int _rtl_init_deferred_work(struct ieee80211_hw *hw) |
348 |
+ { |
349 |
+ struct rtl_priv *rtlpriv = rtl_priv(hw); |
350 |
++ struct workqueue_struct *wq; |
351 |
++ |
352 |
++ wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name); |
353 |
++ if (!wq) |
354 |
++ return -ENOMEM; |
355 |
+ |
356 |
+ /* <1> timer */ |
357 |
+ setup_timer(&rtlpriv->works.watchdog_timer, |
358 |
+@@ -467,11 +472,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw) |
359 |
+ rtl_easy_concurrent_retrytimer_callback, (unsigned long)hw); |
360 |
+ /* <2> work queue */ |
361 |
+ rtlpriv->works.hw = hw; |
362 |
+- rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name); |
363 |
+- if (unlikely(!rtlpriv->works.rtl_wq)) { |
364 |
+- pr_err("Failed to allocate work queue\n"); |
365 |
+- return; |
366 |
+- } |
367 |
++ rtlpriv->works.rtl_wq = wq; |
368 |
+ |
369 |
+ INIT_DELAYED_WORK(&rtlpriv->works.watchdog_wq, |
370 |
+ (void *)rtl_watchdog_wq_callback); |
371 |
+@@ -485,7 +486,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw) |
372 |
+ (void *)rtl_fwevt_wq_callback); |
373 |
+ INIT_DELAYED_WORK(&rtlpriv->works.c2hcmd_wq, |
374 |
+ (void *)rtl_c2hcmd_wq_callback); |
375 |
+- |
376 |
++ return 0; |
377 |
+ } |
378 |
+ |
379 |
+ void rtl_deinit_deferred_work(struct ieee80211_hw *hw, bool ips_wq) |
380 |
+@@ -585,9 +586,7 @@ int rtl_init_core(struct ieee80211_hw *hw) |
381 |
+ rtlmac->link_state = MAC80211_NOLINK; |
382 |
+ |
383 |
+ /* <6> init deferred work */ |
384 |
+- _rtl_init_deferred_work(hw); |
385 |
+- |
386 |
+- return 0; |
387 |
++ return _rtl_init_deferred_work(hw); |
388 |
+ } |
389 |
+ EXPORT_SYMBOL_GPL(rtl_init_core); |
390 |
+ |
391 |
+diff --git a/drivers/rapidio/rio_cm.c b/drivers/rapidio/rio_cm.c |
392 |
+index b29fc258eeba4..ab57a1eb519fc 100644 |
393 |
+--- a/drivers/rapidio/rio_cm.c |
394 |
++++ b/drivers/rapidio/rio_cm.c |
395 |
+@@ -2136,6 +2136,14 @@ static int riocm_add_mport(struct device *dev, |
396 |
+ return -ENODEV; |
397 |
+ } |
398 |
+ |
399 |
++ cm->rx_wq = create_workqueue(DRV_NAME "/rxq"); |
400 |
++ if (!cm->rx_wq) { |
401 |
++ rio_release_inb_mbox(mport, cmbox); |
402 |
++ rio_release_outb_mbox(mport, cmbox); |
403 |
++ kfree(cm); |
404 |
++ return -ENOMEM; |
405 |
++ } |
406 |
++ |
407 |
+ /* |
408 |
+ * Allocate and register inbound messaging buffers to be ready |
409 |
+ * to receive channel and system management requests |
410 |
+@@ -2146,15 +2154,6 @@ static int riocm_add_mport(struct device *dev, |
411 |
+ cm->rx_slots = RIOCM_RX_RING_SIZE; |
412 |
+ mutex_init(&cm->rx_lock); |
413 |
+ riocm_rx_fill(cm, RIOCM_RX_RING_SIZE); |
414 |
+- cm->rx_wq = create_workqueue(DRV_NAME "/rxq"); |
415 |
+- if (!cm->rx_wq) { |
416 |
+- riocm_error("failed to allocate IBMBOX_%d on %s", |
417 |
+- cmbox, mport->name); |
418 |
+- rio_release_outb_mbox(mport, cmbox); |
419 |
+- kfree(cm); |
420 |
+- return -ENOMEM; |
421 |
+- } |
422 |
+- |
423 |
+ INIT_WORK(&cm->rx_work, rio_ibmsg_handler); |
424 |
+ |
425 |
+ cm->tx_slot = 0; |
426 |
+diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c |
427 |
+index a5b8313cf4916..83cfbaa7f2fd4 100644 |
428 |
+--- a/drivers/scsi/qla2xxx/qla_nx.c |
429 |
++++ b/drivers/scsi/qla2xxx/qla_nx.c |
430 |
+@@ -1107,7 +1107,8 @@ qla82xx_write_flash_dword(struct qla_hw_data *ha, uint32_t flashaddr, |
431 |
+ return ret; |
432 |
+ } |
433 |
+ |
434 |
+- if (qla82xx_flash_set_write_enable(ha)) |
435 |
++ ret = qla82xx_flash_set_write_enable(ha); |
436 |
++ if (ret < 0) |
437 |
+ goto done_write; |
438 |
+ |
439 |
+ qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_WDATA, data); |
440 |
+diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c |
441 |
+index 2fb8180cc844b..d497208b43f42 100644 |
442 |
+--- a/drivers/tty/vt/vt.c |
443 |
++++ b/drivers/tty/vt/vt.c |
444 |
+@@ -835,7 +835,7 @@ static inline int resize_screen(struct vc_data *vc, int width, int height, |
445 |
+ /* Resizes the resolution of the display adapater */ |
446 |
+ int err = 0; |
447 |
+ |
448 |
+- if (vc->vc_mode != KD_GRAPHICS && vc->vc_sw->con_resize) |
449 |
++ if (vc->vc_sw->con_resize) |
450 |
+ err = vc->vc_sw->con_resize(vc, width, height, user); |
451 |
+ |
452 |
+ return err; |
453 |
+diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c |
454 |
+index 416de29b133ad..1820be79df373 100644 |
455 |
+--- a/drivers/tty/vt/vt_ioctl.c |
456 |
++++ b/drivers/tty/vt/vt_ioctl.c |
457 |
+@@ -895,17 +895,17 @@ int vt_ioctl(struct tty_struct *tty, |
458 |
+ if (vcp) { |
459 |
+ int ret; |
460 |
+ int save_scan_lines = vcp->vc_scan_lines; |
461 |
+- int save_font_height = vcp->vc_font.height; |
462 |
++ int save_cell_height = vcp->vc_cell_height; |
463 |
+ |
464 |
+ if (v.v_vlin) |
465 |
+ vcp->vc_scan_lines = v.v_vlin; |
466 |
+ if (v.v_clin) |
467 |
+- vcp->vc_font.height = v.v_clin; |
468 |
++ vcp->vc_cell_height = v.v_clin; |
469 |
+ vcp->vc_resize_user = 1; |
470 |
+ ret = vc_resize(vcp, v.v_cols, v.v_rows); |
471 |
+ if (ret) { |
472 |
+ vcp->vc_scan_lines = save_scan_lines; |
473 |
+- vcp->vc_font.height = save_font_height; |
474 |
++ vcp->vc_cell_height = save_cell_height; |
475 |
+ console_unlock(); |
476 |
+ return ret; |
477 |
+ } |
478 |
+diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c |
479 |
+index a054af74c38f1..0dff642990991 100644 |
480 |
+--- a/drivers/video/console/vgacon.c |
481 |
++++ b/drivers/video/console/vgacon.c |
482 |
+@@ -379,7 +379,7 @@ static void vgacon_init(struct vc_data *c, int init) |
483 |
+ vc_resize(c, vga_video_num_columns, vga_video_num_lines); |
484 |
+ |
485 |
+ c->vc_scan_lines = vga_scan_lines; |
486 |
+- c->vc_font.height = vga_video_font_height; |
487 |
++ c->vc_font.height = c->vc_cell_height = vga_video_font_height; |
488 |
+ c->vc_complement_mask = 0x7700; |
489 |
+ if (vga_512_chars) |
490 |
+ c->vc_hi_font_mask = 0x0800; |
491 |
+@@ -512,32 +512,32 @@ static void vgacon_cursor(struct vc_data *c, int mode) |
492 |
+ switch (c->vc_cursor_type & 0x0f) { |
493 |
+ case CUR_UNDERLINE: |
494 |
+ vgacon_set_cursor_size(c->vc_x, |
495 |
+- c->vc_font.height - |
496 |
+- (c->vc_font.height < |
497 |
++ c->vc_cell_height - |
498 |
++ (c->vc_cell_height < |
499 |
+ 10 ? 2 : 3), |
500 |
+- c->vc_font.height - |
501 |
+- (c->vc_font.height < |
502 |
++ c->vc_cell_height - |
503 |
++ (c->vc_cell_height < |
504 |
+ 10 ? 1 : 2)); |
505 |
+ break; |
506 |
+ case CUR_TWO_THIRDS: |
507 |
+ vgacon_set_cursor_size(c->vc_x, |
508 |
+- c->vc_font.height / 3, |
509 |
+- c->vc_font.height - |
510 |
+- (c->vc_font.height < |
511 |
++ c->vc_cell_height / 3, |
512 |
++ c->vc_cell_height - |
513 |
++ (c->vc_cell_height < |
514 |
+ 10 ? 1 : 2)); |
515 |
+ break; |
516 |
+ case CUR_LOWER_THIRD: |
517 |
+ vgacon_set_cursor_size(c->vc_x, |
518 |
+- (c->vc_font.height * 2) / 3, |
519 |
+- c->vc_font.height - |
520 |
+- (c->vc_font.height < |
521 |
++ (c->vc_cell_height * 2) / 3, |
522 |
++ c->vc_cell_height - |
523 |
++ (c->vc_cell_height < |
524 |
+ 10 ? 1 : 2)); |
525 |
+ break; |
526 |
+ case CUR_LOWER_HALF: |
527 |
+ vgacon_set_cursor_size(c->vc_x, |
528 |
+- c->vc_font.height / 2, |
529 |
+- c->vc_font.height - |
530 |
+- (c->vc_font.height < |
531 |
++ c->vc_cell_height / 2, |
532 |
++ c->vc_cell_height - |
533 |
++ (c->vc_cell_height < |
534 |
+ 10 ? 1 : 2)); |
535 |
+ break; |
536 |
+ case CUR_NONE: |
537 |
+@@ -548,7 +548,7 @@ static void vgacon_cursor(struct vc_data *c, int mode) |
538 |
+ break; |
539 |
+ default: |
540 |
+ vgacon_set_cursor_size(c->vc_x, 1, |
541 |
+- c->vc_font.height); |
542 |
++ c->vc_cell_height); |
543 |
+ break; |
544 |
+ } |
545 |
+ break; |
546 |
+@@ -559,13 +559,13 @@ static int vgacon_doresize(struct vc_data *c, |
547 |
+ unsigned int width, unsigned int height) |
548 |
+ { |
549 |
+ unsigned long flags; |
550 |
+- unsigned int scanlines = height * c->vc_font.height; |
551 |
++ unsigned int scanlines = height * c->vc_cell_height; |
552 |
+ u8 scanlines_lo = 0, r7 = 0, vsync_end = 0, mode, max_scan; |
553 |
+ |
554 |
+ raw_spin_lock_irqsave(&vga_lock, flags); |
555 |
+ |
556 |
+ vgacon_xres = width * VGA_FONTWIDTH; |
557 |
+- vgacon_yres = height * c->vc_font.height; |
558 |
++ vgacon_yres = height * c->vc_cell_height; |
559 |
+ if (vga_video_type >= VIDEO_TYPE_VGAC) { |
560 |
+ outb_p(VGA_CRTC_MAX_SCAN, vga_video_port_reg); |
561 |
+ max_scan = inb_p(vga_video_port_val); |
562 |
+@@ -620,9 +620,9 @@ static int vgacon_doresize(struct vc_data *c, |
563 |
+ static int vgacon_switch(struct vc_data *c) |
564 |
+ { |
565 |
+ int x = c->vc_cols * VGA_FONTWIDTH; |
566 |
+- int y = c->vc_rows * c->vc_font.height; |
567 |
++ int y = c->vc_rows * c->vc_cell_height; |
568 |
+ int rows = screen_info.orig_video_lines * vga_default_font_height/ |
569 |
+- c->vc_font.height; |
570 |
++ c->vc_cell_height; |
571 |
+ /* |
572 |
+ * We need to save screen size here as it's the only way |
573 |
+ * we can spot the screen has been resized and we need to |
574 |
+@@ -1053,7 +1053,7 @@ static int vgacon_adjust_height(struct vc_data *vc, unsigned fontheight) |
575 |
+ cursor_size_lastto = 0; |
576 |
+ c->vc_sw->con_cursor(c, CM_DRAW); |
577 |
+ } |
578 |
+- c->vc_font.height = fontheight; |
579 |
++ c->vc_font.height = c->vc_cell_height = fontheight; |
580 |
+ vc_resize(c, 0, rows); /* Adjust console size */ |
581 |
+ } |
582 |
+ } |
583 |
+@@ -1100,12 +1100,20 @@ static int vgacon_resize(struct vc_data *c, unsigned int width, |
584 |
+ if ((width << 1) * height > vga_vram_size) |
585 |
+ return -EINVAL; |
586 |
+ |
587 |
++ if (user) { |
588 |
++ /* |
589 |
++ * Ho ho! Someone (svgatextmode, eh?) may have reprogrammed |
590 |
++ * the video mode! Set the new defaults then and go away. |
591 |
++ */ |
592 |
++ screen_info.orig_video_cols = width; |
593 |
++ screen_info.orig_video_lines = height; |
594 |
++ vga_default_font_height = c->vc_cell_height; |
595 |
++ return 0; |
596 |
++ } |
597 |
+ if (width % 2 || width > screen_info.orig_video_cols || |
598 |
+ height > (screen_info.orig_video_lines * vga_default_font_height)/ |
599 |
+- c->vc_font.height) |
600 |
+- /* let svgatextmode tinker with video timings and |
601 |
+- return success */ |
602 |
+- return (user) ? 0 : -EINVAL; |
603 |
++ c->vc_cell_height) |
604 |
++ return -EINVAL; |
605 |
+ |
606 |
+ if (con_is_visible(c) && !vga_is_gfx) /* who knows */ |
607 |
+ vgacon_doresize(c, width, height); |
608 |
+diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c |
609 |
+index 75e219ec8125a..e9b6f053f5bd3 100644 |
610 |
+--- a/drivers/video/fbdev/core/fbcon.c |
611 |
++++ b/drivers/video/fbdev/core/fbcon.c |
612 |
+@@ -2003,7 +2003,7 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width, |
613 |
+ return -EINVAL; |
614 |
+ |
615 |
+ DPRINTK("resize now %ix%i\n", var.xres, var.yres); |
616 |
+- if (con_is_visible(vc)) { |
617 |
++ if (con_is_visible(vc) && vc->vc_mode == KD_TEXT) { |
618 |
+ var.activate = FB_ACTIVATE_NOW | |
619 |
+ FB_ACTIVATE_FORCE; |
620 |
+ fb_set_var(info, &var); |
621 |
+diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c |
622 |
+index 59e1cae579481..03c0b1b8747b9 100644 |
623 |
+--- a/drivers/video/fbdev/hgafb.c |
624 |
++++ b/drivers/video/fbdev/hgafb.c |
625 |
+@@ -286,7 +286,7 @@ static int hga_card_detect(void) |
626 |
+ |
627 |
+ hga_vram = ioremap(0xb0000, hga_vram_len); |
628 |
+ if (!hga_vram) |
629 |
+- goto error; |
630 |
++ return -ENOMEM; |
631 |
+ |
632 |
+ if (request_region(0x3b0, 12, "hgafb")) |
633 |
+ release_io_ports = 1; |
634 |
+@@ -346,13 +346,18 @@ static int hga_card_detect(void) |
635 |
+ hga_type_name = "Hercules"; |
636 |
+ break; |
637 |
+ } |
638 |
+- return 1; |
639 |
++ return 0; |
640 |
+ error: |
641 |
+ if (release_io_ports) |
642 |
+ release_region(0x3b0, 12); |
643 |
+ if (release_io_port) |
644 |
+ release_region(0x3bf, 1); |
645 |
+- return 0; |
646 |
++ |
647 |
++ iounmap(hga_vram); |
648 |
++ |
649 |
++ pr_err("hgafb: HGA card not detected.\n"); |
650 |
++ |
651 |
++ return -EINVAL; |
652 |
+ } |
653 |
+ |
654 |
+ /** |
655 |
+@@ -550,13 +555,11 @@ static struct fb_ops hgafb_ops = { |
656 |
+ static int hgafb_probe(struct platform_device *pdev) |
657 |
+ { |
658 |
+ struct fb_info *info; |
659 |
++ int ret; |
660 |
+ |
661 |
+- if (! hga_card_detect()) { |
662 |
+- printk(KERN_INFO "hgafb: HGA card not detected.\n"); |
663 |
+- if (hga_vram) |
664 |
+- iounmap(hga_vram); |
665 |
+- return -EINVAL; |
666 |
+- } |
667 |
++ ret = hga_card_detect(); |
668 |
++ if (ret) |
669 |
++ return ret; |
670 |
+ |
671 |
+ printk(KERN_INFO "hgafb: %s with %ldK of memory detected.\n", |
672 |
+ hga_type_name, hga_vram_len/1024); |
673 |
+diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c |
674 |
+index ffcf553719a31..ecdcf358ad5ea 100644 |
675 |
+--- a/drivers/video/fbdev/imsttfb.c |
676 |
++++ b/drivers/video/fbdev/imsttfb.c |
677 |
+@@ -1516,11 +1516,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
678 |
+ info->fix.smem_start = addr; |
679 |
+ info->screen_base = (__u8 *)ioremap(addr, par->ramdac == IBM ? |
680 |
+ 0x400000 : 0x800000); |
681 |
+- if (!info->screen_base) { |
682 |
+- release_mem_region(addr, size); |
683 |
+- framebuffer_release(info); |
684 |
+- return -ENOMEM; |
685 |
+- } |
686 |
+ info->fix.mmio_start = addr + 0x800000; |
687 |
+ par->dc_regs = ioremap(addr + 0x800000, 0x1000); |
688 |
+ par->cmap_regs_phys = addr + 0x840000; |
689 |
+diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c |
690 |
+index 1e2a996c75158..4fb6aacf96143 100644 |
691 |
+--- a/drivers/xen/xen-pciback/xenbus.c |
692 |
++++ b/drivers/xen/xen-pciback/xenbus.c |
693 |
+@@ -358,7 +358,8 @@ out: |
694 |
+ return err; |
695 |
+ } |
696 |
+ |
697 |
+-static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev) |
698 |
++static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev, |
699 |
++ enum xenbus_state state) |
700 |
+ { |
701 |
+ int err = 0; |
702 |
+ int num_devs; |
703 |
+@@ -372,9 +373,7 @@ static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev) |
704 |
+ dev_dbg(&pdev->xdev->dev, "Reconfiguring device ...\n"); |
705 |
+ |
706 |
+ mutex_lock(&pdev->dev_lock); |
707 |
+- /* Make sure we only reconfigure once */ |
708 |
+- if (xenbus_read_driver_state(pdev->xdev->nodename) != |
709 |
+- XenbusStateReconfiguring) |
710 |
++ if (xenbus_read_driver_state(pdev->xdev->nodename) != state) |
711 |
+ goto out; |
712 |
+ |
713 |
+ err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename, "num_devs", "%d", |
714 |
+@@ -499,6 +498,10 @@ static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev) |
715 |
+ } |
716 |
+ } |
717 |
+ |
718 |
++ if (state != XenbusStateReconfiguring) |
719 |
++ /* Make sure we only reconfigure once. */ |
720 |
++ goto out; |
721 |
++ |
722 |
+ err = xenbus_switch_state(pdev->xdev, XenbusStateReconfigured); |
723 |
+ if (err) { |
724 |
+ xenbus_dev_fatal(pdev->xdev, err, |
725 |
+@@ -524,7 +527,7 @@ static void xen_pcibk_frontend_changed(struct xenbus_device *xdev, |
726 |
+ break; |
727 |
+ |
728 |
+ case XenbusStateReconfiguring: |
729 |
+- xen_pcibk_reconfigure(pdev); |
730 |
++ xen_pcibk_reconfigure(pdev, XenbusStateReconfiguring); |
731 |
+ break; |
732 |
+ |
733 |
+ case XenbusStateConnected: |
734 |
+@@ -663,6 +666,15 @@ static void xen_pcibk_be_watch(struct xenbus_watch *watch, |
735 |
+ xen_pcibk_setup_backend(pdev); |
736 |
+ break; |
737 |
+ |
738 |
++ case XenbusStateInitialised: |
739 |
++ /* |
740 |
++ * We typically move to Initialised when the first device was |
741 |
++ * added. Hence subsequent devices getting added may need |
742 |
++ * reconfiguring. |
743 |
++ */ |
744 |
++ xen_pcibk_reconfigure(pdev, XenbusStateInitialised); |
745 |
++ break; |
746 |
++ |
747 |
+ default: |
748 |
+ break; |
749 |
+ } |
750 |
+diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c |
751 |
+index 963c4719b31a7..ba56c00f26500 100644 |
752 |
+--- a/fs/cifs/smb2ops.c |
753 |
++++ b/fs/cifs/smb2ops.c |
754 |
+@@ -885,6 +885,8 @@ smb2_copychunk_range(const unsigned int xid, |
755 |
+ cpu_to_le32(min_t(u32, len, tcon->max_bytes_chunk)); |
756 |
+ |
757 |
+ /* Request server copy to target from src identified by key */ |
758 |
++ kfree(retbuf); |
759 |
++ retbuf = NULL; |
760 |
+ rc = SMB2_ioctl(xid, tcon, trgtfile->fid.persistent_fid, |
761 |
+ trgtfile->fid.volatile_fid, FSCTL_SRV_COPYCHUNK_WRITE, |
762 |
+ true /* is_fsctl */, false /* use_ipc */, |
763 |
+diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c |
764 |
+index eed38ae86c6c1..bd25ab8370118 100644 |
765 |
+--- a/fs/ecryptfs/crypto.c |
766 |
++++ b/fs/ecryptfs/crypto.c |
767 |
+@@ -339,10 +339,8 @@ static int crypt_scatterlist(struct ecryptfs_crypt_stat *crypt_stat, |
768 |
+ struct extent_crypt_result ecr; |
769 |
+ int rc = 0; |
770 |
+ |
771 |
+- if (!crypt_stat || !crypt_stat->tfm |
772 |
+- || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED)) |
773 |
+- return -EINVAL; |
774 |
+- |
775 |
++ BUG_ON(!crypt_stat || !crypt_stat->tfm |
776 |
++ || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED)); |
777 |
+ if (unlikely(ecryptfs_verbosity > 0)) { |
778 |
+ ecryptfs_printk(KERN_DEBUG, "Key size [%zd]; key:\n", |
779 |
+ crypt_stat->key_size); |
780 |
+diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h |
781 |
+index c0ec478ea5bf1..9099a647f0b13 100644 |
782 |
+--- a/include/linux/console_struct.h |
783 |
++++ b/include/linux/console_struct.h |
784 |
+@@ -62,6 +62,7 @@ struct vc_data { |
785 |
+ unsigned int vc_rows; |
786 |
+ unsigned int vc_size_row; /* Bytes per row */ |
787 |
+ unsigned int vc_scan_lines; /* # of scan lines */ |
788 |
++ unsigned int vc_cell_height; /* CRTC character cell height */ |
789 |
+ unsigned long vc_origin; /* [!] Start of real screen */ |
790 |
+ unsigned long vc_scr_end; /* [!] End of real screen */ |
791 |
+ unsigned long vc_visible_origin; /* [!] Top of visible window */ |
792 |
+diff --git a/kernel/ptrace.c b/kernel/ptrace.c |
793 |
+index 43a283041296d..b28f3c66c6fec 100644 |
794 |
+--- a/kernel/ptrace.c |
795 |
++++ b/kernel/ptrace.c |
796 |
+@@ -163,6 +163,21 @@ void __ptrace_unlink(struct task_struct *child) |
797 |
+ spin_unlock(&child->sighand->siglock); |
798 |
+ } |
799 |
+ |
800 |
++static bool looks_like_a_spurious_pid(struct task_struct *task) |
801 |
++{ |
802 |
++ if (task->exit_code != ((PTRACE_EVENT_EXEC << 8) | SIGTRAP)) |
803 |
++ return false; |
804 |
++ |
805 |
++ if (task_pid_vnr(task) == task->ptrace_message) |
806 |
++ return false; |
807 |
++ /* |
808 |
++ * The tracee changed its pid but the PTRACE_EVENT_EXEC event |
809 |
++ * was not wait()'ed, most probably debugger targets the old |
810 |
++ * leader which was destroyed in de_thread(). |
811 |
++ */ |
812 |
++ return true; |
813 |
++} |
814 |
++ |
815 |
+ /* Ensure that nothing can wake it up, even SIGKILL */ |
816 |
+ static bool ptrace_freeze_traced(struct task_struct *task) |
817 |
+ { |
818 |
+@@ -173,7 +188,8 @@ static bool ptrace_freeze_traced(struct task_struct *task) |
819 |
+ return ret; |
820 |
+ |
821 |
+ spin_lock_irq(&task->sighand->siglock); |
822 |
+- if (task_is_traced(task) && !__fatal_signal_pending(task)) { |
823 |
++ if (task_is_traced(task) && !looks_like_a_spurious_pid(task) && |
824 |
++ !__fatal_signal_pending(task)) { |
825 |
+ task->state = __TASK_TRACED; |
826 |
+ ret = true; |
827 |
+ } |
828 |
+diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c |
829 |
+index 6e9a247b15d78..7ca85e1bd12c4 100644 |
830 |
+--- a/net/bluetooth/smp.c |
831 |
++++ b/net/bluetooth/smp.c |
832 |
+@@ -2693,6 +2693,15 @@ static int smp_cmd_public_key(struct l2cap_conn *conn, struct sk_buff *skb) |
833 |
+ if (skb->len < sizeof(*key)) |
834 |
+ return SMP_INVALID_PARAMS; |
835 |
+ |
836 |
++ /* Check if remote and local public keys are the same and debug key is |
837 |
++ * not in use. |
838 |
++ */ |
839 |
++ if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) && |
840 |
++ !crypto_memneq(key, smp->local_pk, 64)) { |
841 |
++ bt_dev_err(hdev, "Remote and local public keys are identical"); |
842 |
++ return SMP_UNSPECIFIED; |
843 |
++ } |
844 |
++ |
845 |
+ memcpy(smp->remote_pk, key, 64); |
846 |
+ |
847 |
+ if (test_bit(SMP_FLAG_REMOTE_OOB, &smp->flags)) { |
848 |
+diff --git a/sound/firewire/Kconfig b/sound/firewire/Kconfig |
849 |
+index 0cb65d0864cc0..a2ed164d80b49 100644 |
850 |
+--- a/sound/firewire/Kconfig |
851 |
++++ b/sound/firewire/Kconfig |
852 |
+@@ -37,7 +37,7 @@ config SND_OXFW |
853 |
+ * Mackie(Loud) Onyx 1640i (former model) |
854 |
+ * Mackie(Loud) Onyx Satellite |
855 |
+ * Mackie(Loud) Tapco Link.Firewire |
856 |
+- * Mackie(Loud) d.2 pro/d.4 pro |
857 |
++ * Mackie(Loud) d.4 pro |
858 |
+ * Mackie(Loud) U.420/U.420d |
859 |
+ * TASCAM FireOne |
860 |
+ * Stanton Controllers & Systems 1 Deck/Mixer |
861 |
+@@ -83,7 +83,7 @@ config SND_BEBOB |
862 |
+ * PreSonus FIREBOX/FIREPOD/FP10/Inspire1394 |
863 |
+ * BridgeCo RDAudio1/Audio5 |
864 |
+ * Mackie Onyx 1220/1620/1640 (FireWire I/O Card) |
865 |
+- * Mackie d.2 (FireWire Option) |
866 |
++ * Mackie d.2 (FireWire Option) and d.2 Pro |
867 |
+ * Stanton FinalScratch 2 (ScratchAmp) |
868 |
+ * Tascam IF-FW/DM |
869 |
+ * Behringer XENIX UFX 1204/1604 |
870 |
+diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c |
871 |
+index 5636e89ce5c75..2bcfeee758538 100644 |
872 |
+--- a/sound/firewire/bebob/bebob.c |
873 |
++++ b/sound/firewire/bebob/bebob.c |
874 |
+@@ -414,7 +414,7 @@ static const struct ieee1394_device_id bebob_id_table[] = { |
875 |
+ SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010049, &spec_normal), |
876 |
+ /* Mackie, Onyx 1220/1620/1640 (Firewire I/O Card) */ |
877 |
+ SND_BEBOB_DEV_ENTRY(VEN_MACKIE2, 0x00010065, &spec_normal), |
878 |
+- /* Mackie, d.2 (Firewire Option) */ |
879 |
++ // Mackie, d.2 (Firewire option card) and d.2 Pro (the card is built-in). |
880 |
+ SND_BEBOB_DEV_ENTRY(VEN_MACKIE1, 0x00010067, &spec_normal), |
881 |
+ /* Stanton, ScratchAmp */ |
882 |
+ SND_BEBOB_DEV_ENTRY(VEN_STANTON, 0x00000001, &spec_normal), |
883 |
+diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c |
884 |
+index 6f941720141ad..a52021af4467f 100644 |
885 |
+--- a/sound/firewire/oxfw/oxfw.c |
886 |
++++ b/sound/firewire/oxfw/oxfw.c |
887 |
+@@ -406,7 +406,6 @@ static const struct ieee1394_device_id oxfw_id_table[] = { |
888 |
+ * Onyx-i series (former models): 0x081216 |
889 |
+ * Mackie Onyx Satellite: 0x00200f |
890 |
+ * Tapco LINK.firewire 4x6: 0x000460 |
891 |
+- * d.2 pro: Unknown |
892 |
+ * d.4 pro: Unknown |
893 |
+ * U.420: Unknown |
894 |
+ * U.420d: Unknown |
895 |
+diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c |
896 |
+index 1eb8b61a185be..d77dcba276b54 100644 |
897 |
+--- a/sound/isa/sb/sb8.c |
898 |
++++ b/sound/isa/sb/sb8.c |
899 |
+@@ -111,10 +111,6 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev) |
900 |
+ |
901 |
+ /* block the 0x388 port to avoid PnP conflicts */ |
902 |
+ acard->fm_res = request_region(0x388, 4, "SoundBlaster FM"); |
903 |
+- if (!acard->fm_res) { |
904 |
+- err = -EBUSY; |
905 |
+- goto _err; |
906 |
+- } |
907 |
+ |
908 |
+ if (port[dev] != SNDRV_AUTO_PORT) { |
909 |
+ if ((err = snd_sbdsp_create(card, port[dev], irq[dev], |
910 |
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
911 |
+index 78cf6cd9910c9..1f954d3ce4997 100644 |
912 |
+--- a/sound/pci/hda/patch_realtek.c |
913 |
++++ b/sound/pci/hda/patch_realtek.c |
914 |
+@@ -341,7 +341,6 @@ static void alc_fill_eapd_coef(struct hda_codec *codec) |
915 |
+ case 0x10ec0282: |
916 |
+ case 0x10ec0283: |
917 |
+ case 0x10ec0286: |
918 |
+- case 0x10ec0287: |
919 |
+ case 0x10ec0288: |
920 |
+ case 0x10ec0285: |
921 |
+ case 0x10ec0298: |
922 |
+@@ -352,6 +351,10 @@ static void alc_fill_eapd_coef(struct hda_codec *codec) |
923 |
+ case 0x10ec0275: |
924 |
+ alc_update_coef_idx(codec, 0xe, 0, 1<<0); |
925 |
+ break; |
926 |
++ case 0x10ec0287: |
927 |
++ alc_update_coef_idx(codec, 0x10, 1<<9, 0); |
928 |
++ alc_write_coef_idx(codec, 0x8, 0x4ab7); |
929 |
++ break; |
930 |
+ case 0x10ec0293: |
931 |
+ alc_update_coef_idx(codec, 0xa, 1<<13, 0); |
932 |
+ break; |
933 |
+diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c |
934 |
+index bf4eacc53a7d2..40ddfcd4e8e99 100644 |
935 |
+--- a/sound/usb/line6/driver.c |
936 |
++++ b/sound/usb/line6/driver.c |
937 |
+@@ -698,6 +698,10 @@ static int line6_init_cap_control(struct usb_line6 *line6) |
938 |
+ line6->buffer_message = kmalloc(LINE6_MIDI_MESSAGE_MAXLEN, GFP_KERNEL); |
939 |
+ if (!line6->buffer_message) |
940 |
+ return -ENOMEM; |
941 |
++ |
942 |
++ ret = line6_init_midi(line6); |
943 |
++ if (ret < 0) |
944 |
++ return ret; |
945 |
+ } else { |
946 |
+ ret = line6_hwdep_init(line6); |
947 |
+ if (ret < 0) |
948 |
+diff --git a/sound/usb/line6/pod.c b/sound/usb/line6/pod.c |
949 |
+index 358224cc5638e..73e6dc7d63147 100644 |
950 |
+--- a/sound/usb/line6/pod.c |
951 |
++++ b/sound/usb/line6/pod.c |
952 |
+@@ -421,11 +421,6 @@ static int pod_init(struct usb_line6 *line6, |
953 |
+ if (err < 0) |
954 |
+ return err; |
955 |
+ |
956 |
+- /* initialize MIDI subsystem: */ |
957 |
+- err = line6_init_midi(line6); |
958 |
+- if (err < 0) |
959 |
+- return err; |
960 |
+- |
961 |
+ /* initialize PCM subsystem: */ |
962 |
+ err = line6_init_pcm(line6, &pod_pcm_properties); |
963 |
+ if (err < 0) |
964 |
+diff --git a/sound/usb/line6/variax.c b/sound/usb/line6/variax.c |
965 |
+index 0c4512d0382ea..a911cff0cec86 100644 |
966 |
+--- a/sound/usb/line6/variax.c |
967 |
++++ b/sound/usb/line6/variax.c |
968 |
+@@ -217,7 +217,6 @@ static int variax_init(struct usb_line6 *line6, |
969 |
+ const struct usb_device_id *id) |
970 |
+ { |
971 |
+ struct usb_line6_variax *variax = (struct usb_line6_variax *) line6; |
972 |
+- int err; |
973 |
+ |
974 |
+ line6->process_message = line6_variax_process_message; |
975 |
+ line6->disconnect = line6_variax_disconnect; |
976 |
+@@ -233,11 +232,6 @@ static int variax_init(struct usb_line6 *line6, |
977 |
+ if (variax->buffer_activate == NULL) |
978 |
+ return -ENOMEM; |
979 |
+ |
980 |
+- /* initialize MIDI subsystem: */ |
981 |
+- err = line6_init_midi(&variax->line6); |
982 |
+- if (err < 0) |
983 |
+- return err; |
984 |
+- |
985 |
+ /* initiate startup procedure: */ |
986 |
+ variax_startup1(variax); |
987 |
+ return 0; |
988 |
+diff --git a/sound/usb/midi.c b/sound/usb/midi.c |
989 |
+index 74161c13fa158..5f5a6b7ef1cfe 100644 |
990 |
+--- a/sound/usb/midi.c |
991 |
++++ b/sound/usb/midi.c |
992 |
+@@ -1867,8 +1867,12 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi *umidi, |
993 |
+ ms_ep = find_usb_ms_endpoint_descriptor(hostep); |
994 |
+ if (!ms_ep) |
995 |
+ continue; |
996 |
++ if (ms_ep->bLength <= sizeof(*ms_ep)) |
997 |
++ continue; |
998 |
+ if (ms_ep->bNumEmbMIDIJack > 0x10) |
999 |
+ continue; |
1000 |
++ if (ms_ep->bLength < sizeof(*ms_ep) + ms_ep->bNumEmbMIDIJack) |
1001 |
++ continue; |
1002 |
+ if (usb_endpoint_dir_out(ep)) { |
1003 |
+ if (endpoints[epidx].out_ep) { |
1004 |
+ if (++epidx >= MIDI_MAX_ENDPOINTS) { |