Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:4.4 commit in: /
Date: Thu, 02 Nov 2017 10:03:01
Message-Id: 1509616966.4f89508dc4a7aed0d6d9cfbfdb505a2ffd6a550c.mpagano@gentoo
1 commit: 4f89508dc4a7aed0d6d9cfbfdb505a2ffd6a550c
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 2 10:02:46 2017 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 2 10:02:46 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=4f89508d
7
8 Linux patch 4.4.96
9
10 0000_README | 4 +
11 1095_linux-4.4.96.patch | 809 ++++++++++++++++++++++++++++++++++++++++++++++++
12 2 files changed, 813 insertions(+)
13
14 diff --git a/0000_README b/0000_README
15 index 3de9efe..5d56409 100644
16 --- a/0000_README
17 +++ b/0000_README
18 @@ -423,6 +423,10 @@ Patch: 1094_linux-4.4.95.patch
19 From: http://www.kernel.org
20 Desc: Linux 4.4.95
21
22 +Patch: 1095_linux-4.4.96.patch
23 +From: http://www.kernel.org
24 +Desc: Linux 4.4.96
25 +
26 Patch: 1500_XATTR_USER_PREFIX.patch
27 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
28 Desc: Support for namespace user.pax.* on tmpfs.
29
30 diff --git a/1095_linux-4.4.96.patch b/1095_linux-4.4.96.patch
31 new file mode 100644
32 index 0000000..51487e9
33 --- /dev/null
34 +++ b/1095_linux-4.4.96.patch
35 @@ -0,0 +1,809 @@
36 +diff --git a/Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt b/Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt
37 +deleted file mode 100644
38 +index 6ec1a880ac18..000000000000
39 +--- a/Documentation/devicetree/bindings/display/bridge/ti,ths8135.txt
40 ++++ /dev/null
41 +@@ -1,46 +0,0 @@
42 +-THS8135 Video DAC
43 +------------------
44 +-
45 +-This is the binding for Texas Instruments THS8135 Video DAC bridge.
46 +-
47 +-Required properties:
48 +-
49 +-- compatible: Must be "ti,ths8135"
50 +-
51 +-Required nodes:
52 +-
53 +-This device has two video ports. Their connections are modelled using the OF
54 +-graph bindings specified in Documentation/devicetree/bindings/graph.txt.
55 +-
56 +-- Video port 0 for RGB input
57 +-- Video port 1 for VGA output
58 +-
59 +-Example
60 +--------
61 +-
62 +-vga-bridge {
63 +- compatible = "ti,ths8135";
64 +- #address-cells = <1>;
65 +- #size-cells = <0>;
66 +-
67 +- ports {
68 +- #address-cells = <1>;
69 +- #size-cells = <0>;
70 +-
71 +- port@0 {
72 +- reg = <0>;
73 +-
74 +- vga_bridge_in: endpoint {
75 +- remote-endpoint = <&lcdc_out_vga>;
76 +- };
77 +- };
78 +-
79 +- port@1 {
80 +- reg = <1>;
81 +-
82 +- vga_bridge_out: endpoint {
83 +- remote-endpoint = <&vga_con_in>;
84 +- };
85 +- };
86 +- };
87 +-};
88 +diff --git a/Makefile b/Makefile
89 +index 57e1ea2a189a..12dfe1dcbaca 100644
90 +--- a/Makefile
91 ++++ b/Makefile
92 +@@ -1,6 +1,6 @@
93 + VERSION = 4
94 + PATCHLEVEL = 4
95 +-SUBLEVEL = 95
96 ++SUBLEVEL = 96
97 + EXTRAVERSION =
98 + NAME = Blurry Fish Butt
99 +
100 +diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
101 +index ac8975a65280..abf581ade8d2 100644
102 +--- a/arch/x86/kernel/cpu/microcode/intel.c
103 ++++ b/arch/x86/kernel/cpu/microcode/intel.c
104 +@@ -990,6 +990,18 @@ static int get_ucode_fw(void *to, const void *from, size_t n)
105 + return 0;
106 + }
107 +
108 ++static bool is_blacklisted(unsigned int cpu)
109 ++{
110 ++ struct cpuinfo_x86 *c = &cpu_data(cpu);
111 ++
112 ++ if (c->x86 == 6 && c->x86_model == 79) {
113 ++ pr_err_once("late loading on model 79 is disabled.\n");
114 ++ return true;
115 ++ }
116 ++
117 ++ return false;
118 ++}
119 ++
120 + static enum ucode_state request_microcode_fw(int cpu, struct device *device,
121 + bool refresh_fw)
122 + {
123 +@@ -998,6 +1010,9 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device,
124 + const struct firmware *firmware;
125 + enum ucode_state ret;
126 +
127 ++ if (is_blacklisted(cpu))
128 ++ return UCODE_NFOUND;
129 ++
130 + sprintf(name, "intel-ucode/%02x-%02x-%02x",
131 + c->x86, c->x86_model, c->x86_mask);
132 +
133 +@@ -1022,6 +1037,9 @@ static int get_ucode_user(void *to, const void *from, size_t n)
134 + static enum ucode_state
135 + request_microcode_user(int cpu, const void __user *buf, size_t size)
136 + {
137 ++ if (is_blacklisted(cpu))
138 ++ return UCODE_NFOUND;
139 ++
140 + return generic_load_microcode(cpu, (void *)buf, size, &get_ucode_user);
141 + }
142 +
143 +diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
144 +index 681dce15fbc8..b8c50d883b2c 100644
145 +--- a/drivers/input/mouse/elan_i2c_core.c
146 ++++ b/drivers/input/mouse/elan_i2c_core.c
147 +@@ -1240,6 +1240,7 @@ static const struct acpi_device_id elan_acpi_id[] = {
148 + { "ELAN0605", 0 },
149 + { "ELAN0609", 0 },
150 + { "ELAN060B", 0 },
151 ++ { "ELAN0611", 0 },
152 + { "ELAN1000", 0 },
153 + { }
154 + };
155 +diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c
156 +index 7c18249d6c8e..8b68a210277b 100644
157 +--- a/drivers/input/tablet/gtco.c
158 ++++ b/drivers/input/tablet/gtco.c
159 +@@ -231,13 +231,17 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report,
160 +
161 + /* Walk this report and pull out the info we need */
162 + while (i < length) {
163 +- prefix = report[i];
164 +-
165 +- /* Skip over prefix */
166 +- i++;
167 ++ prefix = report[i++];
168 +
169 + /* Determine data size and save the data in the proper variable */
170 +- size = PREF_SIZE(prefix);
171 ++ size = (1U << PREF_SIZE(prefix)) >> 1;
172 ++ if (i + size > length) {
173 ++ dev_err(ddev,
174 ++ "Not enough data (need %d, have %d)\n",
175 ++ i + size, length);
176 ++ break;
177 ++ }
178 ++
179 + switch (size) {
180 + case 1:
181 + data = report[i];
182 +@@ -245,8 +249,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report,
183 + case 2:
184 + data16 = get_unaligned_le16(&report[i]);
185 + break;
186 +- case 3:
187 +- size = 4;
188 ++ case 4:
189 + data32 = get_unaligned_le32(&report[i]);
190 + break;
191 + }
192 +diff --git a/drivers/net/can/sun4i_can.c b/drivers/net/can/sun4i_can.c
193 +index 68ef0a4cd821..b0c80859f746 100644
194 +--- a/drivers/net/can/sun4i_can.c
195 ++++ b/drivers/net/can/sun4i_can.c
196 +@@ -342,7 +342,7 @@ static int sun4i_can_start(struct net_device *dev)
197 +
198 + /* enter the selected mode */
199 + mod_reg_val = readl(priv->base + SUN4I_REG_MSEL_ADDR);
200 +- if (priv->can.ctrlmode & CAN_CTRLMODE_PRESUME_ACK)
201 ++ if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
202 + mod_reg_val |= SUN4I_MSEL_LOOPBACK_MODE;
203 + else if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
204 + mod_reg_val |= SUN4I_MSEL_LISTEN_ONLY_MODE;
205 +@@ -811,7 +811,6 @@ static int sun4ican_probe(struct platform_device *pdev)
206 + priv->can.ctrlmode_supported = CAN_CTRLMODE_BERR_REPORTING |
207 + CAN_CTRLMODE_LISTENONLY |
208 + CAN_CTRLMODE_LOOPBACK |
209 +- CAN_CTRLMODE_PRESUME_ACK |
210 + CAN_CTRLMODE_3_SAMPLES;
211 + priv->base = addr;
212 + priv->clk = clk;
213 +diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c
214 +index 022bfa13ebfa..c2e2821a3346 100644
215 +--- a/drivers/net/can/usb/kvaser_usb.c
216 ++++ b/drivers/net/can/usb/kvaser_usb.c
217 +@@ -134,6 +134,7 @@ static inline bool kvaser_is_usbcan(const struct usb_device_id *id)
218 + #define CMD_RESET_ERROR_COUNTER 49
219 + #define CMD_TX_ACKNOWLEDGE 50
220 + #define CMD_CAN_ERROR_EVENT 51
221 ++#define CMD_FLUSH_QUEUE_REPLY 68
222 +
223 + #define CMD_LEAF_USB_THROTTLE 77
224 + #define CMD_LEAF_LOG_MESSAGE 106
225 +@@ -1297,6 +1298,11 @@ static void kvaser_usb_handle_message(const struct kvaser_usb *dev,
226 + goto warn;
227 + break;
228 +
229 ++ case CMD_FLUSH_QUEUE_REPLY:
230 ++ if (dev->family != KVASER_LEAF)
231 ++ goto warn;
232 ++ break;
233 ++
234 + default:
235 + warn: dev_warn(dev->udev->dev.parent,
236 + "Unhandled message (%d)\n", msg->id);
237 +@@ -1607,7 +1613,8 @@ static int kvaser_usb_close(struct net_device *netdev)
238 + if (err)
239 + netdev_warn(netdev, "Cannot flush queue, error %d\n", err);
240 +
241 +- if (kvaser_usb_send_simple_msg(dev, CMD_RESET_CHIP, priv->channel))
242 ++ err = kvaser_usb_send_simple_msg(dev, CMD_RESET_CHIP, priv->channel);
243 ++ if (err)
244 + netdev_warn(netdev, "Cannot reset card, error %d\n", err);
245 +
246 + err = kvaser_usb_stop_chip(priv);
247 +diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
248 +index 4940e8287df6..c3107358b3fb 100644
249 +--- a/drivers/regulator/fan53555.c
250 ++++ b/drivers/regulator/fan53555.c
251 +@@ -434,7 +434,10 @@ static const struct i2c_device_id fan53555_id[] = {
252 + .name = "fan53555",
253 + .driver_data = FAN53555_VENDOR_FAIRCHILD
254 + }, {
255 +- .name = "syr82x",
256 ++ .name = "syr827",
257 ++ .driver_data = FAN53555_VENDOR_SILERGY
258 ++ }, {
259 ++ .name = "syr828",
260 + .driver_data = FAN53555_VENDOR_SILERGY
261 + },
262 + { },
263 +diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
264 +index c00ac4650dce..38c8e308d4c8 100644
265 +--- a/drivers/s390/scsi/zfcp_aux.c
266 ++++ b/drivers/s390/scsi/zfcp_aux.c
267 +@@ -358,6 +358,8 @@ struct zfcp_adapter *zfcp_adapter_enqueue(struct ccw_device *ccw_device)
268 +
269 + adapter->next_port_scan = jiffies;
270 +
271 ++ adapter->erp_action.adapter = adapter;
272 ++
273 + if (zfcp_qdio_setup(adapter))
274 + goto failed;
275 +
276 +@@ -514,6 +516,9 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn,
277 + port->dev.groups = zfcp_port_attr_groups;
278 + port->dev.release = zfcp_port_release;
279 +
280 ++ port->erp_action.adapter = adapter;
281 ++ port->erp_action.port = port;
282 ++
283 + if (dev_set_name(&port->dev, "0x%016llx", (unsigned long long)wwpn)) {
284 + kfree(port);
285 + goto err_out;
286 +diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
287 +index 7ccfce559034..3b23d6754598 100644
288 +--- a/drivers/s390/scsi/zfcp_erp.c
289 ++++ b/drivers/s390/scsi/zfcp_erp.c
290 +@@ -193,9 +193,8 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,
291 + atomic_or(ZFCP_STATUS_COMMON_ERP_INUSE,
292 + &zfcp_sdev->status);
293 + erp_action = &zfcp_sdev->erp_action;
294 +- memset(erp_action, 0, sizeof(struct zfcp_erp_action));
295 +- erp_action->port = port;
296 +- erp_action->sdev = sdev;
297 ++ WARN_ON_ONCE(erp_action->port != port);
298 ++ WARN_ON_ONCE(erp_action->sdev != sdev);
299 + if (!(atomic_read(&zfcp_sdev->status) &
300 + ZFCP_STATUS_COMMON_RUNNING))
301 + act_status |= ZFCP_STATUS_ERP_CLOSE_ONLY;
302 +@@ -208,8 +207,8 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,
303 + zfcp_erp_action_dismiss_port(port);
304 + atomic_or(ZFCP_STATUS_COMMON_ERP_INUSE, &port->status);
305 + erp_action = &port->erp_action;
306 +- memset(erp_action, 0, sizeof(struct zfcp_erp_action));
307 +- erp_action->port = port;
308 ++ WARN_ON_ONCE(erp_action->port != port);
309 ++ WARN_ON_ONCE(erp_action->sdev != NULL);
310 + if (!(atomic_read(&port->status) & ZFCP_STATUS_COMMON_RUNNING))
311 + act_status |= ZFCP_STATUS_ERP_CLOSE_ONLY;
312 + break;
313 +@@ -219,7 +218,8 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,
314 + zfcp_erp_action_dismiss_adapter(adapter);
315 + atomic_or(ZFCP_STATUS_COMMON_ERP_INUSE, &adapter->status);
316 + erp_action = &adapter->erp_action;
317 +- memset(erp_action, 0, sizeof(struct zfcp_erp_action));
318 ++ WARN_ON_ONCE(erp_action->port != NULL);
319 ++ WARN_ON_ONCE(erp_action->sdev != NULL);
320 + if (!(atomic_read(&adapter->status) &
321 + ZFCP_STATUS_COMMON_RUNNING))
322 + act_status |= ZFCP_STATUS_ERP_CLOSE_ONLY;
323 +@@ -229,7 +229,11 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,
324 + return NULL;
325 + }
326 +
327 +- erp_action->adapter = adapter;
328 ++ WARN_ON_ONCE(erp_action->adapter != adapter);
329 ++ memset(&erp_action->list, 0, sizeof(erp_action->list));
330 ++ memset(&erp_action->timer, 0, sizeof(erp_action->timer));
331 ++ erp_action->step = ZFCP_ERP_STEP_UNINITIALIZED;
332 ++ erp_action->fsf_req_id = 0;
333 + erp_action->action = need;
334 + erp_action->status = act_status;
335 +
336 +diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
337 +index 9bd9b9a29dfc..a9b8104b982e 100644
338 +--- a/drivers/s390/scsi/zfcp_scsi.c
339 ++++ b/drivers/s390/scsi/zfcp_scsi.c
340 +@@ -115,10 +115,15 @@ static int zfcp_scsi_slave_alloc(struct scsi_device *sdev)
341 + struct zfcp_unit *unit;
342 + int npiv = adapter->connection_features & FSF_FEATURE_NPIV_MODE;
343 +
344 ++ zfcp_sdev->erp_action.adapter = adapter;
345 ++ zfcp_sdev->erp_action.sdev = sdev;
346 ++
347 + port = zfcp_get_port_by_wwpn(adapter, rport->port_name);
348 + if (!port)
349 + return -ENXIO;
350 +
351 ++ zfcp_sdev->erp_action.port = port;
352 ++
353 + unit = zfcp_unit_find(port, zfcp_scsi_dev_lun(sdev));
354 + if (unit)
355 + put_device(&unit->dev);
356 +diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
357 +index 39e8b5dc23fa..38f77e127349 100644
358 +--- a/drivers/scsi/sg.c
359 ++++ b/drivers/scsi/sg.c
360 +@@ -848,7 +848,7 @@ sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo)
361 +
362 + val = 0;
363 + list_for_each_entry(srp, &sfp->rq_list, entry) {
364 +- if (val > SG_MAX_QUEUE)
365 ++ if (val >= SG_MAX_QUEUE)
366 + break;
367 + rinfo[val].req_state = srp->done + 1;
368 + rinfo[val].problem =
369 +diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
370 +index a8a2d5005e6e..9df00101bfe1 100644
371 +--- a/drivers/usb/host/xhci-hub.c
372 ++++ b/drivers/usb/host/xhci-hub.c
373 +@@ -394,15 +394,25 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
374 + GFP_NOWAIT);
375 + if (!command) {
376 + spin_unlock_irqrestore(&xhci->lock, flags);
377 +- xhci_free_command(xhci, cmd);
378 +- return -ENOMEM;
379 ++ ret = -ENOMEM;
380 ++ goto cmd_cleanup;
381 ++ }
382 +
383 ++ ret = xhci_queue_stop_endpoint(xhci, command, slot_id,
384 ++ i, suspend);
385 ++ if (ret) {
386 ++ spin_unlock_irqrestore(&xhci->lock, flags);
387 ++ xhci_free_command(xhci, command);
388 ++ goto cmd_cleanup;
389 + }
390 +- xhci_queue_stop_endpoint(xhci, command, slot_id, i,
391 +- suspend);
392 + }
393 + }
394 +- xhci_queue_stop_endpoint(xhci, cmd, slot_id, 0, suspend);
395 ++ ret = xhci_queue_stop_endpoint(xhci, cmd, slot_id, 0, suspend);
396 ++ if (ret) {
397 ++ spin_unlock_irqrestore(&xhci->lock, flags);
398 ++ goto cmd_cleanup;
399 ++ }
400 ++
401 + xhci_ring_cmd_db(xhci);
402 + spin_unlock_irqrestore(&xhci->lock, flags);
403 +
404 +@@ -413,6 +423,8 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
405 + xhci_warn(xhci, "Timeout while waiting for stop endpoint command\n");
406 + ret = -ETIME;
407 + }
408 ++
409 ++cmd_cleanup:
410 + xhci_free_command(xhci, cmd);
411 + return ret;
412 + }
413 +diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
414 +index 308600adf6e0..a4d749665c9f 100644
415 +--- a/drivers/xen/gntdev.c
416 ++++ b/drivers/xen/gntdev.c
417 +@@ -827,6 +827,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma)
418 + mutex_unlock(&priv->lock);
419 +
420 + if (use_ptemod) {
421 ++ map->pages_vm_start = vma->vm_start;
422 + err = apply_to_page_range(vma->vm_mm, vma->vm_start,
423 + vma->vm_end - vma->vm_start,
424 + find_grant_ptes, map);
425 +@@ -864,7 +865,6 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma)
426 + set_grant_ptes_as_special, NULL);
427 + }
428 + #endif
429 +- map->pages_vm_start = vma->vm_start;
430 + }
431 +
432 + return 0;
433 +diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
434 +index c69e1253b47b..0e3de1bb6500 100644
435 +--- a/fs/ceph/caps.c
436 ++++ b/fs/ceph/caps.c
437 +@@ -1850,6 +1850,7 @@ static int try_flush_caps(struct inode *inode, u64 *ptid)
438 + retry:
439 + spin_lock(&ci->i_ceph_lock);
440 + if (ci->i_ceph_flags & CEPH_I_NOFLUSH) {
441 ++ spin_unlock(&ci->i_ceph_lock);
442 + dout("try_flush_caps skipping %p I_NOFLUSH set\n", inode);
443 + goto out;
444 + }
445 +@@ -1867,8 +1868,10 @@ retry:
446 + mutex_lock(&session->s_mutex);
447 + goto retry;
448 + }
449 +- if (cap->session->s_state < CEPH_MDS_SESSION_OPEN)
450 ++ if (cap->session->s_state < CEPH_MDS_SESSION_OPEN) {
451 ++ spin_unlock(&ci->i_ceph_lock);
452 + goto out;
453 ++ }
454 +
455 + flushing = __mark_caps_flushing(inode, session, &flush_tid,
456 + &oldest_flush_tid);
457 +diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
458 +index 7b39260c7bba..eae9cdb8af46 100644
459 +--- a/fs/ecryptfs/ecryptfs_kernel.h
460 ++++ b/fs/ecryptfs/ecryptfs_kernel.h
461 +@@ -84,11 +84,16 @@ struct ecryptfs_page_crypt_context {
462 + static inline struct ecryptfs_auth_tok *
463 + ecryptfs_get_encrypted_key_payload_data(struct key *key)
464 + {
465 +- if (key->type == &key_type_encrypted)
466 +- return (struct ecryptfs_auth_tok *)
467 +- (&((struct encrypted_key_payload *)key->payload.data[0])->payload_data);
468 +- else
469 ++ struct encrypted_key_payload *payload;
470 ++
471 ++ if (key->type != &key_type_encrypted)
472 + return NULL;
473 ++
474 ++ payload = key->payload.data[0];
475 ++ if (!payload)
476 ++ return ERR_PTR(-EKEYREVOKED);
477 ++
478 ++ return (struct ecryptfs_auth_tok *)payload->payload_data;
479 + }
480 +
481 + static inline struct key *ecryptfs_get_encrypted_key(char *sig)
482 +@@ -114,12 +119,17 @@ static inline struct ecryptfs_auth_tok *
483 + ecryptfs_get_key_payload_data(struct key *key)
484 + {
485 + struct ecryptfs_auth_tok *auth_tok;
486 ++ const struct user_key_payload *ukp;
487 +
488 + auth_tok = ecryptfs_get_encrypted_key_payload_data(key);
489 +- if (!auth_tok)
490 +- return (struct ecryptfs_auth_tok *)user_key_payload(key)->data;
491 +- else
492 ++ if (auth_tok)
493 + return auth_tok;
494 ++
495 ++ ukp = user_key_payload(key);
496 ++ if (!ukp)
497 ++ return ERR_PTR(-EKEYREVOKED);
498 ++
499 ++ return (struct ecryptfs_auth_tok *)ukp->data;
500 + }
501 +
502 + #define ECRYPTFS_MAX_KEYSET_SIZE 1024
503 +diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
504 +index 6bd67e2011f0..20632ee51ae5 100644
505 +--- a/fs/ecryptfs/keystore.c
506 ++++ b/fs/ecryptfs/keystore.c
507 +@@ -458,7 +458,8 @@ out:
508 + * @auth_tok_key: key containing the authentication token
509 + * @auth_tok: authentication token
510 + *
511 +- * Returns zero on valid auth tok; -EINVAL otherwise
512 ++ * Returns zero on valid auth tok; -EINVAL if the payload is invalid; or
513 ++ * -EKEYREVOKED if the key was revoked before we acquired its semaphore.
514 + */
515 + static int
516 + ecryptfs_verify_auth_tok_from_key(struct key *auth_tok_key,
517 +@@ -467,6 +468,12 @@ ecryptfs_verify_auth_tok_from_key(struct key *auth_tok_key,
518 + int rc = 0;
519 +
520 + (*auth_tok) = ecryptfs_get_key_payload_data(auth_tok_key);
521 ++ if (IS_ERR(*auth_tok)) {
522 ++ rc = PTR_ERR(*auth_tok);
523 ++ *auth_tok = NULL;
524 ++ goto out;
525 ++ }
526 ++
527 + if (ecryptfs_verify_version((*auth_tok)->version)) {
528 + printk(KERN_ERR "Data structure version mismatch. Userspace "
529 + "tools must match eCryptfs kernel module with major "
530 +diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
531 +index 4b5f2c4e69c8..5068dbf80ff8 100644
532 +--- a/fs/fuse/dir.c
533 ++++ b/fs/fuse/dir.c
534 +@@ -1295,7 +1295,8 @@ static int parse_dirplusfile(char *buf, size_t nbytes, struct file *file,
535 + */
536 + over = !dir_emit(ctx, dirent->name, dirent->namelen,
537 + dirent->ino, dirent->type);
538 +- ctx->pos = dirent->off;
539 ++ if (!over)
540 ++ ctx->pos = dirent->off;
541 + }
542 +
543 + buf += reclen;
544 +diff --git a/include/uapi/linux/spi/spidev.h b/include/uapi/linux/spi/spidev.h
545 +index dd5f21e75805..856de39d0b89 100644
546 +--- a/include/uapi/linux/spi/spidev.h
547 ++++ b/include/uapi/linux/spi/spidev.h
548 +@@ -23,6 +23,7 @@
549 + #define SPIDEV_H
550 +
551 + #include <linux/types.h>
552 ++#include <linux/ioctl.h>
553 +
554 + /* User space versions of kernel symbols for SPI clocking modes,
555 + * matching <linux/spi/spi.h>
556 +diff --git a/kernel/workqueue.c b/kernel/workqueue.c
557 +index 23231237f2e2..95cc76785a12 100644
558 +--- a/kernel/workqueue.c
559 ++++ b/kernel/workqueue.c
560 +@@ -68,6 +68,7 @@ enum {
561 + * attach_mutex to avoid changing binding state while
562 + * worker_attach_to_pool() is in progress.
563 + */
564 ++ POOL_MANAGER_ACTIVE = 1 << 0, /* being managed */
565 + POOL_DISASSOCIATED = 1 << 2, /* cpu can't serve workers */
566 +
567 + /* worker flags */
568 +@@ -163,7 +164,6 @@ struct worker_pool {
569 + /* L: hash of busy workers */
570 +
571 + /* see manage_workers() for details on the two manager mutexes */
572 +- struct mutex manager_arb; /* manager arbitration */
573 + struct worker *manager; /* L: purely informational */
574 + struct mutex attach_mutex; /* attach/detach exclusion */
575 + struct list_head workers; /* A: attached workers */
576 +@@ -295,6 +295,7 @@ static struct workqueue_attrs *wq_update_unbound_numa_attrs_buf;
577 +
578 + static DEFINE_MUTEX(wq_pool_mutex); /* protects pools and workqueues list */
579 + static DEFINE_SPINLOCK(wq_mayday_lock); /* protects wq->maydays list */
580 ++static DECLARE_WAIT_QUEUE_HEAD(wq_manager_wait); /* wait for manager to go away */
581 +
582 + static LIST_HEAD(workqueues); /* PR: list of all workqueues */
583 + static bool workqueue_freezing; /* PL: have wqs started freezing? */
584 +@@ -808,7 +809,7 @@ static bool need_to_create_worker(struct worker_pool *pool)
585 + /* Do we have too many workers and should some go away? */
586 + static bool too_many_workers(struct worker_pool *pool)
587 + {
588 +- bool managing = mutex_is_locked(&pool->manager_arb);
589 ++ bool managing = pool->flags & POOL_MANAGER_ACTIVE;
590 + int nr_idle = pool->nr_idle + managing; /* manager is considered idle */
591 + int nr_busy = pool->nr_workers - nr_idle;
592 +
593 +@@ -1952,24 +1953,17 @@ static bool manage_workers(struct worker *worker)
594 + {
595 + struct worker_pool *pool = worker->pool;
596 +
597 +- /*
598 +- * Anyone who successfully grabs manager_arb wins the arbitration
599 +- * and becomes the manager. mutex_trylock() on pool->manager_arb
600 +- * failure while holding pool->lock reliably indicates that someone
601 +- * else is managing the pool and the worker which failed trylock
602 +- * can proceed to executing work items. This means that anyone
603 +- * grabbing manager_arb is responsible for actually performing
604 +- * manager duties. If manager_arb is grabbed and released without
605 +- * actual management, the pool may stall indefinitely.
606 +- */
607 +- if (!mutex_trylock(&pool->manager_arb))
608 ++ if (pool->flags & POOL_MANAGER_ACTIVE)
609 + return false;
610 ++
611 ++ pool->flags |= POOL_MANAGER_ACTIVE;
612 + pool->manager = worker;
613 +
614 + maybe_create_worker(pool);
615 +
616 + pool->manager = NULL;
617 +- mutex_unlock(&pool->manager_arb);
618 ++ pool->flags &= ~POOL_MANAGER_ACTIVE;
619 ++ wake_up(&wq_manager_wait);
620 + return true;
621 + }
622 +
623 +@@ -3119,7 +3113,6 @@ static int init_worker_pool(struct worker_pool *pool)
624 + setup_timer(&pool->mayday_timer, pool_mayday_timeout,
625 + (unsigned long)pool);
626 +
627 +- mutex_init(&pool->manager_arb);
628 + mutex_init(&pool->attach_mutex);
629 + INIT_LIST_HEAD(&pool->workers);
630 +
631 +@@ -3189,13 +3182,15 @@ static void put_unbound_pool(struct worker_pool *pool)
632 + hash_del(&pool->hash_node);
633 +
634 + /*
635 +- * Become the manager and destroy all workers. Grabbing
636 +- * manager_arb prevents @pool's workers from blocking on
637 +- * attach_mutex.
638 ++ * Become the manager and destroy all workers. This prevents
639 ++ * @pool's workers from blocking on attach_mutex. We're the last
640 ++ * manager and @pool gets freed with the flag set.
641 + */
642 +- mutex_lock(&pool->manager_arb);
643 +-
644 + spin_lock_irq(&pool->lock);
645 ++ wait_event_lock_irq(wq_manager_wait,
646 ++ !(pool->flags & POOL_MANAGER_ACTIVE), pool->lock);
647 ++ pool->flags |= POOL_MANAGER_ACTIVE;
648 ++
649 + while ((worker = first_idle_worker(pool)))
650 + destroy_worker(worker);
651 + WARN_ON(pool->nr_workers || pool->nr_idle);
652 +@@ -3209,8 +3204,6 @@ static void put_unbound_pool(struct worker_pool *pool)
653 + if (pool->detach_completion)
654 + wait_for_completion(pool->detach_completion);
655 +
656 +- mutex_unlock(&pool->manager_arb);
657 +-
658 + /* shut down the timers */
659 + del_timer_sync(&pool->idle_timer);
660 + del_timer_sync(&pool->mayday_timer);
661 +diff --git a/lib/assoc_array.c b/lib/assoc_array.c
662 +index 59fd7c0b119c..5cd093589c5a 100644
663 +--- a/lib/assoc_array.c
664 ++++ b/lib/assoc_array.c
665 +@@ -598,21 +598,31 @@ static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit,
666 + if ((edit->segment_cache[ASSOC_ARRAY_FAN_OUT] ^ base_seg) == 0)
667 + goto all_leaves_cluster_together;
668 +
669 +- /* Otherwise we can just insert a new node ahead of the old
670 +- * one.
671 ++ /* Otherwise all the old leaves cluster in the same slot, but
672 ++ * the new leaf wants to go into a different slot - so we
673 ++ * create a new node (n0) to hold the new leaf and a pointer to
674 ++ * a new node (n1) holding all the old leaves.
675 ++ *
676 ++ * This can be done by falling through to the node splitting
677 ++ * path.
678 + */
679 +- goto present_leaves_cluster_but_not_new_leaf;
680 ++ pr_devel("present leaves cluster but not new leaf\n");
681 + }
682 +
683 + split_node:
684 + pr_devel("split node\n");
685 +
686 +- /* We need to split the current node; we know that the node doesn't
687 +- * simply contain a full set of leaves that cluster together (it
688 +- * contains meta pointers and/or non-clustering leaves).
689 ++ /* We need to split the current node. The node must contain anything
690 ++ * from a single leaf (in the one leaf case, this leaf will cluster
691 ++ * with the new leaf) and the rest meta-pointers, to all leaves, some
692 ++ * of which may cluster.
693 ++ *
694 ++ * It won't contain the case in which all the current leaves plus the
695 ++ * new leaves want to cluster in the same slot.
696 + *
697 + * We need to expel at least two leaves out of a set consisting of the
698 +- * leaves in the node and the new leaf.
699 ++ * leaves in the node and the new leaf. The current meta pointers can
700 ++ * just be copied as they shouldn't cluster with any of the leaves.
701 + *
702 + * We need a new node (n0) to replace the current one and a new node to
703 + * take the expelled nodes (n1).
704 +@@ -717,33 +727,6 @@ found_slot_for_multiple_occupancy:
705 + pr_devel("<--%s() = ok [split node]\n", __func__);
706 + return true;
707 +
708 +-present_leaves_cluster_but_not_new_leaf:
709 +- /* All the old leaves cluster in the same slot, but the new leaf wants
710 +- * to go into a different slot, so we create a new node to hold the new
711 +- * leaf and a pointer to a new node holding all the old leaves.
712 +- */
713 +- pr_devel("present leaves cluster but not new leaf\n");
714 +-
715 +- new_n0->back_pointer = node->back_pointer;
716 +- new_n0->parent_slot = node->parent_slot;
717 +- new_n0->nr_leaves_on_branch = node->nr_leaves_on_branch;
718 +- new_n1->back_pointer = assoc_array_node_to_ptr(new_n0);
719 +- new_n1->parent_slot = edit->segment_cache[0];
720 +- new_n1->nr_leaves_on_branch = node->nr_leaves_on_branch;
721 +- edit->adjust_count_on = new_n0;
722 +-
723 +- for (i = 0; i < ASSOC_ARRAY_FAN_OUT; i++)
724 +- new_n1->slots[i] = node->slots[i];
725 +-
726 +- new_n0->slots[edit->segment_cache[0]] = assoc_array_node_to_ptr(new_n0);
727 +- edit->leaf_p = &new_n0->slots[edit->segment_cache[ASSOC_ARRAY_FAN_OUT]];
728 +-
729 +- edit->set[0].ptr = &assoc_array_ptr_to_node(node->back_pointer)->slots[node->parent_slot];
730 +- edit->set[0].to = assoc_array_node_to_ptr(new_n0);
731 +- edit->excised_meta[0] = assoc_array_node_to_ptr(node);
732 +- pr_devel("<--%s() = ok [insert node before]\n", __func__);
733 +- return true;
734 +-
735 + all_leaves_cluster_together:
736 + /* All the leaves, new and old, want to cluster together in this node
737 + * in the same slot, so we have to replace this node with a shortcut to
738 +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
739 +index 5cab24f52825..a83688f8672e 100644
740 +--- a/sound/pci/hda/patch_realtek.c
741 ++++ b/sound/pci/hda/patch_realtek.c
742 +@@ -329,6 +329,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
743 + break;
744 + case 0x10ec0225:
745 + case 0x10ec0233:
746 ++ case 0x10ec0236:
747 + case 0x10ec0255:
748 + case 0x10ec0256:
749 + case 0x10ec0282:
750 +@@ -909,6 +910,7 @@ static struct alc_codec_rename_pci_table rename_pci_tbl[] = {
751 + { 0x10ec0275, 0x1028, 0, "ALC3260" },
752 + { 0x10ec0899, 0x1028, 0, "ALC3861" },
753 + { 0x10ec0298, 0x1028, 0, "ALC3266" },
754 ++ { 0x10ec0236, 0x1028, 0, "ALC3204" },
755 + { 0x10ec0256, 0x1028, 0, "ALC3246" },
756 + { 0x10ec0225, 0x1028, 0, "ALC3253" },
757 + { 0x10ec0295, 0x1028, 0, "ALC3254" },
758 +@@ -3694,6 +3696,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
759 + alc_process_coef_fw(codec, coef0255_1);
760 + alc_process_coef_fw(codec, coef0255);
761 + break;
762 ++ case 0x10ec0236:
763 + case 0x10ec0256:
764 + alc_process_coef_fw(codec, coef0256);
765 + alc_process_coef_fw(codec, coef0255);
766 +@@ -3774,6 +3777,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
767 +
768 +
769 + switch (codec->core.vendor_id) {
770 ++ case 0x10ec0236:
771 + case 0x10ec0255:
772 + case 0x10ec0256:
773 + alc_write_coef_idx(codec, 0x45, 0xc489);
774 +@@ -3879,6 +3883,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
775 + case 0x10ec0295:
776 + alc_process_coef_fw(codec, coef0225);
777 + break;
778 ++ case 0x10ec0236:
779 + case 0x10ec0255:
780 + case 0x10ec0256:
781 + alc_process_coef_fw(codec, coef0255);
782 +@@ -3962,6 +3967,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
783 + case 0x10ec0255:
784 + alc_process_coef_fw(codec, coef0255);
785 + break;
786 ++ case 0x10ec0236:
787 + case 0x10ec0256:
788 + alc_process_coef_fw(codec, coef0256);
789 + break;
790 +@@ -4052,6 +4058,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
791 + case 0x10ec0255:
792 + alc_process_coef_fw(codec, coef0255);
793 + break;
794 ++ case 0x10ec0236:
795 + case 0x10ec0256:
796 + alc_process_coef_fw(codec, coef0256);
797 + break;
798 +@@ -4119,6 +4126,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
799 + };
800 +
801 + switch (codec->core.vendor_id) {
802 ++ case 0x10ec0236:
803 + case 0x10ec0255:
804 + case 0x10ec0256:
805 + alc_process_coef_fw(codec, coef0255);
806 +@@ -4320,6 +4328,7 @@ static void alc255_set_default_jack_type(struct hda_codec *codec)
807 + case 0x10ec0255:
808 + alc_process_coef_fw(codec, alc255fw);
809 + break;
810 ++ case 0x10ec0236:
811 + case 0x10ec0256:
812 + alc_process_coef_fw(codec, alc256fw);
813 + break;
814 +@@ -5834,6 +5843,14 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
815 + ALC225_STANDARD_PINS,
816 + {0x12, 0xb7a60130},
817 + {0x1b, 0x90170110}),
818 ++ SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
819 ++ {0x12, 0x90a60140},
820 ++ {0x14, 0x90170110},
821 ++ {0x21, 0x02211020}),
822 ++ SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
823 ++ {0x12, 0x90a60140},
824 ++ {0x14, 0x90170150},
825 ++ {0x21, 0x02211020}),
826 + SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
827 + {0x14, 0x90170110},
828 + {0x21, 0x02211020}),
829 +@@ -6208,6 +6225,7 @@ static int patch_alc269(struct hda_codec *codec)
830 + case 0x10ec0255:
831 + spec->codec_variant = ALC269_TYPE_ALC255;
832 + break;
833 ++ case 0x10ec0236:
834 + case 0x10ec0256:
835 + spec->codec_variant = ALC269_TYPE_ALC256;
836 + spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
837 +@@ -7147,6 +7165,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
838 + HDA_CODEC_ENTRY(0x10ec0233, "ALC233", patch_alc269),
839 + HDA_CODEC_ENTRY(0x10ec0234, "ALC234", patch_alc269),
840 + HDA_CODEC_ENTRY(0x10ec0235, "ALC233", patch_alc269),
841 ++ HDA_CODEC_ENTRY(0x10ec0236, "ALC236", patch_alc269),
842 + HDA_CODEC_ENTRY(0x10ec0255, "ALC255", patch_alc269),
843 + HDA_CODEC_ENTRY(0x10ec0256, "ALC256", patch_alc269),
844 + HDA_CODEC_ENTRY(0x10ec0260, "ALC260", patch_alc260),