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