Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:3.18 commit in: /
Date: Sun, 31 Jul 2016 15:27:25
Message-Id: 1469978826.3d17cc6a46a7b90b3002170d6b61600732112f22.mpagano@gentoo
1 commit: 3d17cc6a46a7b90b3002170d6b61600732112f22
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 31 15:27:06 2016 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 31 15:27:06 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=3d17cc6a
7
8 Linux patch 3.18.38
9
10 0000_README | 4 +
11 1037_linux-3.18.38.patch | 360 +++++++++++++++++++++++++++++++++++++++++++++++
12 2 files changed, 364 insertions(+)
13
14 diff --git a/0000_README b/0000_README
15 index 35319e8..b5306ef 100644
16 --- a/0000_README
17 +++ b/0000_README
18 @@ -191,6 +191,10 @@ Patch: 1036_linux-3.18.37.patch
19 From: http://www.kernel.org
20 Desc: Linux 3.18.37
21
22 +Patch: 1037_linux-3.18.38.patch
23 +From: http://www.kernel.org
24 +Desc: Linux 3.18.38
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/1037_linux-3.18.38.patch b/1037_linux-3.18.38.patch
31 new file mode 100644
32 index 0000000..35be23d
33 --- /dev/null
34 +++ b/1037_linux-3.18.38.patch
35 @@ -0,0 +1,360 @@
36 +diff --git a/Makefile b/Makefile
37 +index e6953a43fe64..2940c7532661 100644
38 +--- a/Makefile
39 ++++ b/Makefile
40 +@@ -1,6 +1,6 @@
41 + VERSION = 3
42 + PATCHLEVEL = 18
43 +-SUBLEVEL = 37
44 ++SUBLEVEL = 38
45 + EXTRAVERSION =
46 + NAME = Diseased Newt
47 +
48 +diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
49 +index 060fc2e50cd2..825dd09e80a4 100644
50 +--- a/arch/mips/include/asm/pgtable.h
51 ++++ b/arch/mips/include/asm/pgtable.h
52 +@@ -596,7 +596,8 @@ static inline struct page *pmd_page(pmd_t pmd)
53 +
54 + static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
55 + {
56 +- pmd_val(pmd) = (pmd_val(pmd) & _PAGE_CHG_MASK) | pgprot_val(newprot);
57 ++ pmd_val(pmd) = (pmd_val(pmd) & (_PAGE_CHG_MASK | _PAGE_HUGE)) |
58 ++ (pgprot_val(newprot) & ~_PAGE_CHG_MASK);
59 + return pmd;
60 + }
61 +
62 +diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
63 +index 7a218ab7e941..269ae9b58d74 100644
64 +--- a/arch/powerpc/kernel/prom.c
65 ++++ b/arch/powerpc/kernel/prom.c
66 +@@ -166,8 +166,7 @@ static struct ibm_pa_feature {
67 + * we don't want to turn on TM here, so we use the *_COMP versions
68 + * which are 0 if the kernel doesn't support TM.
69 + */
70 +- {CPU_FTR_TM_COMP, 0, 0,
71 +- PPC_FEATURE2_HTM_COMP|PPC_FEATURE2_HTM_NOSC_COMP, 22, 0, 0},
72 ++ {CPU_FTR_TM_COMP, 0, 0, PPC_FEATURE2_HTM_COMP, 22, 0, 0},
73 + };
74 +
75 + static void __init scan_features(unsigned long node, const unsigned char *ftrs,
76 +diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
77 +index f04dbb3069b8..29f0c55d6efc 100644
78 +--- a/arch/x86/kernel/amd_nb.c
79 ++++ b/arch/x86/kernel/amd_nb.c
80 +@@ -69,8 +69,8 @@ int amd_cache_northbridges(void)
81 + while ((misc = next_northbridge(misc, amd_nb_misc_ids)) != NULL)
82 + i++;
83 +
84 +- if (i == 0)
85 +- return 0;
86 ++ if (!i)
87 ++ return -ENODEV;
88 +
89 + nb = kzalloc(i * sizeof(struct amd_northbridge), GFP_KERNEL);
90 + if (!nb)
91 +diff --git a/block/ioprio.c b/block/ioprio.c
92 +index 31666c92b46a..563435684c3c 100644
93 +--- a/block/ioprio.c
94 ++++ b/block/ioprio.c
95 +@@ -149,8 +149,10 @@ static int get_task_ioprio(struct task_struct *p)
96 + if (ret)
97 + goto out;
98 + ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM);
99 ++ task_lock(p);
100 + if (p->io_context)
101 + ret = p->io_context->ioprio;
102 ++ task_unlock(p);
103 + out:
104 + return ret;
105 + }
106 +diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
107 +index c2679bfe7f66..d23138b87af3 100644
108 +--- a/drivers/s390/net/qeth_l2_main.c
109 ++++ b/drivers/s390/net/qeth_l2_main.c
110 +@@ -911,6 +911,7 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev)
111 + qeth_l2_set_offline(cgdev);
112 +
113 + if (card->dev) {
114 ++ netif_napi_del(&card->napi);
115 + unregister_netdev(card->dev);
116 + card->dev = NULL;
117 + }
118 +diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
119 +index afebb9709763..0513d11b741e 100644
120 +--- a/drivers/s390/net/qeth_l3_main.c
121 ++++ b/drivers/s390/net/qeth_l3_main.c
122 +@@ -3337,6 +3337,7 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev)
123 + qeth_l3_set_offline(cgdev);
124 +
125 + if (card->dev) {
126 ++ netif_napi_del(&card->napi);
127 + unregister_netdev(card->dev);
128 + card->dev = NULL;
129 + }
130 +diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
131 +index f2e1b92eb314..105adb4cf6a8 100644
132 +--- a/drivers/scsi/ipr.c
133 ++++ b/drivers/scsi/ipr.c
134 +@@ -9759,6 +9759,7 @@ static int ipr_probe_ioa(struct pci_dev *pdev,
135 + ioa_cfg->intr_flag = IPR_USE_MSI;
136 + else {
137 + ioa_cfg->intr_flag = IPR_USE_LSI;
138 ++ ioa_cfg->clear_isr = 1;
139 + ioa_cfg->nvectors = 1;
140 + dev_info(&pdev->dev, "Cannot enable MSI.\n");
141 + }
142 +diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c
143 +index 59fc190f1e92..b96e207bf250 100644
144 +--- a/drivers/xen/xen-acpi-processor.c
145 ++++ b/drivers/xen/xen-acpi-processor.c
146 +@@ -423,36 +423,7 @@ upload:
147 +
148 + return 0;
149 + }
150 +-static int __init check_prereq(void)
151 +-{
152 +- struct cpuinfo_x86 *c = &cpu_data(0);
153 +-
154 +- if (!xen_initial_domain())
155 +- return -ENODEV;
156 +-
157 +- if (!acpi_gbl_FADT.smi_command)
158 +- return -ENODEV;
159 +-
160 +- if (c->x86_vendor == X86_VENDOR_INTEL) {
161 +- if (!cpu_has(c, X86_FEATURE_EST))
162 +- return -ENODEV;
163 +
164 +- return 0;
165 +- }
166 +- if (c->x86_vendor == X86_VENDOR_AMD) {
167 +- /* Copied from powernow-k8.h, can't include ../cpufreq/powernow
168 +- * as we get compile warnings for the static functions.
169 +- */
170 +-#define CPUID_FREQ_VOLT_CAPABILITIES 0x80000007
171 +-#define USE_HW_PSTATE 0x00000080
172 +- u32 eax, ebx, ecx, edx;
173 +- cpuid(CPUID_FREQ_VOLT_CAPABILITIES, &eax, &ebx, &ecx, &edx);
174 +- if ((edx & USE_HW_PSTATE) != USE_HW_PSTATE)
175 +- return -ENODEV;
176 +- return 0;
177 +- }
178 +- return -ENODEV;
179 +-}
180 + /* acpi_perf_data is a pointer to percpu data. */
181 + static struct acpi_processor_performance __percpu *acpi_perf_data;
182 +
183 +@@ -509,10 +480,10 @@ struct notifier_block xen_acpi_processor_resume_nb = {
184 + static int __init xen_acpi_processor_init(void)
185 + {
186 + unsigned int i;
187 +- int rc = check_prereq();
188 ++ int rc;
189 +
190 +- if (rc)
191 +- return rc;
192 ++ if (!xen_initial_domain())
193 ++ return -ENODEV;
194 +
195 + nr_acpi_bits = get_max_acpi_id() + 1;
196 + acpi_ids_done = kcalloc(BITS_TO_LONGS(nr_acpi_bits), sizeof(unsigned long), GFP_KERNEL);
197 +diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c
198 +index 85534ea63555..531e76474983 100644
199 +--- a/drivers/xen/xenbus/xenbus_dev_frontend.c
200 ++++ b/drivers/xen/xenbus/xenbus_dev_frontend.c
201 +@@ -316,26 +316,31 @@ static int xenbus_write_transaction(unsigned msg_type,
202 + rc = -ENOMEM;
203 + goto out;
204 + }
205 ++ } else {
206 ++ list_for_each_entry(trans, &u->transactions, list)
207 ++ if (trans->handle.id == u->u.msg.tx_id)
208 ++ break;
209 ++ if (&trans->list == &u->transactions)
210 ++ return -ESRCH;
211 + }
212 +
213 + reply = xenbus_dev_request_and_reply(&u->u.msg);
214 + if (IS_ERR(reply)) {
215 +- kfree(trans);
216 ++ if (msg_type == XS_TRANSACTION_START)
217 ++ kfree(trans);
218 + rc = PTR_ERR(reply);
219 + goto out;
220 + }
221 +
222 + if (msg_type == XS_TRANSACTION_START) {
223 +- trans->handle.id = simple_strtoul(reply, NULL, 0);
224 +-
225 +- list_add(&trans->list, &u->transactions);
226 +- } else if (msg_type == XS_TRANSACTION_END) {
227 +- list_for_each_entry(trans, &u->transactions, list)
228 +- if (trans->handle.id == u->u.msg.tx_id)
229 +- break;
230 +- BUG_ON(&trans->list == &u->transactions);
231 ++ if (u->u.msg.type == XS_ERROR)
232 ++ kfree(trans);
233 ++ else {
234 ++ trans->handle.id = simple_strtoul(reply, NULL, 0);
235 ++ list_add(&trans->list, &u->transactions);
236 ++ }
237 ++ } else if (u->u.msg.type == XS_TRANSACTION_END) {
238 + list_del(&trans->list);
239 +-
240 + kfree(trans);
241 + }
242 +
243 +diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
244 +index ba804f3d8278..ce65591b4168 100644
245 +--- a/drivers/xen/xenbus/xenbus_xs.c
246 ++++ b/drivers/xen/xenbus/xenbus_xs.c
247 +@@ -250,9 +250,6 @@ void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
248 +
249 + mutex_unlock(&xs_state.request_mutex);
250 +
251 +- if (IS_ERR(ret))
252 +- return ret;
253 +-
254 + if ((msg->type == XS_TRANSACTION_END) ||
255 + ((req_msg.type == XS_TRANSACTION_START) &&
256 + (msg->type == XS_ERROR)))
257 +diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c
258 +index 77a3db3791c7..c02f52cfe64a 100644
259 +--- a/fs/ecryptfs/file.c
260 ++++ b/fs/ecryptfs/file.c
261 +@@ -177,6 +177,19 @@ out:
262 + return rc;
263 + }
264 +
265 ++static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma)
266 ++{
267 ++ struct file *lower_file = ecryptfs_file_to_lower(file);
268 ++ /*
269 ++ * Don't allow mmap on top of file systems that don't support it
270 ++ * natively. If FILESYSTEM_MAX_STACK_DEPTH > 2 or ecryptfs
271 ++ * allows recursive mounting, this will need to be extended.
272 ++ */
273 ++ if (!lower_file->f_op->mmap)
274 ++ return -ENODEV;
275 ++ return generic_file_mmap(file, vma);
276 ++}
277 ++
278 + /**
279 + * ecryptfs_open
280 + * @inode: inode speciying file to open
281 +@@ -374,7 +387,7 @@ const struct file_operations ecryptfs_main_fops = {
282 + #ifdef CONFIG_COMPAT
283 + .compat_ioctl = ecryptfs_compat_ioctl,
284 + #endif
285 +- .mmap = generic_file_mmap,
286 ++ .mmap = ecryptfs_mmap,
287 + .open = ecryptfs_open,
288 + .flush = ecryptfs_flush,
289 + .release = ecryptfs_release,
290 +diff --git a/fs/ecryptfs/kthread.c b/fs/ecryptfs/kthread.c
291 +index 9b661a4ccee7..f1ea610362c6 100644
292 +--- a/fs/ecryptfs/kthread.c
293 ++++ b/fs/ecryptfs/kthread.c
294 +@@ -25,7 +25,6 @@
295 + #include <linux/slab.h>
296 + #include <linux/wait.h>
297 + #include <linux/mount.h>
298 +-#include <linux/file.h>
299 + #include "ecryptfs_kernel.h"
300 +
301 + struct ecryptfs_open_req {
302 +@@ -148,7 +147,7 @@ int ecryptfs_privileged_open(struct file **lower_file,
303 + flags |= IS_RDONLY(lower_dentry->d_inode) ? O_RDONLY : O_RDWR;
304 + (*lower_file) = dentry_open(&req.path, flags, cred);
305 + if (!IS_ERR(*lower_file))
306 +- goto have_file;
307 ++ goto out;
308 + if ((flags & O_ACCMODE) == O_RDONLY) {
309 + rc = PTR_ERR((*lower_file));
310 + goto out;
311 +@@ -166,16 +165,8 @@ int ecryptfs_privileged_open(struct file **lower_file,
312 + mutex_unlock(&ecryptfs_kthread_ctl.mux);
313 + wake_up(&ecryptfs_kthread_ctl.wait);
314 + wait_for_completion(&req.done);
315 +- if (IS_ERR(*lower_file)) {
316 ++ if (IS_ERR(*lower_file))
317 + rc = PTR_ERR(*lower_file);
318 +- goto out;
319 +- }
320 +-have_file:
321 +- if ((*lower_file)->f_op->mmap == NULL) {
322 +- fput(*lower_file);
323 +- *lower_file = NULL;
324 +- rc = -EMEDIUMTYPE;
325 +- }
326 + out:
327 + return rc;
328 + }
329 +diff --git a/mm/swap.c b/mm/swap.c
330 +index 9ccec11ed3fb..e657ba642e5e 100644
331 +--- a/mm/swap.c
332 ++++ b/mm/swap.c
333 +@@ -623,7 +623,7 @@ static void __lru_cache_add(struct page *page)
334 + struct pagevec *pvec = &get_cpu_var(lru_add_pvec);
335 +
336 + page_cache_get(page);
337 +- if (!pagevec_space(pvec) || PageCompound(page))
338 ++ if (!pagevec_add(pvec, page) || PageCompound(page))
339 + __pagevec_lru_add(pvec);
340 + put_cpu_var(lru_add_pvec);
341 + }
342 +diff --git a/sound/core/timer.c b/sound/core/timer.c
343 +index 2fd0dccf8505..5c769ea59b68 100644
344 +--- a/sound/core/timer.c
345 ++++ b/sound/core/timer.c
346 +@@ -1959,6 +1959,7 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer,
347 +
348 + qhead = tu->qhead++;
349 + tu->qhead %= tu->queue_size;
350 ++ tu->qused--;
351 + spin_unlock_irq(&tu->qlock);
352 +
353 + if (tu->tread) {
354 +@@ -1972,7 +1973,6 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer,
355 + }
356 +
357 + spin_lock_irq(&tu->qlock);
358 +- tu->qused--;
359 + if (err < 0)
360 + goto _error;
361 + result += unit;
362 +diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c
363 +index 72e81286b70e..8eae95acc09c 100644
364 +--- a/sound/pci/au88x0/au88x0_core.c
365 ++++ b/sound/pci/au88x0/au88x0_core.c
366 +@@ -1442,9 +1442,8 @@ static int vortex_wtdma_bufshift(vortex_t * vortex, int wtdma)
367 + int page, p, pp, delta, i;
368 +
369 + page =
370 +- (hwread(vortex->mmio, VORTEX_WTDMA_STAT + (wtdma << 2)) &
371 +- WT_SUBBUF_MASK)
372 +- >> WT_SUBBUF_SHIFT;
373 ++ (hwread(vortex->mmio, VORTEX_WTDMA_STAT + (wtdma << 2))
374 ++ >> WT_SUBBUF_SHIFT) & WT_SUBBUF_MASK;
375 + if (dma->nr_periods >= 4)
376 + delta = (page - dma->period_real) & 3;
377 + else {
378 +diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
379 +index 631aaa4046ad..3a1fe2c79b4a 100644
380 +--- a/sound/pci/echoaudio/echoaudio.c
381 ++++ b/sound/pci/echoaudio/echoaudio.c
382 +@@ -2247,11 +2247,11 @@ static int snd_echo_resume(struct device *dev)
383 +
384 + DE_INIT(("resume start\n"));
385 + pci_restore_state(pci);
386 +- commpage_bak = kmalloc(sizeof(struct echoaudio), GFP_KERNEL);
387 ++ commpage_bak = kmalloc(sizeof(*commpage), GFP_KERNEL);
388 + if (commpage_bak == NULL)
389 + return -ENOMEM;
390 + commpage = chip->comm_page;
391 +- memcpy(commpage_bak, commpage, sizeof(struct comm_page));
392 ++ memcpy(commpage_bak, commpage, sizeof(*commpage));
393 +
394 + err = init_hw(chip, chip->pci->device, chip->pci->subsystem_device);
395 + if (err < 0) {