1 |
commit: 51fa50605145bd71b99862e1b0746bc8deebfef8 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 26 11:58:52 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 26 11:58:52 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=51fa5060 |
7 |
|
8 |
Linux patch 4.4.270 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1269_linux-4.4.270.patch | 809 +++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 813 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 0b24a7c..c8861a7 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -1119,6 +1119,10 @@ Patch: 1268_linux-4.4.269.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 4.4.269 |
23 |
|
24 |
+Patch: 1269_linux-4.4.270.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 4.4.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.4.270.patch b/1269_linux-4.4.270.patch |
33 |
new file mode 100644 |
34 |
index 0000000..ffe72de |
35 |
--- /dev/null |
36 |
+++ b/1269_linux-4.4.270.patch |
37 |
@@ -0,0 +1,809 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index c39b76606410a..c7ab126311b3b 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,6 +1,6 @@ |
43 |
+ VERSION = 4 |
44 |
+ PATCHLEVEL = 4 |
45 |
+-SUBLEVEL = 269 |
46 |
++SUBLEVEL = 270 |
47 |
+ EXTRAVERSION = |
48 |
+ NAME = Blurry Fish Butt |
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/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c |
138 |
+index d12370352ae34..01165b04a6b7d 100644 |
139 |
+--- a/drivers/leds/leds-lp5523.c |
140 |
++++ b/drivers/leds/leds-lp5523.c |
141 |
+@@ -320,7 +320,7 @@ static int lp5523_init_program_engine(struct lp55xx_chip *chip) |
142 |
+ usleep_range(3000, 6000); |
143 |
+ ret = lp55xx_read(chip, LP5523_REG_STATUS, &status); |
144 |
+ if (ret) |
145 |
+- return ret; |
146 |
++ goto out; |
147 |
+ status &= LP5523_ENG_STATUS_MASK; |
148 |
+ |
149 |
+ if (status != LP5523_ENG_STATUS_MASK) { |
150 |
+diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c |
151 |
+index 510b0cf430a8a..2a1a7025b4b92 100644 |
152 |
+--- a/drivers/md/dm-snap.c |
153 |
++++ b/drivers/md/dm-snap.c |
154 |
+@@ -1265,6 +1265,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) |
155 |
+ |
156 |
+ if (!s->store->chunk_size) { |
157 |
+ ti->error = "Chunk size not set"; |
158 |
++ r = -EINVAL; |
159 |
+ goto bad_read_metadata; |
160 |
+ } |
161 |
+ |
162 |
+diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c |
163 |
+index 63ebc491057b6..99fc0121da93d 100644 |
164 |
+--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c |
165 |
++++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c |
166 |
+@@ -1039,7 +1039,7 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode) |
167 |
+ for (i = 0; i < QLCNIC_NUM_ILB_PKT; i++) { |
168 |
+ skb = netdev_alloc_skb(adapter->netdev, QLCNIC_ILB_PKT_SIZE); |
169 |
+ if (!skb) |
170 |
+- break; |
171 |
++ goto error; |
172 |
+ qlcnic_create_loopback_buff(skb->data, adapter->mac_addr); |
173 |
+ skb_put(skb, QLCNIC_ILB_PKT_SIZE); |
174 |
+ adapter->ahw->diag_cnt = 0; |
175 |
+@@ -1063,6 +1063,7 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode) |
176 |
+ cnt++; |
177 |
+ } |
178 |
+ if (cnt != i) { |
179 |
++error: |
180 |
+ dev_err(&adapter->pdev->dev, |
181 |
+ "LB Test: failed, TX[%d], RX[%d]\n", i, cnt); |
182 |
+ if (mode != QLCNIC_ILB_MODE) |
183 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c |
184 |
+index 31ab5e749e66c..d9cbc5dcf3ecb 100644 |
185 |
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c |
186 |
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c |
187 |
+@@ -39,7 +39,7 @@ struct sunxi_priv_data { |
188 |
+ static int sun7i_gmac_init(struct platform_device *pdev, void *priv) |
189 |
+ { |
190 |
+ struct sunxi_priv_data *gmac = priv; |
191 |
+- int ret; |
192 |
++ int ret = 0; |
193 |
+ |
194 |
+ if (gmac->regulator) { |
195 |
+ ret = regulator_enable(gmac->regulator); |
196 |
+@@ -60,11 +60,11 @@ static int sun7i_gmac_init(struct platform_device *pdev, void *priv) |
197 |
+ } else { |
198 |
+ clk_set_rate(gmac->tx_clk, SUN7I_GMAC_MII_RATE); |
199 |
+ ret = clk_prepare(gmac->tx_clk); |
200 |
+- if (ret) |
201 |
+- return ret; |
202 |
++ if (ret && gmac->regulator) |
203 |
++ regulator_disable(gmac->regulator); |
204 |
+ } |
205 |
+ |
206 |
+- return 0; |
207 |
++ return ret; |
208 |
+ } |
209 |
+ |
210 |
+ static void sun7i_gmac_exit(struct platform_device *pdev, void *priv) |
211 |
+diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c |
212 |
+index cc3b025ab7a78..3fb6f57dbbb37 100644 |
213 |
+--- a/drivers/net/ethernet/sun/niu.c |
214 |
++++ b/drivers/net/ethernet/sun/niu.c |
215 |
+@@ -8166,10 +8166,10 @@ static int niu_pci_vpd_scan_props(struct niu *np, u32 start, u32 end) |
216 |
+ "VPD_SCAN: Reading in property [%s] len[%d]\n", |
217 |
+ namebuf, prop_len); |
218 |
+ for (i = 0; i < prop_len; i++) { |
219 |
+- err = niu_pci_eeprom_read(np, off + i); |
220 |
+- if (err >= 0) |
221 |
+- *prop_buf = err; |
222 |
+- ++prop_buf; |
223 |
++ err = niu_pci_eeprom_read(np, off + i); |
224 |
++ if (err < 0) |
225 |
++ return err; |
226 |
++ *prop_buf++ = err; |
227 |
+ } |
228 |
+ } |
229 |
+ |
230 |
+@@ -8180,14 +8180,14 @@ static int niu_pci_vpd_scan_props(struct niu *np, u32 start, u32 end) |
231 |
+ } |
232 |
+ |
233 |
+ /* ESPC_PIO_EN_ENABLE must be set */ |
234 |
+-static void niu_pci_vpd_fetch(struct niu *np, u32 start) |
235 |
++static int niu_pci_vpd_fetch(struct niu *np, u32 start) |
236 |
+ { |
237 |
+ u32 offset; |
238 |
+ int err; |
239 |
+ |
240 |
+ err = niu_pci_eeprom_read16_swp(np, start + 1); |
241 |
+ if (err < 0) |
242 |
+- return; |
243 |
++ return err; |
244 |
+ |
245 |
+ offset = err + 3; |
246 |
+ |
247 |
+@@ -8196,12 +8196,14 @@ static void niu_pci_vpd_fetch(struct niu *np, u32 start) |
248 |
+ u32 end; |
249 |
+ |
250 |
+ err = niu_pci_eeprom_read(np, here); |
251 |
++ if (err < 0) |
252 |
++ return err; |
253 |
+ if (err != 0x90) |
254 |
+- return; |
255 |
++ return -EINVAL; |
256 |
+ |
257 |
+ err = niu_pci_eeprom_read16_swp(np, here + 1); |
258 |
+ if (err < 0) |
259 |
+- return; |
260 |
++ return err; |
261 |
+ |
262 |
+ here = start + offset + 3; |
263 |
+ end = start + offset + err; |
264 |
+@@ -8209,9 +8211,12 @@ static void niu_pci_vpd_fetch(struct niu *np, u32 start) |
265 |
+ offset += err; |
266 |
+ |
267 |
+ err = niu_pci_vpd_scan_props(np, here, end); |
268 |
+- if (err < 0 || err == 1) |
269 |
+- return; |
270 |
++ if (err < 0) |
271 |
++ return err; |
272 |
++ if (err == 1) |
273 |
++ return -EINVAL; |
274 |
+ } |
275 |
++ return 0; |
276 |
+ } |
277 |
+ |
278 |
+ /* ESPC_PIO_EN_ENABLE must be set */ |
279 |
+@@ -9304,8 +9309,11 @@ static int niu_get_invariants(struct niu *np) |
280 |
+ offset = niu_pci_vpd_offset(np); |
281 |
+ netif_printk(np, probe, KERN_DEBUG, np->dev, |
282 |
+ "%s() VPD offset [%08x]\n", __func__, offset); |
283 |
+- if (offset) |
284 |
+- niu_pci_vpd_fetch(np, offset); |
285 |
++ if (offset) { |
286 |
++ err = niu_pci_vpd_fetch(np, offset); |
287 |
++ if (err < 0) |
288 |
++ return err; |
289 |
++ } |
290 |
+ nw64(ESPC_PIO_EN, 0); |
291 |
+ |
292 |
+ if (np->flags & NIU_FLAGS_VPD_VALID) { |
293 |
+diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c |
294 |
+index 5013d8c1d4a60..57a0c1f24f53c 100644 |
295 |
+--- a/drivers/net/wireless/realtek/rtlwifi/base.c |
296 |
++++ b/drivers/net/wireless/realtek/rtlwifi/base.c |
297 |
+@@ -454,9 +454,14 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) |
298 |
+ } |
299 |
+ } |
300 |
+ |
301 |
+-static void _rtl_init_deferred_work(struct ieee80211_hw *hw) |
302 |
++static int _rtl_init_deferred_work(struct ieee80211_hw *hw) |
303 |
+ { |
304 |
+ struct rtl_priv *rtlpriv = rtl_priv(hw); |
305 |
++ struct workqueue_struct *wq; |
306 |
++ |
307 |
++ wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name); |
308 |
++ if (!wq) |
309 |
++ return -ENOMEM; |
310 |
+ |
311 |
+ /* <1> timer */ |
312 |
+ setup_timer(&rtlpriv->works.watchdog_timer, |
313 |
+@@ -465,11 +470,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw) |
314 |
+ rtl_easy_concurrent_retrytimer_callback, (unsigned long)hw); |
315 |
+ /* <2> work queue */ |
316 |
+ rtlpriv->works.hw = hw; |
317 |
+- rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name); |
318 |
+- if (unlikely(!rtlpriv->works.rtl_wq)) { |
319 |
+- pr_err("Failed to allocate work queue\n"); |
320 |
+- return; |
321 |
+- } |
322 |
++ rtlpriv->works.rtl_wq = wq; |
323 |
+ |
324 |
+ INIT_DELAYED_WORK(&rtlpriv->works.watchdog_wq, |
325 |
+ (void *)rtl_watchdog_wq_callback); |
326 |
+@@ -481,7 +482,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw) |
327 |
+ (void *)rtl_swlps_rfon_wq_callback); |
328 |
+ INIT_DELAYED_WORK(&rtlpriv->works.fwevt_wq, |
329 |
+ (void *)rtl_fwevt_wq_callback); |
330 |
+- |
331 |
++ return 0; |
332 |
+ } |
333 |
+ |
334 |
+ void rtl_deinit_deferred_work(struct ieee80211_hw *hw) |
335 |
+@@ -573,9 +574,7 @@ int rtl_init_core(struct ieee80211_hw *hw) |
336 |
+ rtlmac->link_state = MAC80211_NOLINK; |
337 |
+ |
338 |
+ /* <6> init deferred work */ |
339 |
+- _rtl_init_deferred_work(hw); |
340 |
+- |
341 |
+- return 0; |
342 |
++ return _rtl_init_deferred_work(hw); |
343 |
+ } |
344 |
+ EXPORT_SYMBOL_GPL(rtl_init_core); |
345 |
+ |
346 |
+diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c |
347 |
+index 65f8d2d941592..46f7e3988009e 100644 |
348 |
+--- a/drivers/scsi/qla2xxx/qla_nx.c |
349 |
++++ b/drivers/scsi/qla2xxx/qla_nx.c |
350 |
+@@ -1103,7 +1103,8 @@ qla82xx_write_flash_dword(struct qla_hw_data *ha, uint32_t flashaddr, |
351 |
+ return ret; |
352 |
+ } |
353 |
+ |
354 |
+- if (qla82xx_flash_set_write_enable(ha)) |
355 |
++ ret = qla82xx_flash_set_write_enable(ha); |
356 |
++ if (ret < 0) |
357 |
+ goto done_write; |
358 |
+ |
359 |
+ qla82xx_wr_32(ha, QLA82XX_ROMUSB_ROM_WDATA, data); |
360 |
+diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c |
361 |
+index 7ec5e6dd60e5c..9f479b4c64919 100644 |
362 |
+--- a/drivers/tty/vt/vt.c |
363 |
++++ b/drivers/tty/vt/vt.c |
364 |
+@@ -826,7 +826,7 @@ static inline int resize_screen(struct vc_data *vc, int width, int height, |
365 |
+ /* Resizes the resolution of the display adapater */ |
366 |
+ int err = 0; |
367 |
+ |
368 |
+- if (vc->vc_mode != KD_GRAPHICS && vc->vc_sw->con_resize) |
369 |
++ if (vc->vc_sw->con_resize) |
370 |
+ err = vc->vc_sw->con_resize(vc, width, height, user); |
371 |
+ |
372 |
+ return err; |
373 |
+diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c |
374 |
+index b111071d19b53..e1a8f41212063 100644 |
375 |
+--- a/drivers/tty/vt/vt_ioctl.c |
376 |
++++ b/drivers/tty/vt/vt_ioctl.c |
377 |
+@@ -898,17 +898,17 @@ int vt_ioctl(struct tty_struct *tty, |
378 |
+ if (vcp) { |
379 |
+ int ret; |
380 |
+ int save_scan_lines = vcp->vc_scan_lines; |
381 |
+- int save_font_height = vcp->vc_font.height; |
382 |
++ int save_cell_height = vcp->vc_cell_height; |
383 |
+ |
384 |
+ if (v.v_vlin) |
385 |
+ vcp->vc_scan_lines = v.v_vlin; |
386 |
+ if (v.v_clin) |
387 |
+- vcp->vc_font.height = v.v_clin; |
388 |
++ vcp->vc_cell_height = v.v_clin; |
389 |
+ vcp->vc_resize_user = 1; |
390 |
+ ret = vc_resize(vcp, v.v_cols, v.v_rows); |
391 |
+ if (ret) { |
392 |
+ vcp->vc_scan_lines = save_scan_lines; |
393 |
+- vcp->vc_font.height = save_font_height; |
394 |
++ vcp->vc_cell_height = save_cell_height; |
395 |
+ console_unlock(); |
396 |
+ return ret; |
397 |
+ } |
398 |
+diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c |
399 |
+index 29bb679216395..ceae076dc96b7 100644 |
400 |
+--- a/drivers/video/console/fbcon.c |
401 |
++++ b/drivers/video/console/fbcon.c |
402 |
+@@ -1986,7 +1986,7 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width, |
403 |
+ return -EINVAL; |
404 |
+ |
405 |
+ DPRINTK("resize now %ix%i\n", var.xres, var.yres); |
406 |
+- if (CON_IS_VISIBLE(vc)) { |
407 |
++ if (CON_IS_VISIBLE(vc) && vc->vc_mode == KD_TEXT) { |
408 |
+ var.activate = FB_ACTIVATE_NOW | |
409 |
+ FB_ACTIVATE_FORCE; |
410 |
+ fb_set_var(info, &var); |
411 |
+diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c |
412 |
+index c35ae8c732f6d..850fe17893822 100644 |
413 |
+--- a/drivers/video/console/vgacon.c |
414 |
++++ b/drivers/video/console/vgacon.c |
415 |
+@@ -436,7 +436,7 @@ static void vgacon_init(struct vc_data *c, int init) |
416 |
+ vc_resize(c, vga_video_num_columns, vga_video_num_lines); |
417 |
+ |
418 |
+ c->vc_scan_lines = vga_scan_lines; |
419 |
+- c->vc_font.height = vga_video_font_height; |
420 |
++ c->vc_font.height = c->vc_cell_height = vga_video_font_height; |
421 |
+ c->vc_complement_mask = 0x7700; |
422 |
+ if (vga_512_chars) |
423 |
+ c->vc_hi_font_mask = 0x0800; |
424 |
+@@ -574,32 +574,32 @@ static void vgacon_cursor(struct vc_data *c, int mode) |
425 |
+ switch (c->vc_cursor_type & 0x0f) { |
426 |
+ case CUR_UNDERLINE: |
427 |
+ vgacon_set_cursor_size(c->vc_x, |
428 |
+- c->vc_font.height - |
429 |
+- (c->vc_font.height < |
430 |
++ c->vc_cell_height - |
431 |
++ (c->vc_cell_height < |
432 |
+ 10 ? 2 : 3), |
433 |
+- c->vc_font.height - |
434 |
+- (c->vc_font.height < |
435 |
++ c->vc_cell_height - |
436 |
++ (c->vc_cell_height < |
437 |
+ 10 ? 1 : 2)); |
438 |
+ break; |
439 |
+ case CUR_TWO_THIRDS: |
440 |
+ vgacon_set_cursor_size(c->vc_x, |
441 |
+- c->vc_font.height / 3, |
442 |
+- c->vc_font.height - |
443 |
+- (c->vc_font.height < |
444 |
++ c->vc_cell_height / 3, |
445 |
++ c->vc_cell_height - |
446 |
++ (c->vc_cell_height < |
447 |
+ 10 ? 1 : 2)); |
448 |
+ break; |
449 |
+ case CUR_LOWER_THIRD: |
450 |
+ vgacon_set_cursor_size(c->vc_x, |
451 |
+- (c->vc_font.height * 2) / 3, |
452 |
+- c->vc_font.height - |
453 |
+- (c->vc_font.height < |
454 |
++ (c->vc_cell_height * 2) / 3, |
455 |
++ c->vc_cell_height - |
456 |
++ (c->vc_cell_height < |
457 |
+ 10 ? 1 : 2)); |
458 |
+ break; |
459 |
+ case CUR_LOWER_HALF: |
460 |
+ vgacon_set_cursor_size(c->vc_x, |
461 |
+- c->vc_font.height / 2, |
462 |
+- c->vc_font.height - |
463 |
+- (c->vc_font.height < |
464 |
++ c->vc_cell_height / 2, |
465 |
++ c->vc_cell_height - |
466 |
++ (c->vc_cell_height < |
467 |
+ 10 ? 1 : 2)); |
468 |
+ break; |
469 |
+ case CUR_NONE: |
470 |
+@@ -610,7 +610,7 @@ static void vgacon_cursor(struct vc_data *c, int mode) |
471 |
+ break; |
472 |
+ default: |
473 |
+ vgacon_set_cursor_size(c->vc_x, 1, |
474 |
+- c->vc_font.height); |
475 |
++ c->vc_cell_height); |
476 |
+ break; |
477 |
+ } |
478 |
+ break; |
479 |
+@@ -621,13 +621,13 @@ static int vgacon_doresize(struct vc_data *c, |
480 |
+ unsigned int width, unsigned int height) |
481 |
+ { |
482 |
+ unsigned long flags; |
483 |
+- unsigned int scanlines = height * c->vc_font.height; |
484 |
++ unsigned int scanlines = height * c->vc_cell_height; |
485 |
+ u8 scanlines_lo = 0, r7 = 0, vsync_end = 0, mode, max_scan; |
486 |
+ |
487 |
+ raw_spin_lock_irqsave(&vga_lock, flags); |
488 |
+ |
489 |
+ vgacon_xres = width * VGA_FONTWIDTH; |
490 |
+- vgacon_yres = height * c->vc_font.height; |
491 |
++ vgacon_yres = height * c->vc_cell_height; |
492 |
+ if (vga_video_type >= VIDEO_TYPE_VGAC) { |
493 |
+ outb_p(VGA_CRTC_MAX_SCAN, vga_video_port_reg); |
494 |
+ max_scan = inb_p(vga_video_port_val); |
495 |
+@@ -682,9 +682,9 @@ static int vgacon_doresize(struct vc_data *c, |
496 |
+ static int vgacon_switch(struct vc_data *c) |
497 |
+ { |
498 |
+ int x = c->vc_cols * VGA_FONTWIDTH; |
499 |
+- int y = c->vc_rows * c->vc_font.height; |
500 |
++ int y = c->vc_rows * c->vc_cell_height; |
501 |
+ int rows = screen_info.orig_video_lines * vga_default_font_height/ |
502 |
+- c->vc_font.height; |
503 |
++ c->vc_cell_height; |
504 |
+ /* |
505 |
+ * We need to save screen size here as it's the only way |
506 |
+ * we can spot the screen has been resized and we need to |
507 |
+@@ -1125,7 +1125,7 @@ static int vgacon_adjust_height(struct vc_data *vc, unsigned fontheight) |
508 |
+ cursor_size_lastto = 0; |
509 |
+ c->vc_sw->con_cursor(c, CM_DRAW); |
510 |
+ } |
511 |
+- c->vc_font.height = fontheight; |
512 |
++ c->vc_font.height = c->vc_cell_height = fontheight; |
513 |
+ vc_resize(c, 0, rows); /* Adjust console size */ |
514 |
+ } |
515 |
+ } |
516 |
+@@ -1179,12 +1179,20 @@ static int vgacon_resize(struct vc_data *c, unsigned int width, |
517 |
+ if ((width << 1) * height > vga_vram_size) |
518 |
+ return -EINVAL; |
519 |
+ |
520 |
++ if (user) { |
521 |
++ /* |
522 |
++ * Ho ho! Someone (svgatextmode, eh?) may have reprogrammed |
523 |
++ * the video mode! Set the new defaults then and go away. |
524 |
++ */ |
525 |
++ screen_info.orig_video_cols = width; |
526 |
++ screen_info.orig_video_lines = height; |
527 |
++ vga_default_font_height = c->vc_cell_height; |
528 |
++ return 0; |
529 |
++ } |
530 |
+ if (width % 2 || width > screen_info.orig_video_cols || |
531 |
+ height > (screen_info.orig_video_lines * vga_default_font_height)/ |
532 |
+- c->vc_font.height) |
533 |
+- /* let svgatextmode tinker with video timings and |
534 |
+- return success */ |
535 |
+- return (user) ? 0 : -EINVAL; |
536 |
++ c->vc_cell_height) |
537 |
++ return -EINVAL; |
538 |
+ |
539 |
+ if (CON_IS_VISIBLE(c) && !vga_is_gfx) /* who knows */ |
540 |
+ vgacon_doresize(c, width, height); |
541 |
+diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c |
542 |
+index 4a397c7c1b560..46ac8bbb376d1 100644 |
543 |
+--- a/drivers/video/fbdev/hgafb.c |
544 |
++++ b/drivers/video/fbdev/hgafb.c |
545 |
+@@ -286,7 +286,7 @@ static int hga_card_detect(void) |
546 |
+ |
547 |
+ hga_vram = ioremap(0xb0000, hga_vram_len); |
548 |
+ if (!hga_vram) |
549 |
+- goto error; |
550 |
++ return -ENOMEM; |
551 |
+ |
552 |
+ if (request_region(0x3b0, 12, "hgafb")) |
553 |
+ release_io_ports = 1; |
554 |
+@@ -346,13 +346,18 @@ static int hga_card_detect(void) |
555 |
+ hga_type_name = "Hercules"; |
556 |
+ break; |
557 |
+ } |
558 |
+- return 1; |
559 |
++ return 0; |
560 |
+ error: |
561 |
+ if (release_io_ports) |
562 |
+ release_region(0x3b0, 12); |
563 |
+ if (release_io_port) |
564 |
+ release_region(0x3bf, 1); |
565 |
+- return 0; |
566 |
++ |
567 |
++ iounmap(hga_vram); |
568 |
++ |
569 |
++ pr_err("hgafb: HGA card not detected.\n"); |
570 |
++ |
571 |
++ return -EINVAL; |
572 |
+ } |
573 |
+ |
574 |
+ /** |
575 |
+@@ -550,13 +555,11 @@ static struct fb_ops hgafb_ops = { |
576 |
+ static int hgafb_probe(struct platform_device *pdev) |
577 |
+ { |
578 |
+ struct fb_info *info; |
579 |
++ int ret; |
580 |
+ |
581 |
+- if (! hga_card_detect()) { |
582 |
+- printk(KERN_INFO "hgafb: HGA card not detected.\n"); |
583 |
+- if (hga_vram) |
584 |
+- iounmap(hga_vram); |
585 |
+- return -EINVAL; |
586 |
+- } |
587 |
++ ret = hga_card_detect(); |
588 |
++ if (ret) |
589 |
++ return ret; |
590 |
+ |
591 |
+ printk(KERN_INFO "hgafb: %s with %ldK of memory detected.\n", |
592 |
+ hga_type_name, hga_vram_len/1024); |
593 |
+diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c |
594 |
+index 4994a540f6809..9b167f7ef6c69 100644 |
595 |
+--- a/drivers/video/fbdev/imsttfb.c |
596 |
++++ b/drivers/video/fbdev/imsttfb.c |
597 |
+@@ -1517,11 +1517,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
598 |
+ info->fix.smem_start = addr; |
599 |
+ info->screen_base = (__u8 *)ioremap(addr, par->ramdac == IBM ? |
600 |
+ 0x400000 : 0x800000); |
601 |
+- if (!info->screen_base) { |
602 |
+- release_mem_region(addr, size); |
603 |
+- framebuffer_release(info); |
604 |
+- return -ENOMEM; |
605 |
+- } |
606 |
+ info->fix.mmio_start = addr + 0x800000; |
607 |
+ par->dc_regs = ioremap(addr + 0x800000, 0x1000); |
608 |
+ par->cmap_regs_phys = addr + 0x840000; |
609 |
+diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c |
610 |
+index 12497a2140c25..c784a01aa8cbc 100644 |
611 |
+--- a/drivers/xen/xen-pciback/xenbus.c |
612 |
++++ b/drivers/xen/xen-pciback/xenbus.c |
613 |
+@@ -359,7 +359,8 @@ out: |
614 |
+ return err; |
615 |
+ } |
616 |
+ |
617 |
+-static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev) |
618 |
++static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev, |
619 |
++ enum xenbus_state state) |
620 |
+ { |
621 |
+ int err = 0; |
622 |
+ int num_devs; |
623 |
+@@ -373,9 +374,7 @@ static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev) |
624 |
+ dev_dbg(&pdev->xdev->dev, "Reconfiguring device ...\n"); |
625 |
+ |
626 |
+ mutex_lock(&pdev->dev_lock); |
627 |
+- /* Make sure we only reconfigure once */ |
628 |
+- if (xenbus_read_driver_state(pdev->xdev->nodename) != |
629 |
+- XenbusStateReconfiguring) |
630 |
++ if (xenbus_read_driver_state(pdev->xdev->nodename) != state) |
631 |
+ goto out; |
632 |
+ |
633 |
+ err = xenbus_scanf(XBT_NIL, pdev->xdev->nodename, "num_devs", "%d", |
634 |
+@@ -502,6 +501,10 @@ static int xen_pcibk_reconfigure(struct xen_pcibk_device *pdev) |
635 |
+ } |
636 |
+ } |
637 |
+ |
638 |
++ if (state != XenbusStateReconfiguring) |
639 |
++ /* Make sure we only reconfigure once. */ |
640 |
++ goto out; |
641 |
++ |
642 |
+ err = xenbus_switch_state(pdev->xdev, XenbusStateReconfigured); |
643 |
+ if (err) { |
644 |
+ xenbus_dev_fatal(pdev->xdev, err, |
645 |
+@@ -527,7 +530,7 @@ static void xen_pcibk_frontend_changed(struct xenbus_device *xdev, |
646 |
+ break; |
647 |
+ |
648 |
+ case XenbusStateReconfiguring: |
649 |
+- xen_pcibk_reconfigure(pdev); |
650 |
++ xen_pcibk_reconfigure(pdev, XenbusStateReconfiguring); |
651 |
+ break; |
652 |
+ |
653 |
+ case XenbusStateConnected: |
654 |
+@@ -666,6 +669,15 @@ static void xen_pcibk_be_watch(struct xenbus_watch *watch, |
655 |
+ xen_pcibk_setup_backend(pdev); |
656 |
+ break; |
657 |
+ |
658 |
++ case XenbusStateInitialised: |
659 |
++ /* |
660 |
++ * We typically move to Initialised when the first device was |
661 |
++ * added. Hence subsequent devices getting added may need |
662 |
++ * reconfiguring. |
663 |
++ */ |
664 |
++ xen_pcibk_reconfigure(pdev, XenbusStateInitialised); |
665 |
++ break; |
666 |
++ |
667 |
+ default: |
668 |
+ break; |
669 |
+ } |
670 |
+diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c |
671 |
+index 087261ca6d463..c173d047b44b7 100644 |
672 |
+--- a/fs/cifs/smb2ops.c |
673 |
++++ b/fs/cifs/smb2ops.c |
674 |
+@@ -619,6 +619,8 @@ smb2_clone_range(const unsigned int xid, |
675 |
+ cpu_to_le32(min_t(u32, len, tcon->max_bytes_chunk)); |
676 |
+ |
677 |
+ /* Request server copy to target from src identified by key */ |
678 |
++ kfree(retbuf); |
679 |
++ retbuf = NULL; |
680 |
+ rc = SMB2_ioctl(xid, tcon, trgtfile->fid.persistent_fid, |
681 |
+ trgtfile->fid.volatile_fid, FSCTL_SRV_COPYCHUNK_WRITE, |
682 |
+ true /* is_fsctl */, (char *)pcchunk, |
683 |
+diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c |
684 |
+index 83e9f6272bfb2..f246f1760ba25 100644 |
685 |
+--- a/fs/ecryptfs/crypto.c |
686 |
++++ b/fs/ecryptfs/crypto.c |
687 |
+@@ -346,10 +346,8 @@ static int crypt_scatterlist(struct ecryptfs_crypt_stat *crypt_stat, |
688 |
+ struct extent_crypt_result ecr; |
689 |
+ int rc = 0; |
690 |
+ |
691 |
+- if (!crypt_stat || !crypt_stat->tfm |
692 |
+- || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED)) |
693 |
+- return -EINVAL; |
694 |
+- |
695 |
++ BUG_ON(!crypt_stat || !crypt_stat->tfm |
696 |
++ || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED)); |
697 |
+ if (unlikely(ecryptfs_verbosity > 0)) { |
698 |
+ ecryptfs_printk(KERN_DEBUG, "Key size [%zd]; key:\n", |
699 |
+ crypt_stat->key_size); |
700 |
+diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h |
701 |
+index e329ee2667e19..3a7fd222845e9 100644 |
702 |
+--- a/include/linux/console_struct.h |
703 |
++++ b/include/linux/console_struct.h |
704 |
+@@ -29,6 +29,7 @@ struct vc_data { |
705 |
+ unsigned int vc_rows; |
706 |
+ unsigned int vc_size_row; /* Bytes per row */ |
707 |
+ unsigned int vc_scan_lines; /* # of scan lines */ |
708 |
++ unsigned int vc_cell_height; /* CRTC character cell height */ |
709 |
+ unsigned long vc_origin; /* [!] Start of real screen */ |
710 |
+ unsigned long vc_scr_end; /* [!] End of real screen */ |
711 |
+ unsigned long vc_visible_origin; /* [!] Top of visible window */ |
712 |
+diff --git a/kernel/ptrace.c b/kernel/ptrace.c |
713 |
+index da8c358930fbf..5a1d8cc7ef4e9 100644 |
714 |
+--- a/kernel/ptrace.c |
715 |
++++ b/kernel/ptrace.c |
716 |
+@@ -129,6 +129,21 @@ void __ptrace_unlink(struct task_struct *child) |
717 |
+ spin_unlock(&child->sighand->siglock); |
718 |
+ } |
719 |
+ |
720 |
++static bool looks_like_a_spurious_pid(struct task_struct *task) |
721 |
++{ |
722 |
++ if (task->exit_code != ((PTRACE_EVENT_EXEC << 8) | SIGTRAP)) |
723 |
++ return false; |
724 |
++ |
725 |
++ if (task_pid_vnr(task) == task->ptrace_message) |
726 |
++ return false; |
727 |
++ /* |
728 |
++ * The tracee changed its pid but the PTRACE_EVENT_EXEC event |
729 |
++ * was not wait()'ed, most probably debugger targets the old |
730 |
++ * leader which was destroyed in de_thread(). |
731 |
++ */ |
732 |
++ return true; |
733 |
++} |
734 |
++ |
735 |
+ /* Ensure that nothing can wake it up, even SIGKILL */ |
736 |
+ static bool ptrace_freeze_traced(struct task_struct *task) |
737 |
+ { |
738 |
+@@ -139,7 +154,8 @@ static bool ptrace_freeze_traced(struct task_struct *task) |
739 |
+ return ret; |
740 |
+ |
741 |
+ spin_lock_irq(&task->sighand->siglock); |
742 |
+- if (task_is_traced(task) && !__fatal_signal_pending(task)) { |
743 |
++ if (task_is_traced(task) && !looks_like_a_spurious_pid(task) && |
744 |
++ !__fatal_signal_pending(task)) { |
745 |
+ task->state = __TASK_TRACED; |
746 |
+ ret = true; |
747 |
+ } |
748 |
+diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c |
749 |
+index a19822be0e564..03e14e8624b1b 100644 |
750 |
+--- a/net/bluetooth/smp.c |
751 |
++++ b/net/bluetooth/smp.c |
752 |
+@@ -2654,6 +2654,15 @@ static int smp_cmd_public_key(struct l2cap_conn *conn, struct sk_buff *skb) |
753 |
+ if (skb->len < sizeof(*key)) |
754 |
+ return SMP_INVALID_PARAMS; |
755 |
+ |
756 |
++ /* Check if remote and local public keys are the same and debug key is |
757 |
++ * not in use. |
758 |
++ */ |
759 |
++ if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) && |
760 |
++ !crypto_memneq(key, smp->local_pk, 64)) { |
761 |
++ bt_dev_err(hdev, "Remote and local public keys are identical"); |
762 |
++ return SMP_UNSPECIFIED; |
763 |
++ } |
764 |
++ |
765 |
+ memcpy(smp->remote_pk, key, 64); |
766 |
+ |
767 |
+ if (test_bit(SMP_FLAG_REMOTE_OOB, &smp->flags)) { |
768 |
+diff --git a/sound/firewire/Kconfig b/sound/firewire/Kconfig |
769 |
+index e92a6d949847a..fdc01466d143c 100644 |
770 |
+--- a/sound/firewire/Kconfig |
771 |
++++ b/sound/firewire/Kconfig |
772 |
+@@ -36,7 +36,7 @@ config SND_OXFW |
773 |
+ * Mackie(Loud) Onyx-i series (former models) |
774 |
+ * Mackie(Loud) Onyx Satellite |
775 |
+ * Mackie(Loud) Tapco Link.Firewire |
776 |
+- * Mackie(Loud) d.2 pro/d.4 pro |
777 |
++ * Mackie(Loud) d.4 pro |
778 |
+ * Mackie(Loud) U.420/U.420d |
779 |
+ * TASCAM FireOne |
780 |
+ |
781 |
+@@ -91,7 +91,7 @@ config SND_BEBOB |
782 |
+ * PreSonus FIREBOX/FIREPOD/FP10/Inspire1394 |
783 |
+ * BridgeCo RDAudio1/Audio5 |
784 |
+ * Mackie Onyx 1220/1620/1640 (FireWire I/O Card) |
785 |
+- * Mackie d.2 (FireWire Option) |
786 |
++ * Mackie d.2 (FireWire Option) and d.2 Pro |
787 |
+ * Stanton FinalScratch 2 (ScratchAmp) |
788 |
+ * Tascam IF-FW/DM |
789 |
+ * Behringer XENIX UFX 1204/1604 |
790 |
+diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c |
791 |
+index 3a03614585974..088250ff2429c 100644 |
792 |
+--- a/sound/firewire/bebob/bebob.c |
793 |
++++ b/sound/firewire/bebob/bebob.c |
794 |
+@@ -362,7 +362,7 @@ static const struct ieee1394_device_id bebob_id_table[] = { |
795 |
+ SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010049, &spec_normal), |
796 |
+ /* Mackie, Onyx 1220/1620/1640 (Firewire I/O Card) */ |
797 |
+ SND_BEBOB_DEV_ENTRY(VEN_MACKIE2, 0x00010065, &spec_normal), |
798 |
+- /* Mackie, d.2 (Firewire Option) */ |
799 |
++ // Mackie, d.2 (Firewire option card) and d.2 Pro (the card is built-in). |
800 |
+ SND_BEBOB_DEV_ENTRY(VEN_MACKIE1, 0x00010067, &spec_normal), |
801 |
+ /* Stanton, ScratchAmp */ |
802 |
+ SND_BEBOB_DEV_ENTRY(VEN_STANTON, 0x00000001, &spec_normal), |
803 |
+diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c |
804 |
+index 588b93f20c2e2..2d310bf2f2b2e 100644 |
805 |
+--- a/sound/firewire/oxfw/oxfw.c |
806 |
++++ b/sound/firewire/oxfw/oxfw.c |
807 |
+@@ -320,7 +320,6 @@ static const struct ieee1394_device_id oxfw_id_table[] = { |
808 |
+ * Onyx-i series (former models): 0x081216 |
809 |
+ * Mackie Onyx Satellite: 0x00200f |
810 |
+ * Tapco LINK.firewire 4x6: 0x000460 |
811 |
+- * d.2 pro: Unknown |
812 |
+ * d.4 pro: Unknown |
813 |
+ * U.420: Unknown |
814 |
+ * U.420d: Unknown |
815 |
+diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c |
816 |
+index 0c7fe1418447c..b8e2391c33ff1 100644 |
817 |
+--- a/sound/isa/sb/sb8.c |
818 |
++++ b/sound/isa/sb/sb8.c |
819 |
+@@ -111,10 +111,6 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev) |
820 |
+ |
821 |
+ /* block the 0x388 port to avoid PnP conflicts */ |
822 |
+ acard->fm_res = request_region(0x388, 4, "SoundBlaster FM"); |
823 |
+- if (!acard->fm_res) { |
824 |
+- err = -EBUSY; |
825 |
+- goto _err; |
826 |
+- } |
827 |
+ |
828 |
+ if (port[dev] != SNDRV_AUTO_PORT) { |
829 |
+ if ((err = snd_sbdsp_create(card, port[dev], irq[dev], |
830 |
+diff --git a/sound/usb/midi.c b/sound/usb/midi.c |
831 |
+index df6fde6fd2b6b..2b8c56c6f2b75 100644 |
832 |
+--- a/sound/usb/midi.c |
833 |
++++ b/sound/usb/midi.c |
834 |
+@@ -1865,8 +1865,12 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi *umidi, |
835 |
+ ms_ep = find_usb_ms_endpoint_descriptor(hostep); |
836 |
+ if (!ms_ep) |
837 |
+ continue; |
838 |
++ if (ms_ep->bLength <= sizeof(*ms_ep)) |
839 |
++ continue; |
840 |
+ if (ms_ep->bNumEmbMIDIJack > 0x10) |
841 |
+ continue; |
842 |
++ if (ms_ep->bLength < sizeof(*ms_ep) + ms_ep->bNumEmbMIDIJack) |
843 |
++ continue; |
844 |
+ if (usb_endpoint_dir_out(ep)) { |
845 |
+ if (endpoints[epidx].out_ep) { |
846 |
+ if (++epidx >= MIDI_MAX_ENDPOINTS) { |