1 |
commit: 5607de60d2a17294b70fc775bd73ba4ec16dc856 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 2 20:52:16 2013 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 2 20:52:16 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-patchset.git;a=commit;h=5607de60 |
7 |
|
8 |
Grsec/PaX: 3.0-{3.2.53,3.12.2}-201312011111 |
9 |
|
10 |
--- |
11 |
{3.12.1 => 3.12.2}/0000_README | 6 +- |
12 |
3.12.2/1001_linux-3.12.2.patch | 3790 ++++++++++++++++++++ |
13 |
.../4420_grsecurity-3.0-3.12.2-201312011111.patch | 375 +- |
14 |
{3.12.1 => 3.12.2}/4425_grsec_remove_EI_PAX.patch | 0 |
15 |
.../4427_force_XATTR_PAX_tmpfs.patch | 0 |
16 |
.../4430_grsec-remove-localversion-grsec.patch | 0 |
17 |
{3.12.1 => 3.12.2}/4435_grsec-mute-warnings.patch | 0 |
18 |
.../4440_grsec-remove-protected-paths.patch | 0 |
19 |
.../4450_grsec-kconfig-default-gids.patch | 0 |
20 |
.../4465_selinux-avc_audit-log-curr_ip.patch | 0 |
21 |
{3.12.1 => 3.12.2}/4470_disable-compat_vdso.patch | 0 |
22 |
{3.12.1 => 3.12.2}/4475_emutramp_default_on.patch | 0 |
23 |
{3.2.52 => 3.2.53}/0000_README | 14 +- |
24 |
{3.2.52 => 3.2.53}/1021_linux-3.2.22.patch | 0 |
25 |
{3.2.52 => 3.2.53}/1022_linux-3.2.23.patch | 0 |
26 |
{3.2.52 => 3.2.53}/1023_linux-3.2.24.patch | 0 |
27 |
{3.2.52 => 3.2.53}/1024_linux-3.2.25.patch | 0 |
28 |
{3.2.52 => 3.2.53}/1025_linux-3.2.26.patch | 0 |
29 |
{3.2.52 => 3.2.53}/1026_linux-3.2.27.patch | 0 |
30 |
{3.2.52 => 3.2.53}/1027_linux-3.2.28.patch | 0 |
31 |
{3.2.52 => 3.2.53}/1028_linux-3.2.29.patch | 0 |
32 |
{3.2.52 => 3.2.53}/1029_linux-3.2.30.patch | 0 |
33 |
{3.2.52 => 3.2.53}/1030_linux-3.2.31.patch | 0 |
34 |
{3.2.52 => 3.2.53}/1031_linux-3.2.32.patch | 0 |
35 |
{3.2.52 => 3.2.53}/1032_linux-3.2.33.patch | 0 |
36 |
{3.2.52 => 3.2.53}/1033_linux-3.2.34.patch | 0 |
37 |
{3.2.52 => 3.2.53}/1034_linux-3.2.35.patch | 0 |
38 |
{3.2.52 => 3.2.53}/1035_linux-3.2.36.patch | 0 |
39 |
{3.2.52 => 3.2.53}/1036_linux-3.2.37.patch | 0 |
40 |
{3.2.52 => 3.2.53}/1037_linux-3.2.38.patch | 0 |
41 |
{3.2.52 => 3.2.53}/1038_linux-3.2.39.patch | 0 |
42 |
{3.2.52 => 3.2.53}/1039_linux-3.2.40.patch | 0 |
43 |
{3.2.52 => 3.2.53}/1040_linux-3.2.41.patch | 0 |
44 |
{3.2.52 => 3.2.53}/1041_linux-3.2.42.patch | 0 |
45 |
{3.2.52 => 3.2.53}/1042_linux-3.2.43.patch | 0 |
46 |
{3.2.52 => 3.2.53}/1043_linux-3.2.44.patch | 0 |
47 |
{3.2.52 => 3.2.53}/1044_linux-3.2.45.patch | 0 |
48 |
{3.2.52 => 3.2.53}/1045_linux-3.2.46.patch | 0 |
49 |
{3.2.52 => 3.2.53}/1046_linux-3.2.47.patch | 0 |
50 |
{3.2.52 => 3.2.53}/1047_linux-3.2.48.patch | 0 |
51 |
{3.2.52 => 3.2.53}/1048_linux-3.2.49.patch | 0 |
52 |
{3.2.52 => 3.2.53}/1049_linux-3.2.50.patch | 0 |
53 |
{3.2.52 => 3.2.53}/1050_linux-3.2.51.patch | 0 |
54 |
{3.2.52 => 3.2.53}/1051_linux-3.2.52.patch | 0 |
55 |
3.2.53/1052_linux-3.2.53.patch | 3357 +++++++++++++++++ |
56 |
.../4420_grsecurity-3.0-3.2.53-201312011108.patch | 848 +---- |
57 |
{3.2.52 => 3.2.53}/4425_grsec_remove_EI_PAX.patch | 0 |
58 |
.../4427_force_XATTR_PAX_tmpfs.patch | 0 |
59 |
.../4430_grsec-remove-localversion-grsec.patch | 0 |
60 |
{3.2.52 => 3.2.53}/4435_grsec-mute-warnings.patch | 0 |
61 |
.../4440_grsec-remove-protected-paths.patch | 0 |
62 |
.../4450_grsec-kconfig-default-gids.patch | 0 |
63 |
.../4465_selinux-avc_audit-log-curr_ip.patch | 0 |
64 |
{3.2.52 => 3.2.53}/4470_disable-compat_vdso.patch | 0 |
65 |
{3.2.52 => 3.2.53}/4475_emutramp_default_on.patch | 0 |
66 |
55 files changed, 7399 insertions(+), 991 deletions(-) |
67 |
|
68 |
diff --git a/3.12.1/0000_README b/3.12.2/0000_README |
69 |
similarity index 92% |
70 |
rename from 3.12.1/0000_README |
71 |
rename to 3.12.2/0000_README |
72 |
index 00a2158..21d2546 100644 |
73 |
--- a/3.12.1/0000_README |
74 |
+++ b/3.12.2/0000_README |
75 |
@@ -2,7 +2,11 @@ README |
76 |
----------------------------------------------------------------------------- |
77 |
Individual Patch Descriptions: |
78 |
----------------------------------------------------------------------------- |
79 |
-Patch: 4420_grsecurity-3.0-3.12.1-201311261522.patch |
80 |
+Patch: 1001_linux-3.12.2.patch |
81 |
+From: http://www.kernel.org |
82 |
+Desc: Linux 3.12.2 |
83 |
+ |
84 |
+Patch: 4420_grsecurity-3.0-3.12.2-201312011111.patch |
85 |
From: http://www.grsecurity.net |
86 |
Desc: hardened-sources base patch from upstream grsecurity |
87 |
|
88 |
|
89 |
diff --git a/3.12.2/1001_linux-3.12.2.patch b/3.12.2/1001_linux-3.12.2.patch |
90 |
new file mode 100644 |
91 |
index 0000000..8b40733 |
92 |
--- /dev/null |
93 |
+++ b/3.12.2/1001_linux-3.12.2.patch |
94 |
@@ -0,0 +1,3790 @@ |
95 |
+diff --git a/Makefile b/Makefile |
96 |
+index eb29ec7..e6e72b6 100644 |
97 |
+--- a/Makefile |
98 |
++++ b/Makefile |
99 |
+@@ -1,6 +1,6 @@ |
100 |
+ VERSION = 3 |
101 |
+ PATCHLEVEL = 12 |
102 |
+-SUBLEVEL = 1 |
103 |
++SUBLEVEL = 2 |
104 |
+ EXTRAVERSION = |
105 |
+ NAME = One Giant Leap for Frogkind |
106 |
+ |
107 |
+diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c |
108 |
+index b0de86b..cb79a5d 100644 |
109 |
+--- a/arch/arm/kvm/mmu.c |
110 |
++++ b/arch/arm/kvm/mmu.c |
111 |
+@@ -307,6 +307,17 @@ out: |
112 |
+ return err; |
113 |
+ } |
114 |
+ |
115 |
++static phys_addr_t kvm_kaddr_to_phys(void *kaddr) |
116 |
++{ |
117 |
++ if (!is_vmalloc_addr(kaddr)) { |
118 |
++ BUG_ON(!virt_addr_valid(kaddr)); |
119 |
++ return __pa(kaddr); |
120 |
++ } else { |
121 |
++ return page_to_phys(vmalloc_to_page(kaddr)) + |
122 |
++ offset_in_page(kaddr); |
123 |
++ } |
124 |
++} |
125 |
++ |
126 |
+ /** |
127 |
+ * create_hyp_mappings - duplicate a kernel virtual address range in Hyp mode |
128 |
+ * @from: The virtual kernel start address of the range |
129 |
+@@ -318,16 +329,27 @@ out: |
130 |
+ */ |
131 |
+ int create_hyp_mappings(void *from, void *to) |
132 |
+ { |
133 |
+- unsigned long phys_addr = virt_to_phys(from); |
134 |
++ phys_addr_t phys_addr; |
135 |
++ unsigned long virt_addr; |
136 |
+ unsigned long start = KERN_TO_HYP((unsigned long)from); |
137 |
+ unsigned long end = KERN_TO_HYP((unsigned long)to); |
138 |
+ |
139 |
+- /* Check for a valid kernel memory mapping */ |
140 |
+- if (!virt_addr_valid(from) || !virt_addr_valid(to - 1)) |
141 |
+- return -EINVAL; |
142 |
++ start = start & PAGE_MASK; |
143 |
++ end = PAGE_ALIGN(end); |
144 |
+ |
145 |
+- return __create_hyp_mappings(hyp_pgd, start, end, |
146 |
+- __phys_to_pfn(phys_addr), PAGE_HYP); |
147 |
++ for (virt_addr = start; virt_addr < end; virt_addr += PAGE_SIZE) { |
148 |
++ int err; |
149 |
++ |
150 |
++ phys_addr = kvm_kaddr_to_phys(from + virt_addr - start); |
151 |
++ err = __create_hyp_mappings(hyp_pgd, virt_addr, |
152 |
++ virt_addr + PAGE_SIZE, |
153 |
++ __phys_to_pfn(phys_addr), |
154 |
++ PAGE_HYP); |
155 |
++ if (err) |
156 |
++ return err; |
157 |
++ } |
158 |
++ |
159 |
++ return 0; |
160 |
+ } |
161 |
+ |
162 |
+ /** |
163 |
+diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c |
164 |
+index d9ee0ff..3d5db8c 100644 |
165 |
+--- a/arch/arm/mach-omap2/omap_hwmod.c |
166 |
++++ b/arch/arm/mach-omap2/omap_hwmod.c |
167 |
+@@ -2361,21 +2361,23 @@ static struct device_node *of_dev_hwmod_lookup(struct device_node *np, |
168 |
+ * Cache the virtual address used by the MPU to access this IP block's |
169 |
+ * registers. This address is needed early so the OCP registers that |
170 |
+ * are part of the device's address space can be ioremapped properly. |
171 |
+- * No return value. |
172 |
++ * |
173 |
++ * Returns 0 on success, -EINVAL if an invalid hwmod is passed, and |
174 |
++ * -ENXIO on absent or invalid register target address space. |
175 |
+ */ |
176 |
+-static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data) |
177 |
++static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data) |
178 |
+ { |
179 |
+ struct omap_hwmod_addr_space *mem; |
180 |
+ void __iomem *va_start = NULL; |
181 |
+ struct device_node *np; |
182 |
+ |
183 |
+ if (!oh) |
184 |
+- return; |
185 |
++ return -EINVAL; |
186 |
+ |
187 |
+ _save_mpu_port_index(oh); |
188 |
+ |
189 |
+ if (oh->_int_flags & _HWMOD_NO_MPU_PORT) |
190 |
+- return; |
191 |
++ return -ENXIO; |
192 |
+ |
193 |
+ mem = _find_mpu_rt_addr_space(oh); |
194 |
+ if (!mem) { |
195 |
+@@ -2384,7 +2386,7 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data) |
196 |
+ |
197 |
+ /* Extract the IO space from device tree blob */ |
198 |
+ if (!of_have_populated_dt()) |
199 |
+- return; |
200 |
++ return -ENXIO; |
201 |
+ |
202 |
+ np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh); |
203 |
+ if (np) |
204 |
+@@ -2395,13 +2397,14 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data) |
205 |
+ |
206 |
+ if (!va_start) { |
207 |
+ pr_err("omap_hwmod: %s: Could not ioremap\n", oh->name); |
208 |
+- return; |
209 |
++ return -ENXIO; |
210 |
+ } |
211 |
+ |
212 |
+ pr_debug("omap_hwmod: %s: MPU register target at va %p\n", |
213 |
+ oh->name, va_start); |
214 |
+ |
215 |
+ oh->_mpu_rt_va = va_start; |
216 |
++ return 0; |
217 |
+ } |
218 |
+ |
219 |
+ /** |
220 |
+@@ -2414,8 +2417,8 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data) |
221 |
+ * registered at this point. This is the first of two phases for |
222 |
+ * hwmod initialization. Code called here does not touch any hardware |
223 |
+ * registers, it simply prepares internal data structures. Returns 0 |
224 |
+- * upon success or if the hwmod isn't registered, or -EINVAL upon |
225 |
+- * failure. |
226 |
++ * upon success or if the hwmod isn't registered or if the hwmod's |
227 |
++ * address space is not defined, or -EINVAL upon failure. |
228 |
+ */ |
229 |
+ static int __init _init(struct omap_hwmod *oh, void *data) |
230 |
+ { |
231 |
+@@ -2424,8 +2427,14 @@ static int __init _init(struct omap_hwmod *oh, void *data) |
232 |
+ if (oh->_state != _HWMOD_STATE_REGISTERED) |
233 |
+ return 0; |
234 |
+ |
235 |
+- if (oh->class->sysc) |
236 |
+- _init_mpu_rt_base(oh, NULL); |
237 |
++ if (oh->class->sysc) { |
238 |
++ r = _init_mpu_rt_base(oh, NULL); |
239 |
++ if (r < 0) { |
240 |
++ WARN(1, "omap_hwmod: %s: doesn't have mpu register target base\n", |
241 |
++ oh->name); |
242 |
++ return 0; |
243 |
++ } |
244 |
++ } |
245 |
+ |
246 |
+ r = _init_clocks(oh, NULL); |
247 |
+ if (r < 0) { |
248 |
+diff --git a/arch/cris/include/asm/io.h b/arch/cris/include/asm/io.h |
249 |
+index 5d3047e..4353cf2 100644 |
250 |
+--- a/arch/cris/include/asm/io.h |
251 |
++++ b/arch/cris/include/asm/io.h |
252 |
+@@ -3,6 +3,7 @@ |
253 |
+ |
254 |
+ #include <asm/page.h> /* for __va, __pa */ |
255 |
+ #include <arch/io.h> |
256 |
++#include <asm-generic/iomap.h> |
257 |
+ #include <linux/kernel.h> |
258 |
+ |
259 |
+ struct cris_io_operations |
260 |
+diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h |
261 |
+index e0a899a..5a84b3a 100644 |
262 |
+--- a/arch/ia64/include/asm/processor.h |
263 |
++++ b/arch/ia64/include/asm/processor.h |
264 |
+@@ -319,7 +319,7 @@ struct thread_struct { |
265 |
+ regs->loadrs = 0; \ |
266 |
+ regs->r8 = get_dumpable(current->mm); /* set "don't zap registers" flag */ \ |
267 |
+ regs->r12 = new_sp - 16; /* allocate 16 byte scratch area */ \ |
268 |
+- if (unlikely(!get_dumpable(current->mm))) { \ |
269 |
++ if (unlikely(get_dumpable(current->mm) != SUID_DUMP_USER)) { \ |
270 |
+ /* \ |
271 |
+ * Zap scratch regs to avoid leaking bits between processes with different \ |
272 |
+ * uid/privileges. \ |
273 |
+diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c |
274 |
+index 55593ee..c766cf5 100644 |
275 |
+--- a/arch/powerpc/kernel/eeh.c |
276 |
++++ b/arch/powerpc/kernel/eeh.c |
277 |
+@@ -687,6 +687,15 @@ void eeh_save_bars(struct eeh_dev *edev) |
278 |
+ |
279 |
+ for (i = 0; i < 16; i++) |
280 |
+ eeh_ops->read_config(dn, i * 4, 4, &edev->config_space[i]); |
281 |
++ |
282 |
++ /* |
283 |
++ * For PCI bridges including root port, we need enable bus |
284 |
++ * master explicitly. Otherwise, it can't fetch IODA table |
285 |
++ * entries correctly. So we cache the bit in advance so that |
286 |
++ * we can restore it after reset, either PHB range or PE range. |
287 |
++ */ |
288 |
++ if (edev->mode & EEH_DEV_BRIDGE) |
289 |
++ edev->config_space[1] |= PCI_COMMAND_MASTER; |
290 |
+ } |
291 |
+ |
292 |
+ /** |
293 |
+diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c |
294 |
+index bebdf1a..36d49e6 100644 |
295 |
+--- a/arch/powerpc/kernel/signal_32.c |
296 |
++++ b/arch/powerpc/kernel/signal_32.c |
297 |
+@@ -457,7 +457,15 @@ static int save_user_regs(struct pt_regs *regs, struct mcontext __user *frame, |
298 |
+ if (copy_vsx_to_user(&frame->mc_vsregs, current)) |
299 |
+ return 1; |
300 |
+ msr |= MSR_VSX; |
301 |
+- } |
302 |
++ } else if (!ctx_has_vsx_region) |
303 |
++ /* |
304 |
++ * With a small context structure we can't hold the VSX |
305 |
++ * registers, hence clear the MSR value to indicate the state |
306 |
++ * was not saved. |
307 |
++ */ |
308 |
++ msr &= ~MSR_VSX; |
309 |
++ |
310 |
++ |
311 |
+ #endif /* CONFIG_VSX */ |
312 |
+ #ifdef CONFIG_SPE |
313 |
+ /* save spe registers */ |
314 |
+diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c |
315 |
+index 192b051..b3b1441 100644 |
316 |
+--- a/arch/powerpc/kernel/time.c |
317 |
++++ b/arch/powerpc/kernel/time.c |
318 |
+@@ -213,8 +213,6 @@ static u64 scan_dispatch_log(u64 stop_tb) |
319 |
+ if (i == be64_to_cpu(vpa->dtl_idx)) |
320 |
+ return 0; |
321 |
+ while (i < be64_to_cpu(vpa->dtl_idx)) { |
322 |
+- if (dtl_consumer) |
323 |
+- dtl_consumer(dtl, i); |
324 |
+ dtb = be64_to_cpu(dtl->timebase); |
325 |
+ tb_delta = be32_to_cpu(dtl->enqueue_to_dispatch_time) + |
326 |
+ be32_to_cpu(dtl->ready_to_enqueue_time); |
327 |
+@@ -227,6 +225,8 @@ static u64 scan_dispatch_log(u64 stop_tb) |
328 |
+ } |
329 |
+ if (dtb > stop_tb) |
330 |
+ break; |
331 |
++ if (dtl_consumer) |
332 |
++ dtl_consumer(dtl, i); |
333 |
+ stolen += tb_delta; |
334 |
+ ++i; |
335 |
+ ++dtl; |
336 |
+diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c |
337 |
+index d38cc08..cb92d82 100644 |
338 |
+--- a/arch/powerpc/kernel/vio.c |
339 |
++++ b/arch/powerpc/kernel/vio.c |
340 |
+@@ -1531,12 +1531,12 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, |
341 |
+ |
342 |
+ dn = dev->of_node; |
343 |
+ if (!dn) { |
344 |
+- strcat(buf, "\n"); |
345 |
++ strcpy(buf, "\n"); |
346 |
+ return strlen(buf); |
347 |
+ } |
348 |
+ cp = of_get_property(dn, "compatible", NULL); |
349 |
+ if (!cp) { |
350 |
+- strcat(buf, "\n"); |
351 |
++ strcpy(buf, "\n"); |
352 |
+ return strlen(buf); |
353 |
+ } |
354 |
+ |
355 |
+diff --git a/arch/powerpc/mm/gup.c b/arch/powerpc/mm/gup.c |
356 |
+index 6936547..c5f734e 100644 |
357 |
+--- a/arch/powerpc/mm/gup.c |
358 |
++++ b/arch/powerpc/mm/gup.c |
359 |
+@@ -123,6 +123,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, |
360 |
+ struct mm_struct *mm = current->mm; |
361 |
+ unsigned long addr, len, end; |
362 |
+ unsigned long next; |
363 |
++ unsigned long flags; |
364 |
+ pgd_t *pgdp; |
365 |
+ int nr = 0; |
366 |
+ |
367 |
+@@ -156,7 +157,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, |
368 |
+ * So long as we atomically load page table pointers versus teardown, |
369 |
+ * we can follow the address down to the the page and take a ref on it. |
370 |
+ */ |
371 |
+- local_irq_disable(); |
372 |
++ local_irq_save(flags); |
373 |
+ |
374 |
+ pgdp = pgd_offset(mm, addr); |
375 |
+ do { |
376 |
+@@ -179,7 +180,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, |
377 |
+ break; |
378 |
+ } while (pgdp++, addr = next, addr != end); |
379 |
+ |
380 |
+- local_irq_enable(); |
381 |
++ local_irq_restore(flags); |
382 |
+ |
383 |
+ return nr; |
384 |
+ } |
385 |
+diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c |
386 |
+index 3e99c14..7ce9cf3 100644 |
387 |
+--- a/arch/powerpc/mm/slice.c |
388 |
++++ b/arch/powerpc/mm/slice.c |
389 |
+@@ -258,7 +258,7 @@ static bool slice_scan_available(unsigned long addr, |
390 |
+ slice = GET_HIGH_SLICE_INDEX(addr); |
391 |
+ *boundary_addr = (slice + end) ? |
392 |
+ ((slice + end) << SLICE_HIGH_SHIFT) : SLICE_LOW_TOP; |
393 |
+- return !!(available.high_slices & (1u << slice)); |
394 |
++ return !!(available.high_slices & (1ul << slice)); |
395 |
+ } |
396 |
+ } |
397 |
+ |
398 |
+diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c |
399 |
+index a82a41b..1a7b1d0 100644 |
400 |
+--- a/arch/powerpc/platforms/512x/mpc512x_shared.c |
401 |
++++ b/arch/powerpc/platforms/512x/mpc512x_shared.c |
402 |
+@@ -303,6 +303,9 @@ void __init mpc512x_setup_diu(void) |
403 |
+ diu_ops.release_bootmem = mpc512x_release_bootmem; |
404 |
+ } |
405 |
+ |
406 |
++#else |
407 |
++void __init mpc512x_setup_diu(void) { /* EMPTY */ } |
408 |
++void __init mpc512x_init_diu(void) { /* EMPTY */ } |
409 |
+ #endif |
410 |
+ |
411 |
+ void __init mpc512x_init_IRQ(void) |
412 |
+diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig |
413 |
+index 90f4496..af54174 100644 |
414 |
+--- a/arch/powerpc/platforms/52xx/Kconfig |
415 |
++++ b/arch/powerpc/platforms/52xx/Kconfig |
416 |
+@@ -57,5 +57,5 @@ config PPC_MPC5200_BUGFIX |
417 |
+ |
418 |
+ config PPC_MPC5200_LPBFIFO |
419 |
+ tristate "MPC5200 LocalPlus bus FIFO driver" |
420 |
+- depends on PPC_MPC52xx |
421 |
++ depends on PPC_MPC52xx && PPC_BESTCOMM |
422 |
+ select PPC_BESTCOMM_GEN_BD |
423 |
+diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c |
424 |
+index 74a5a57..930e1fe 100644 |
425 |
+--- a/arch/powerpc/platforms/powernv/pci-ioda.c |
426 |
++++ b/arch/powerpc/platforms/powernv/pci-ioda.c |
427 |
+@@ -153,13 +153,23 @@ static int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe) |
428 |
+ rid_end = pe->rid + 1; |
429 |
+ } |
430 |
+ |
431 |
+- /* Associate PE in PELT */ |
432 |
++ /* |
433 |
++ * Associate PE in PELT. We need add the PE into the |
434 |
++ * corresponding PELT-V as well. Otherwise, the error |
435 |
++ * originated from the PE might contribute to other |
436 |
++ * PEs. |
437 |
++ */ |
438 |
+ rc = opal_pci_set_pe(phb->opal_id, pe->pe_number, pe->rid, |
439 |
+ bcomp, dcomp, fcomp, OPAL_MAP_PE); |
440 |
+ if (rc) { |
441 |
+ pe_err(pe, "OPAL error %ld trying to setup PELT table\n", rc); |
442 |
+ return -ENXIO; |
443 |
+ } |
444 |
++ |
445 |
++ rc = opal_pci_set_peltv(phb->opal_id, pe->pe_number, |
446 |
++ pe->pe_number, OPAL_ADD_PE_TO_DOMAIN); |
447 |
++ if (rc) |
448 |
++ pe_warn(pe, "OPAL error %d adding self to PELTV\n", rc); |
449 |
+ opal_pci_eeh_freeze_clear(phb->opal_id, pe->pe_number, |
450 |
+ OPAL_EEH_ACTION_CLEAR_FREEZE_ALL); |
451 |
+ |
452 |
+diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c |
453 |
+index b4dbade..2e4b5be 100644 |
454 |
+--- a/arch/s390/crypto/aes_s390.c |
455 |
++++ b/arch/s390/crypto/aes_s390.c |
456 |
+@@ -35,7 +35,6 @@ static u8 *ctrblk; |
457 |
+ static char keylen_flag; |
458 |
+ |
459 |
+ struct s390_aes_ctx { |
460 |
+- u8 iv[AES_BLOCK_SIZE]; |
461 |
+ u8 key[AES_MAX_KEY_SIZE]; |
462 |
+ long enc; |
463 |
+ long dec; |
464 |
+@@ -441,30 +440,36 @@ static int cbc_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, |
465 |
+ return aes_set_key(tfm, in_key, key_len); |
466 |
+ } |
467 |
+ |
468 |
+-static int cbc_aes_crypt(struct blkcipher_desc *desc, long func, void *param, |
469 |
++static int cbc_aes_crypt(struct blkcipher_desc *desc, long func, |
470 |
+ struct blkcipher_walk *walk) |
471 |
+ { |
472 |
++ struct s390_aes_ctx *sctx = crypto_blkcipher_ctx(desc->tfm); |
473 |
+ int ret = blkcipher_walk_virt(desc, walk); |
474 |
+ unsigned int nbytes = walk->nbytes; |
475 |
++ struct { |
476 |
++ u8 iv[AES_BLOCK_SIZE]; |
477 |
++ u8 key[AES_MAX_KEY_SIZE]; |
478 |
++ } param; |
479 |
+ |
480 |
+ if (!nbytes) |
481 |
+ goto out; |
482 |
+ |
483 |
+- memcpy(param, walk->iv, AES_BLOCK_SIZE); |
484 |
++ memcpy(param.iv, walk->iv, AES_BLOCK_SIZE); |
485 |
++ memcpy(param.key, sctx->key, sctx->key_len); |
486 |
+ do { |
487 |
+ /* only use complete blocks */ |
488 |
+ unsigned int n = nbytes & ~(AES_BLOCK_SIZE - 1); |
489 |
+ u8 *out = walk->dst.virt.addr; |
490 |
+ u8 *in = walk->src.virt.addr; |
491 |
+ |
492 |
+- ret = crypt_s390_kmc(func, param, out, in, n); |
493 |
++ ret = crypt_s390_kmc(func, ¶m, out, in, n); |
494 |
+ if (ret < 0 || ret != n) |
495 |
+ return -EIO; |
496 |
+ |
497 |
+ nbytes &= AES_BLOCK_SIZE - 1; |
498 |
+ ret = blkcipher_walk_done(desc, walk, nbytes); |
499 |
+ } while ((nbytes = walk->nbytes)); |
500 |
+- memcpy(walk->iv, param, AES_BLOCK_SIZE); |
501 |
++ memcpy(walk->iv, param.iv, AES_BLOCK_SIZE); |
502 |
+ |
503 |
+ out: |
504 |
+ return ret; |
505 |
+@@ -481,7 +486,7 @@ static int cbc_aes_encrypt(struct blkcipher_desc *desc, |
506 |
+ return fallback_blk_enc(desc, dst, src, nbytes); |
507 |
+ |
508 |
+ blkcipher_walk_init(&walk, dst, src, nbytes); |
509 |
+- return cbc_aes_crypt(desc, sctx->enc, sctx->iv, &walk); |
510 |
++ return cbc_aes_crypt(desc, sctx->enc, &walk); |
511 |
+ } |
512 |
+ |
513 |
+ static int cbc_aes_decrypt(struct blkcipher_desc *desc, |
514 |
+@@ -495,7 +500,7 @@ static int cbc_aes_decrypt(struct blkcipher_desc *desc, |
515 |
+ return fallback_blk_dec(desc, dst, src, nbytes); |
516 |
+ |
517 |
+ blkcipher_walk_init(&walk, dst, src, nbytes); |
518 |
+- return cbc_aes_crypt(desc, sctx->dec, sctx->iv, &walk); |
519 |
++ return cbc_aes_crypt(desc, sctx->dec, &walk); |
520 |
+ } |
521 |
+ |
522 |
+ static struct crypto_alg cbc_aes_alg = { |
523 |
+diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h |
524 |
+index 819b94d..8beee1c 100644 |
525 |
+--- a/arch/s390/include/asm/timex.h |
526 |
++++ b/arch/s390/include/asm/timex.h |
527 |
+@@ -71,9 +71,11 @@ static inline void local_tick_enable(unsigned long long comp) |
528 |
+ |
529 |
+ typedef unsigned long long cycles_t; |
530 |
+ |
531 |
+-static inline void get_tod_clock_ext(char *clk) |
532 |
++static inline void get_tod_clock_ext(char clk[16]) |
533 |
+ { |
534 |
+- asm volatile("stcke %0" : "=Q" (*clk) : : "cc"); |
535 |
++ typedef struct { char _[sizeof(clk)]; } addrtype; |
536 |
++ |
537 |
++ asm volatile("stcke %0" : "=Q" (*(addrtype *) clk) : : "cc"); |
538 |
+ } |
539 |
+ |
540 |
+ static inline unsigned long long get_tod_clock(void) |
541 |
+diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c |
542 |
+index 1a4313a..93439cd 100644 |
543 |
+--- a/arch/s390/kernel/smp.c |
544 |
++++ b/arch/s390/kernel/smp.c |
545 |
+@@ -929,7 +929,7 @@ static ssize_t show_idle_count(struct device *dev, |
546 |
+ idle_count = ACCESS_ONCE(idle->idle_count); |
547 |
+ if (ACCESS_ONCE(idle->clock_idle_enter)) |
548 |
+ idle_count++; |
549 |
+- } while ((sequence & 1) || (idle->sequence != sequence)); |
550 |
++ } while ((sequence & 1) || (ACCESS_ONCE(idle->sequence) != sequence)); |
551 |
+ return sprintf(buf, "%llu\n", idle_count); |
552 |
+ } |
553 |
+ static DEVICE_ATTR(idle_count, 0444, show_idle_count, NULL); |
554 |
+@@ -947,7 +947,7 @@ static ssize_t show_idle_time(struct device *dev, |
555 |
+ idle_time = ACCESS_ONCE(idle->idle_time); |
556 |
+ idle_enter = ACCESS_ONCE(idle->clock_idle_enter); |
557 |
+ idle_exit = ACCESS_ONCE(idle->clock_idle_exit); |
558 |
+- } while ((sequence & 1) || (idle->sequence != sequence)); |
559 |
++ } while ((sequence & 1) || (ACCESS_ONCE(idle->sequence) != sequence)); |
560 |
+ idle_time += idle_enter ? ((idle_exit ? : now) - idle_enter) : 0; |
561 |
+ return sprintf(buf, "%llu\n", idle_time >> 12); |
562 |
+ } |
563 |
+diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c |
564 |
+index abcfab5..bb06a76 100644 |
565 |
+--- a/arch/s390/kernel/vtime.c |
566 |
++++ b/arch/s390/kernel/vtime.c |
567 |
+@@ -191,7 +191,7 @@ cputime64_t s390_get_idle_time(int cpu) |
568 |
+ sequence = ACCESS_ONCE(idle->sequence); |
569 |
+ idle_enter = ACCESS_ONCE(idle->clock_idle_enter); |
570 |
+ idle_exit = ACCESS_ONCE(idle->clock_idle_exit); |
571 |
+- } while ((sequence & 1) || (idle->sequence != sequence)); |
572 |
++ } while ((sequence & 1) || (ACCESS_ONCE(idle->sequence) != sequence)); |
573 |
+ return idle_enter ? ((idle_exit ?: now) - idle_enter) : 0; |
574 |
+ } |
575 |
+ |
576 |
+diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c |
577 |
+index e0e0841..18677a9 100644 |
578 |
+--- a/arch/x86/kernel/crash.c |
579 |
++++ b/arch/x86/kernel/crash.c |
580 |
+@@ -127,12 +127,12 @@ void native_machine_crash_shutdown(struct pt_regs *regs) |
581 |
+ cpu_emergency_vmxoff(); |
582 |
+ cpu_emergency_svm_disable(); |
583 |
+ |
584 |
+- lapic_shutdown(); |
585 |
+ #ifdef CONFIG_X86_IO_APIC |
586 |
+ /* Prevent crash_kexec() from deadlocking on ioapic_lock. */ |
587 |
+ ioapic_zap_locks(); |
588 |
+ disable_IO_APIC(); |
589 |
+ #endif |
590 |
++ lapic_shutdown(); |
591 |
+ #ifdef CONFIG_HPET_TIMER |
592 |
+ hpet_disable(); |
593 |
+ #endif |
594 |
+diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c |
595 |
+index 42a392a..d4bdd25 100644 |
596 |
+--- a/arch/x86/kernel/ftrace.c |
597 |
++++ b/arch/x86/kernel/ftrace.c |
598 |
+@@ -248,6 +248,15 @@ int ftrace_update_ftrace_func(ftrace_func_t func) |
599 |
+ return ret; |
600 |
+ } |
601 |
+ |
602 |
++static int is_ftrace_caller(unsigned long ip) |
603 |
++{ |
604 |
++ if (ip == (unsigned long)(&ftrace_call) || |
605 |
++ ip == (unsigned long)(&ftrace_regs_call)) |
606 |
++ return 1; |
607 |
++ |
608 |
++ return 0; |
609 |
++} |
610 |
++ |
611 |
+ /* |
612 |
+ * A breakpoint was added to the code address we are about to |
613 |
+ * modify, and this is the handle that will just skip over it. |
614 |
+@@ -257,10 +266,13 @@ int ftrace_update_ftrace_func(ftrace_func_t func) |
615 |
+ */ |
616 |
+ int ftrace_int3_handler(struct pt_regs *regs) |
617 |
+ { |
618 |
++ unsigned long ip; |
619 |
++ |
620 |
+ if (WARN_ON_ONCE(!regs)) |
621 |
+ return 0; |
622 |
+ |
623 |
+- if (!ftrace_location(regs->ip - 1)) |
624 |
++ ip = regs->ip - 1; |
625 |
++ if (!ftrace_location(ip) && !is_ftrace_caller(ip)) |
626 |
+ return 0; |
627 |
+ |
628 |
+ regs->ip += MCOUNT_INSN_SIZE - 1; |
629 |
+diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c |
630 |
+index af99f71..c3d4cc9 100644 |
631 |
+--- a/arch/x86/kernel/microcode_amd.c |
632 |
++++ b/arch/x86/kernel/microcode_amd.c |
633 |
+@@ -431,7 +431,7 @@ static enum ucode_state request_microcode_amd(int cpu, struct device *device, |
634 |
+ snprintf(fw_name, sizeof(fw_name), "amd-ucode/microcode_amd_fam%.2xh.bin", c->x86); |
635 |
+ |
636 |
+ if (request_firmware(&fw, (const char *)fw_name, device)) { |
637 |
+- pr_err("failed to load file %s\n", fw_name); |
638 |
++ pr_debug("failed to load file %s\n", fw_name); |
639 |
+ goto out; |
640 |
+ } |
641 |
+ |
642 |
+diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c |
643 |
+index c83516b..3fb8d95 100644 |
644 |
+--- a/arch/x86/kernel/process.c |
645 |
++++ b/arch/x86/kernel/process.c |
646 |
+@@ -391,9 +391,9 @@ static void amd_e400_idle(void) |
647 |
+ * The switch back from broadcast mode needs to be |
648 |
+ * called with interrupts disabled. |
649 |
+ */ |
650 |
+- local_irq_disable(); |
651 |
+- clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu); |
652 |
+- local_irq_enable(); |
653 |
++ local_irq_disable(); |
654 |
++ clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu); |
655 |
++ local_irq_enable(); |
656 |
+ } else |
657 |
+ default_idle(); |
658 |
+ } |
659 |
+diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c |
660 |
+index 7e920bf..618ce26 100644 |
661 |
+--- a/arch/x86/kernel/reboot.c |
662 |
++++ b/arch/x86/kernel/reboot.c |
663 |
+@@ -550,6 +550,10 @@ static void native_machine_emergency_restart(void) |
664 |
+ void native_machine_shutdown(void) |
665 |
+ { |
666 |
+ /* Stop the cpus and apics */ |
667 |
++#ifdef CONFIG_X86_IO_APIC |
668 |
++ disable_IO_APIC(); |
669 |
++#endif |
670 |
++ |
671 |
+ #ifdef CONFIG_SMP |
672 |
+ /* |
673 |
+ * Stop all of the others. Also disable the local irq to |
674 |
+@@ -562,10 +566,6 @@ void native_machine_shutdown(void) |
675 |
+ |
676 |
+ lapic_shutdown(); |
677 |
+ |
678 |
+-#ifdef CONFIG_X86_IO_APIC |
679 |
+- disable_IO_APIC(); |
680 |
+-#endif |
681 |
+- |
682 |
+ #ifdef CONFIG_HPET_TIMER |
683 |
+ hpet_disable(); |
684 |
+ #endif |
685 |
+diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c |
686 |
+index ddc3f3d..92e6f4a 100644 |
687 |
+--- a/arch/x86/kvm/emulate.c |
688 |
++++ b/arch/x86/kvm/emulate.c |
689 |
+@@ -4040,7 +4040,10 @@ static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op, |
690 |
+ case OpMem8: |
691 |
+ ctxt->memop.bytes = 1; |
692 |
+ if (ctxt->memop.type == OP_REG) { |
693 |
+- ctxt->memop.addr.reg = decode_register(ctxt, ctxt->modrm_rm, 1); |
694 |
++ int highbyte_regs = ctxt->rex_prefix == 0; |
695 |
++ |
696 |
++ ctxt->memop.addr.reg = decode_register(ctxt, ctxt->modrm_rm, |
697 |
++ highbyte_regs); |
698 |
+ fetch_register_operand(&ctxt->memop); |
699 |
+ } |
700 |
+ goto mem_common; |
701 |
+diff --git a/block/blk-core.c b/block/blk-core.c |
702 |
+index 0a00e4e..5e00b5a 100644 |
703 |
+--- a/block/blk-core.c |
704 |
++++ b/block/blk-core.c |
705 |
+@@ -2227,6 +2227,7 @@ void blk_start_request(struct request *req) |
706 |
+ if (unlikely(blk_bidi_rq(req))) |
707 |
+ req->next_rq->resid_len = blk_rq_bytes(req->next_rq); |
708 |
+ |
709 |
++ BUG_ON(test_bit(REQ_ATOM_COMPLETE, &req->atomic_flags)); |
710 |
+ blk_add_timer(req); |
711 |
+ } |
712 |
+ EXPORT_SYMBOL(blk_start_request); |
713 |
+diff --git a/block/blk-settings.c b/block/blk-settings.c |
714 |
+index c50ecf0..5330933 100644 |
715 |
+--- a/block/blk-settings.c |
716 |
++++ b/block/blk-settings.c |
717 |
+@@ -144,6 +144,7 @@ void blk_set_stacking_limits(struct queue_limits *lim) |
718 |
+ lim->discard_zeroes_data = 1; |
719 |
+ lim->max_segments = USHRT_MAX; |
720 |
+ lim->max_hw_sectors = UINT_MAX; |
721 |
++ lim->max_segment_size = UINT_MAX; |
722 |
+ lim->max_sectors = UINT_MAX; |
723 |
+ lim->max_write_same_sectors = UINT_MAX; |
724 |
+ } |
725 |
+diff --git a/block/blk-timeout.c b/block/blk-timeout.c |
726 |
+index 65f1035..655ba90 100644 |
727 |
+--- a/block/blk-timeout.c |
728 |
++++ b/block/blk-timeout.c |
729 |
+@@ -91,8 +91,8 @@ static void blk_rq_timed_out(struct request *req) |
730 |
+ __blk_complete_request(req); |
731 |
+ break; |
732 |
+ case BLK_EH_RESET_TIMER: |
733 |
+- blk_clear_rq_complete(req); |
734 |
+ blk_add_timer(req); |
735 |
++ blk_clear_rq_complete(req); |
736 |
+ break; |
737 |
+ case BLK_EH_NOT_HANDLED: |
738 |
+ /* |
739 |
+@@ -174,7 +174,6 @@ void blk_add_timer(struct request *req) |
740 |
+ return; |
741 |
+ |
742 |
+ BUG_ON(!list_empty(&req->timeout_list)); |
743 |
+- BUG_ON(test_bit(REQ_ATOM_COMPLETE, &req->atomic_flags)); |
744 |
+ |
745 |
+ /* |
746 |
+ * Some LLDs, like scsi, peek at the timeout to prevent a |
747 |
+diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c |
748 |
+index c0bb377..666f196 100644 |
749 |
+--- a/crypto/ansi_cprng.c |
750 |
++++ b/crypto/ansi_cprng.c |
751 |
+@@ -230,11 +230,11 @@ remainder: |
752 |
+ */ |
753 |
+ if (byte_count < DEFAULT_BLK_SZ) { |
754 |
+ empty_rbuf: |
755 |
+- for (; ctx->rand_data_valid < DEFAULT_BLK_SZ; |
756 |
+- ctx->rand_data_valid++) { |
757 |
++ while (ctx->rand_data_valid < DEFAULT_BLK_SZ) { |
758 |
+ *ptr = ctx->rand_data[ctx->rand_data_valid]; |
759 |
+ ptr++; |
760 |
+ byte_count--; |
761 |
++ ctx->rand_data_valid++; |
762 |
+ if (byte_count == 0) |
763 |
+ goto done; |
764 |
+ } |
765 |
+diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c |
766 |
+index a06d983..15986f3 100644 |
767 |
+--- a/drivers/acpi/ec.c |
768 |
++++ b/drivers/acpi/ec.c |
769 |
+@@ -175,9 +175,10 @@ static void start_transaction(struct acpi_ec *ec) |
770 |
+ static void advance_transaction(struct acpi_ec *ec, u8 status) |
771 |
+ { |
772 |
+ unsigned long flags; |
773 |
+- struct transaction *t = ec->curr; |
774 |
++ struct transaction *t; |
775 |
+ |
776 |
+ spin_lock_irqsave(&ec->lock, flags); |
777 |
++ t = ec->curr; |
778 |
+ if (!t) |
779 |
+ goto unlock; |
780 |
+ if (t->wlen > t->wi) { |
781 |
+diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c |
782 |
+index d3874f4..d7e53ea 100644 |
783 |
+--- a/drivers/acpi/pci_root.c |
784 |
++++ b/drivers/acpi/pci_root.c |
785 |
+@@ -608,9 +608,12 @@ static void handle_root_bridge_removal(struct acpi_device *device) |
786 |
+ ej_event->device = device; |
787 |
+ ej_event->event = ACPI_NOTIFY_EJECT_REQUEST; |
788 |
+ |
789 |
++ get_device(&device->dev); |
790 |
+ status = acpi_os_hotplug_execute(acpi_bus_hot_remove_device, ej_event); |
791 |
+- if (ACPI_FAILURE(status)) |
792 |
++ if (ACPI_FAILURE(status)) { |
793 |
++ put_device(&device->dev); |
794 |
+ kfree(ej_event); |
795 |
++ } |
796 |
+ } |
797 |
+ |
798 |
+ static void _handle_hotplug_event_root(struct work_struct *work) |
799 |
+diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c |
800 |
+index f98dd00..c7414a5 100644 |
801 |
+--- a/drivers/acpi/processor_idle.c |
802 |
++++ b/drivers/acpi/processor_idle.c |
803 |
+@@ -119,17 +119,10 @@ static struct dmi_system_id processor_power_dmi_table[] = { |
804 |
+ */ |
805 |
+ static void acpi_safe_halt(void) |
806 |
+ { |
807 |
+- current_thread_info()->status &= ~TS_POLLING; |
808 |
+- /* |
809 |
+- * TS_POLLING-cleared state must be visible before we |
810 |
+- * test NEED_RESCHED: |
811 |
+- */ |
812 |
+- smp_mb(); |
813 |
+- if (!need_resched()) { |
814 |
++ if (!tif_need_resched()) { |
815 |
+ safe_halt(); |
816 |
+ local_irq_disable(); |
817 |
+ } |
818 |
+- current_thread_info()->status |= TS_POLLING; |
819 |
+ } |
820 |
+ |
821 |
+ #ifdef ARCH_APICTIMER_STOPS_ON_C3 |
822 |
+@@ -737,6 +730,11 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev, |
823 |
+ if (unlikely(!pr)) |
824 |
+ return -EINVAL; |
825 |
+ |
826 |
++ if (cx->entry_method == ACPI_CSTATE_FFH) { |
827 |
++ if (current_set_polling_and_test()) |
828 |
++ return -EINVAL; |
829 |
++ } |
830 |
++ |
831 |
+ lapic_timer_state_broadcast(pr, cx, 1); |
832 |
+ acpi_idle_do_entry(cx); |
833 |
+ |
834 |
+@@ -790,18 +788,9 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, |
835 |
+ if (unlikely(!pr)) |
836 |
+ return -EINVAL; |
837 |
+ |
838 |
+- if (cx->entry_method != ACPI_CSTATE_FFH) { |
839 |
+- current_thread_info()->status &= ~TS_POLLING; |
840 |
+- /* |
841 |
+- * TS_POLLING-cleared state must be visible before we test |
842 |
+- * NEED_RESCHED: |
843 |
+- */ |
844 |
+- smp_mb(); |
845 |
+- |
846 |
+- if (unlikely(need_resched())) { |
847 |
+- current_thread_info()->status |= TS_POLLING; |
848 |
++ if (cx->entry_method == ACPI_CSTATE_FFH) { |
849 |
++ if (current_set_polling_and_test()) |
850 |
+ return -EINVAL; |
851 |
+- } |
852 |
+ } |
853 |
+ |
854 |
+ /* |
855 |
+@@ -819,9 +808,6 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, |
856 |
+ |
857 |
+ sched_clock_idle_wakeup_event(0); |
858 |
+ |
859 |
+- if (cx->entry_method != ACPI_CSTATE_FFH) |
860 |
+- current_thread_info()->status |= TS_POLLING; |
861 |
+- |
862 |
+ lapic_timer_state_broadcast(pr, cx, 0); |
863 |
+ return index; |
864 |
+ } |
865 |
+@@ -858,18 +844,9 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, |
866 |
+ } |
867 |
+ } |
868 |
+ |
869 |
+- if (cx->entry_method != ACPI_CSTATE_FFH) { |
870 |
+- current_thread_info()->status &= ~TS_POLLING; |
871 |
+- /* |
872 |
+- * TS_POLLING-cleared state must be visible before we test |
873 |
+- * NEED_RESCHED: |
874 |
+- */ |
875 |
+- smp_mb(); |
876 |
+- |
877 |
+- if (unlikely(need_resched())) { |
878 |
+- current_thread_info()->status |= TS_POLLING; |
879 |
++ if (cx->entry_method == ACPI_CSTATE_FFH) { |
880 |
++ if (current_set_polling_and_test()) |
881 |
+ return -EINVAL; |
882 |
+- } |
883 |
+ } |
884 |
+ |
885 |
+ acpi_unlazy_tlb(smp_processor_id()); |
886 |
+@@ -915,9 +892,6 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, |
887 |
+ |
888 |
+ sched_clock_idle_wakeup_event(0); |
889 |
+ |
890 |
+- if (cx->entry_method != ACPI_CSTATE_FFH) |
891 |
+- current_thread_info()->status |= TS_POLLING; |
892 |
+- |
893 |
+ lapic_timer_state_broadcast(pr, cx, 0); |
894 |
+ return index; |
895 |
+ } |
896 |
+diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c |
897 |
+index fee8a29..3601738 100644 |
898 |
+--- a/drivers/acpi/scan.c |
899 |
++++ b/drivers/acpi/scan.c |
900 |
+@@ -331,8 +331,6 @@ static void acpi_scan_bus_device_check(acpi_handle handle, u32 ost_source) |
901 |
+ goto out; |
902 |
+ } |
903 |
+ } |
904 |
+- acpi_evaluate_hotplug_ost(handle, ost_source, |
905 |
+- ACPI_OST_SC_INSERT_IN_PROGRESS, NULL); |
906 |
+ error = acpi_bus_scan(handle); |
907 |
+ if (error) { |
908 |
+ acpi_handle_warn(handle, "Namespace scan failure\n"); |
909 |
+diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c |
910 |
+index aebcf63..f193285 100644 |
911 |
+--- a/drivers/acpi/video.c |
912 |
++++ b/drivers/acpi/video.c |
913 |
+@@ -832,7 +832,7 @@ acpi_video_init_brightness(struct acpi_video_device *device) |
914 |
+ for (i = 2; i < br->count; i++) |
915 |
+ if (level_old == br->levels[i]) |
916 |
+ break; |
917 |
+- if (i == br->count) |
918 |
++ if (i == br->count || !level) |
919 |
+ level = max_level; |
920 |
+ } |
921 |
+ |
922 |
+diff --git a/drivers/block/brd.c b/drivers/block/brd.c |
923 |
+index 9bf4371..d91f1a5 100644 |
924 |
+--- a/drivers/block/brd.c |
925 |
++++ b/drivers/block/brd.c |
926 |
+@@ -545,7 +545,7 @@ static struct kobject *brd_probe(dev_t dev, int *part, void *data) |
927 |
+ |
928 |
+ mutex_lock(&brd_devices_mutex); |
929 |
+ brd = brd_init_one(MINOR(dev) >> part_shift); |
930 |
+- kobj = brd ? get_disk(brd->brd_disk) : ERR_PTR(-ENOMEM); |
931 |
++ kobj = brd ? get_disk(brd->brd_disk) : NULL; |
932 |
+ mutex_unlock(&brd_devices_mutex); |
933 |
+ |
934 |
+ *part = 0; |
935 |
+diff --git a/drivers/block/loop.c b/drivers/block/loop.c |
936 |
+index 40e7155..2f036ca 100644 |
937 |
+--- a/drivers/block/loop.c |
938 |
++++ b/drivers/block/loop.c |
939 |
+@@ -1741,7 +1741,7 @@ static struct kobject *loop_probe(dev_t dev, int *part, void *data) |
940 |
+ if (err < 0) |
941 |
+ err = loop_add(&lo, MINOR(dev) >> part_shift); |
942 |
+ if (err < 0) |
943 |
+- kobj = ERR_PTR(err); |
944 |
++ kobj = NULL; |
945 |
+ else |
946 |
+ kobj = get_disk(lo->lo_disk); |
947 |
+ mutex_unlock(&loop_index_mutex); |
948 |
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c |
949 |
+index f3dfc0a..d593c99 100644 |
950 |
+--- a/drivers/bluetooth/btusb.c |
951 |
++++ b/drivers/bluetooth/btusb.c |
952 |
+@@ -1628,7 +1628,6 @@ static struct usb_driver btusb_driver = { |
953 |
+ #ifdef CONFIG_PM |
954 |
+ .suspend = btusb_suspend, |
955 |
+ .resume = btusb_resume, |
956 |
+- .reset_resume = btusb_resume, |
957 |
+ #endif |
958 |
+ .id_table = btusb_table, |
959 |
+ .supports_autosuspend = 1, |
960 |
+diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc1.c b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc1.c |
961 |
+index e5be3ee..71b4283 100644 |
962 |
+--- a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc1.c |
963 |
++++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc1.c |
964 |
+@@ -587,6 +587,7 @@ nvc1_grctx_init_unk58xx[] = { |
965 |
+ { 0x405870, 4, 0x04, 0x00000001 }, |
966 |
+ { 0x405a00, 2, 0x04, 0x00000000 }, |
967 |
+ { 0x405a18, 1, 0x04, 0x00000000 }, |
968 |
++ {} |
969 |
+ }; |
970 |
+ |
971 |
+ static struct nvc0_graph_init |
972 |
+@@ -598,6 +599,7 @@ nvc1_grctx_init_rop[] = { |
973 |
+ { 0x408904, 1, 0x04, 0x62000001 }, |
974 |
+ { 0x408908, 1, 0x04, 0x00c80929 }, |
975 |
+ { 0x408980, 1, 0x04, 0x0000011d }, |
976 |
++ {} |
977 |
+ }; |
978 |
+ |
979 |
+ static struct nvc0_graph_init |
980 |
+@@ -671,6 +673,7 @@ nvc1_grctx_init_gpc_0[] = { |
981 |
+ { 0x419000, 1, 0x04, 0x00000780 }, |
982 |
+ { 0x419004, 2, 0x04, 0x00000000 }, |
983 |
+ { 0x419014, 1, 0x04, 0x00000004 }, |
984 |
++ {} |
985 |
+ }; |
986 |
+ |
987 |
+ static struct nvc0_graph_init |
988 |
+@@ -717,6 +720,7 @@ nvc1_grctx_init_tpc[] = { |
989 |
+ { 0x419e98, 1, 0x04, 0x00000000 }, |
990 |
+ { 0x419ee0, 1, 0x04, 0x00011110 }, |
991 |
+ { 0x419f30, 11, 0x04, 0x00000000 }, |
992 |
++ {} |
993 |
+ }; |
994 |
+ |
995 |
+ void |
996 |
+diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd7.c b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd7.c |
997 |
+index 438e784..c4740d5 100644 |
998 |
+--- a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd7.c |
999 |
++++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd7.c |
1000 |
+@@ -258,6 +258,7 @@ nvd7_grctx_init_hub[] = { |
1001 |
+ nvc0_grctx_init_unk78xx, |
1002 |
+ nvc0_grctx_init_unk80xx, |
1003 |
+ nvd9_grctx_init_rop, |
1004 |
++ NULL |
1005 |
+ }; |
1006 |
+ |
1007 |
+ struct nvc0_graph_init * |
1008 |
+diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd9.c b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd9.c |
1009 |
+index 818a475..a1102cb 100644 |
1010 |
+--- a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd9.c |
1011 |
++++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd9.c |
1012 |
+@@ -466,6 +466,7 @@ nvd9_grctx_init_hub[] = { |
1013 |
+ nvc0_grctx_init_unk78xx, |
1014 |
+ nvc0_grctx_init_unk80xx, |
1015 |
+ nvd9_grctx_init_rop, |
1016 |
++ NULL |
1017 |
+ }; |
1018 |
+ |
1019 |
+ struct nvc0_graph_init * |
1020 |
+diff --git a/drivers/gpu/drm/shmobile/Kconfig b/drivers/gpu/drm/shmobile/Kconfig |
1021 |
+index ca498d1..5240690 100644 |
1022 |
+--- a/drivers/gpu/drm/shmobile/Kconfig |
1023 |
++++ b/drivers/gpu/drm/shmobile/Kconfig |
1024 |
+@@ -1,6 +1,7 @@ |
1025 |
+ config DRM_SHMOBILE |
1026 |
+ tristate "DRM Support for SH Mobile" |
1027 |
+ depends on DRM && (ARM || SUPERH) |
1028 |
++ select BACKLIGHT_CLASS_DEVICE |
1029 |
+ select DRM_KMS_HELPER |
1030 |
+ select DRM_KMS_CMA_HELPER |
1031 |
+ select DRM_GEM_CMA_HELPER |
1032 |
+diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c |
1033 |
+index bbff5f2..fa92046 100644 |
1034 |
+--- a/drivers/hv/channel_mgmt.c |
1035 |
++++ b/drivers/hv/channel_mgmt.c |
1036 |
+@@ -203,7 +203,8 @@ static void vmbus_process_rescind_offer(struct work_struct *work) |
1037 |
+ struct vmbus_channel *primary_channel; |
1038 |
+ struct vmbus_channel_relid_released msg; |
1039 |
+ |
1040 |
+- vmbus_device_unregister(channel->device_obj); |
1041 |
++ if (channel->device_obj) |
1042 |
++ vmbus_device_unregister(channel->device_obj); |
1043 |
+ memset(&msg, 0, sizeof(struct vmbus_channel_relid_released)); |
1044 |
+ msg.child_relid = channel->offermsg.child_relid; |
1045 |
+ msg.header.msgtype = CHANNELMSG_RELID_RELEASED; |
1046 |
+@@ -216,7 +217,7 @@ static void vmbus_process_rescind_offer(struct work_struct *work) |
1047 |
+ } else { |
1048 |
+ primary_channel = channel->primary_channel; |
1049 |
+ spin_lock_irqsave(&primary_channel->sc_lock, flags); |
1050 |
+- list_del(&channel->listentry); |
1051 |
++ list_del(&channel->sc_list); |
1052 |
+ spin_unlock_irqrestore(&primary_channel->sc_lock, flags); |
1053 |
+ } |
1054 |
+ free_channel(channel); |
1055 |
+diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c |
1056 |
+index cdff742..14e36c1 100644 |
1057 |
+--- a/drivers/hwmon/lm90.c |
1058 |
++++ b/drivers/hwmon/lm90.c |
1059 |
+@@ -278,7 +278,7 @@ static const struct lm90_params lm90_params[] = { |
1060 |
+ [max6696] = { |
1061 |
+ .flags = LM90_HAVE_EMERGENCY |
1062 |
+ | LM90_HAVE_EMERGENCY_ALARM | LM90_HAVE_TEMP3, |
1063 |
+- .alert_alarms = 0x187c, |
1064 |
++ .alert_alarms = 0x1c7c, |
1065 |
+ .max_convrate = 6, |
1066 |
+ .reg_local_ext = MAX6657_REG_R_LOCAL_TEMPL, |
1067 |
+ }, |
1068 |
+@@ -1500,19 +1500,22 @@ static void lm90_alert(struct i2c_client *client, unsigned int flag) |
1069 |
+ if ((alarms & 0x7f) == 0 && (alarms2 & 0xfe) == 0) { |
1070 |
+ dev_info(&client->dev, "Everything OK\n"); |
1071 |
+ } else { |
1072 |
+- if (alarms & 0x61) |
1073 |
++ if ((alarms & 0x61) || (alarms2 & 0x80)) |
1074 |
+ dev_warn(&client->dev, |
1075 |
+ "temp%d out of range, please check!\n", 1); |
1076 |
+- if (alarms & 0x1a) |
1077 |
++ if ((alarms & 0x1a) || (alarms2 & 0x20)) |
1078 |
+ dev_warn(&client->dev, |
1079 |
+ "temp%d out of range, please check!\n", 2); |
1080 |
+ if (alarms & 0x04) |
1081 |
+ dev_warn(&client->dev, |
1082 |
+ "temp%d diode open, please check!\n", 2); |
1083 |
+ |
1084 |
+- if (alarms2 & 0x18) |
1085 |
++ if (alarms2 & 0x5a) |
1086 |
+ dev_warn(&client->dev, |
1087 |
+ "temp%d out of range, please check!\n", 3); |
1088 |
++ if (alarms2 & 0x04) |
1089 |
++ dev_warn(&client->dev, |
1090 |
++ "temp%d diode open, please check!\n", 3); |
1091 |
+ |
1092 |
+ /* |
1093 |
+ * Disable ALERT# output, because these chips don't implement |
1094 |
+diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c |
1095 |
+index fa6964d..f116d66 100644 |
1096 |
+--- a/drivers/idle/intel_idle.c |
1097 |
++++ b/drivers/idle/intel_idle.c |
1098 |
+@@ -359,7 +359,7 @@ static int intel_idle(struct cpuidle_device *dev, |
1099 |
+ if (!(lapic_timer_reliable_states & (1 << (cstate)))) |
1100 |
+ clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu); |
1101 |
+ |
1102 |
+- if (!need_resched()) { |
1103 |
++ if (!current_set_polling_and_test()) { |
1104 |
+ |
1105 |
+ __monitor((void *)¤t_thread_info()->flags, 0, 0); |
1106 |
+ smp_mb(); |
1107 |
+diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c |
1108 |
+index 08e7023..9188ef5 100644 |
1109 |
+--- a/drivers/memstick/core/ms_block.c |
1110 |
++++ b/drivers/memstick/core/ms_block.c |
1111 |
+@@ -401,7 +401,7 @@ again: |
1112 |
+ sizeof(struct ms_status_register))) |
1113 |
+ return 0; |
1114 |
+ |
1115 |
+- msb->state = MSB_RP_RECEIVE_OOB_READ; |
1116 |
++ msb->state = MSB_RP_RECIVE_STATUS_REG; |
1117 |
+ return 0; |
1118 |
+ |
1119 |
+ case MSB_RP_RECIVE_STATUS_REG: |
1120 |
+diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c |
1121 |
+index 2fc0586..9cbd037 100644 |
1122 |
+--- a/drivers/misc/lkdtm.c |
1123 |
++++ b/drivers/misc/lkdtm.c |
1124 |
+@@ -297,6 +297,14 @@ static void do_nothing(void) |
1125 |
+ return; |
1126 |
+ } |
1127 |
+ |
1128 |
++static noinline void corrupt_stack(void) |
1129 |
++{ |
1130 |
++ /* Use default char array length that triggers stack protection. */ |
1131 |
++ char data[8]; |
1132 |
++ |
1133 |
++ memset((void *)data, 0, 64); |
1134 |
++} |
1135 |
++ |
1136 |
+ static void execute_location(void *dst) |
1137 |
+ { |
1138 |
+ void (*func)(void) = dst; |
1139 |
+@@ -327,13 +335,9 @@ static void lkdtm_do_action(enum ctype which) |
1140 |
+ case CT_OVERFLOW: |
1141 |
+ (void) recursive_loop(0); |
1142 |
+ break; |
1143 |
+- case CT_CORRUPT_STACK: { |
1144 |
+- /* Make sure the compiler creates and uses an 8 char array. */ |
1145 |
+- volatile char data[8]; |
1146 |
+- |
1147 |
+- memset((void *)data, 0, 64); |
1148 |
++ case CT_CORRUPT_STACK: |
1149 |
++ corrupt_stack(); |
1150 |
+ break; |
1151 |
+- } |
1152 |
+ case CT_UNALIGNED_LOAD_STORE_WRITE: { |
1153 |
+ static u8 data[5] __attribute__((aligned(4))) = {1, 2, |
1154 |
+ 3, 4, 5}; |
1155 |
+diff --git a/drivers/misc/mei/nfc.c b/drivers/misc/mei/nfc.c |
1156 |
+index d0c6907..994ca4a 100644 |
1157 |
+--- a/drivers/misc/mei/nfc.c |
1158 |
++++ b/drivers/misc/mei/nfc.c |
1159 |
+@@ -485,8 +485,11 @@ int mei_nfc_host_init(struct mei_device *dev) |
1160 |
+ if (ndev->cl_info) |
1161 |
+ return 0; |
1162 |
+ |
1163 |
+- cl_info = mei_cl_allocate(dev); |
1164 |
+- cl = mei_cl_allocate(dev); |
1165 |
++ ndev->cl_info = mei_cl_allocate(dev); |
1166 |
++ ndev->cl = mei_cl_allocate(dev); |
1167 |
++ |
1168 |
++ cl = ndev->cl; |
1169 |
++ cl_info = ndev->cl_info; |
1170 |
+ |
1171 |
+ if (!cl || !cl_info) { |
1172 |
+ ret = -ENOMEM; |
1173 |
+@@ -527,10 +530,9 @@ int mei_nfc_host_init(struct mei_device *dev) |
1174 |
+ |
1175 |
+ cl->device_uuid = mei_nfc_guid; |
1176 |
+ |
1177 |
++ |
1178 |
+ list_add_tail(&cl->device_link, &dev->device_list); |
1179 |
+ |
1180 |
+- ndev->cl_info = cl_info; |
1181 |
+- ndev->cl = cl; |
1182 |
+ ndev->req_id = 1; |
1183 |
+ |
1184 |
+ INIT_WORK(&ndev->init_work, mei_nfc_init); |
1185 |
+diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c |
1186 |
+index a668cd4..e3fc07c 100644 |
1187 |
+--- a/drivers/net/can/c_can/c_can.c |
1188 |
++++ b/drivers/net/can/c_can/c_can.c |
1189 |
+@@ -814,9 +814,6 @@ static int c_can_do_rx_poll(struct net_device *dev, int quota) |
1190 |
+ msg_ctrl_save = priv->read_reg(priv, |
1191 |
+ C_CAN_IFACE(MSGCTRL_REG, 0)); |
1192 |
+ |
1193 |
+- if (msg_ctrl_save & IF_MCONT_EOB) |
1194 |
+- return num_rx_pkts; |
1195 |
+- |
1196 |
+ if (msg_ctrl_save & IF_MCONT_MSGLST) { |
1197 |
+ c_can_handle_lost_msg_obj(dev, 0, msg_obj); |
1198 |
+ num_rx_pkts++; |
1199 |
+@@ -824,6 +821,9 @@ static int c_can_do_rx_poll(struct net_device *dev, int quota) |
1200 |
+ continue; |
1201 |
+ } |
1202 |
+ |
1203 |
++ if (msg_ctrl_save & IF_MCONT_EOB) |
1204 |
++ return num_rx_pkts; |
1205 |
++ |
1206 |
+ if (!(msg_ctrl_save & IF_MCONT_NEWDAT)) |
1207 |
+ continue; |
1208 |
+ |
1209 |
+diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c |
1210 |
+index 3b95465..4b2d5ed 100644 |
1211 |
+--- a/drivers/net/can/usb/kvaser_usb.c |
1212 |
++++ b/drivers/net/can/usb/kvaser_usb.c |
1213 |
+@@ -1544,9 +1544,9 @@ static int kvaser_usb_init_one(struct usb_interface *intf, |
1214 |
+ return 0; |
1215 |
+ } |
1216 |
+ |
1217 |
+-static void kvaser_usb_get_endpoints(const struct usb_interface *intf, |
1218 |
+- struct usb_endpoint_descriptor **in, |
1219 |
+- struct usb_endpoint_descriptor **out) |
1220 |
++static int kvaser_usb_get_endpoints(const struct usb_interface *intf, |
1221 |
++ struct usb_endpoint_descriptor **in, |
1222 |
++ struct usb_endpoint_descriptor **out) |
1223 |
+ { |
1224 |
+ const struct usb_host_interface *iface_desc; |
1225 |
+ struct usb_endpoint_descriptor *endpoint; |
1226 |
+@@ -1557,12 +1557,18 @@ static void kvaser_usb_get_endpoints(const struct usb_interface *intf, |
1227 |
+ for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { |
1228 |
+ endpoint = &iface_desc->endpoint[i].desc; |
1229 |
+ |
1230 |
+- if (usb_endpoint_is_bulk_in(endpoint)) |
1231 |
++ if (!*in && usb_endpoint_is_bulk_in(endpoint)) |
1232 |
+ *in = endpoint; |
1233 |
+ |
1234 |
+- if (usb_endpoint_is_bulk_out(endpoint)) |
1235 |
++ if (!*out && usb_endpoint_is_bulk_out(endpoint)) |
1236 |
+ *out = endpoint; |
1237 |
++ |
1238 |
++ /* use first bulk endpoint for in and out */ |
1239 |
++ if (*in && *out) |
1240 |
++ return 0; |
1241 |
+ } |
1242 |
++ |
1243 |
++ return -ENODEV; |
1244 |
+ } |
1245 |
+ |
1246 |
+ static int kvaser_usb_probe(struct usb_interface *intf, |
1247 |
+@@ -1576,8 +1582,8 @@ static int kvaser_usb_probe(struct usb_interface *intf, |
1248 |
+ if (!dev) |
1249 |
+ return -ENOMEM; |
1250 |
+ |
1251 |
+- kvaser_usb_get_endpoints(intf, &dev->bulk_in, &dev->bulk_out); |
1252 |
+- if (!dev->bulk_in || !dev->bulk_out) { |
1253 |
++ err = kvaser_usb_get_endpoints(intf, &dev->bulk_in, &dev->bulk_out); |
1254 |
++ if (err) { |
1255 |
+ dev_err(&intf->dev, "Cannot get usb endpoint(s)"); |
1256 |
+ return err; |
1257 |
+ } |
1258 |
+diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c |
1259 |
+index fc95b23..6305a5d 100644 |
1260 |
+--- a/drivers/net/ethernet/atheros/alx/main.c |
1261 |
++++ b/drivers/net/ethernet/atheros/alx/main.c |
1262 |
+@@ -1389,6 +1389,9 @@ static int alx_resume(struct device *dev) |
1263 |
+ { |
1264 |
+ struct pci_dev *pdev = to_pci_dev(dev); |
1265 |
+ struct alx_priv *alx = pci_get_drvdata(pdev); |
1266 |
++ struct alx_hw *hw = &alx->hw; |
1267 |
++ |
1268 |
++ alx_reset_phy(hw); |
1269 |
+ |
1270 |
+ if (!netif_running(alx->dev)) |
1271 |
+ return 0; |
1272 |
+diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c |
1273 |
+index 668dd27..cc6a0a5 100644 |
1274 |
+--- a/drivers/net/wireless/libertas/debugfs.c |
1275 |
++++ b/drivers/net/wireless/libertas/debugfs.c |
1276 |
+@@ -913,7 +913,10 @@ static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf, |
1277 |
+ char *p2; |
1278 |
+ struct debug_data *d = f->private_data; |
1279 |
+ |
1280 |
+- pdata = kmalloc(cnt, GFP_KERNEL); |
1281 |
++ if (cnt == 0) |
1282 |
++ return 0; |
1283 |
++ |
1284 |
++ pdata = kmalloc(cnt + 1, GFP_KERNEL); |
1285 |
+ if (pdata == NULL) |
1286 |
+ return 0; |
1287 |
+ |
1288 |
+@@ -922,6 +925,7 @@ static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf, |
1289 |
+ kfree(pdata); |
1290 |
+ return 0; |
1291 |
+ } |
1292 |
++ pdata[cnt] = '\0'; |
1293 |
+ |
1294 |
+ p0 = pdata; |
1295 |
+ for (i = 0; i < num_of_items; i++) { |
1296 |
+diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c |
1297 |
+index 88ce656..1400787 100644 |
1298 |
+--- a/drivers/net/wireless/rt2x00/rt2800lib.c |
1299 |
++++ b/drivers/net/wireless/rt2x00/rt2800lib.c |
1300 |
+@@ -4461,10 +4461,13 @@ void rt2800_link_tuner(struct rt2x00_dev *rt2x00dev, struct link_qual *qual, |
1301 |
+ |
1302 |
+ vgc = rt2800_get_default_vgc(rt2x00dev); |
1303 |
+ |
1304 |
+- if (rt2x00_rt(rt2x00dev, RT5592) && qual->rssi > -65) |
1305 |
+- vgc += 0x20; |
1306 |
+- else if (qual->rssi > -80) |
1307 |
+- vgc += 0x10; |
1308 |
++ if (rt2x00_rt(rt2x00dev, RT5592)) { |
1309 |
++ if (qual->rssi > -65) |
1310 |
++ vgc += 0x20; |
1311 |
++ } else { |
1312 |
++ if (qual->rssi > -80) |
1313 |
++ vgc += 0x10; |
1314 |
++ } |
1315 |
+ |
1316 |
+ rt2800_set_vgc(rt2x00dev, qual, vgc); |
1317 |
+ } |
1318 |
+diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c |
1319 |
+index 96961b9..4feb35a 100644 |
1320 |
+--- a/drivers/net/wireless/rt2x00/rt2800usb.c |
1321 |
++++ b/drivers/net/wireless/rt2x00/rt2800usb.c |
1322 |
+@@ -148,6 +148,8 @@ static bool rt2800usb_txstatus_timeout(struct rt2x00_dev *rt2x00dev) |
1323 |
+ return false; |
1324 |
+ } |
1325 |
+ |
1326 |
++#define TXSTATUS_READ_INTERVAL 1000000 |
1327 |
++ |
1328 |
+ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev, |
1329 |
+ int urb_status, u32 tx_status) |
1330 |
+ { |
1331 |
+@@ -176,8 +178,9 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev, |
1332 |
+ queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work); |
1333 |
+ |
1334 |
+ if (rt2800usb_txstatus_pending(rt2x00dev)) { |
1335 |
+- /* Read register after 250 us */ |
1336 |
+- hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 250000), |
1337 |
++ /* Read register after 1 ms */ |
1338 |
++ hrtimer_start(&rt2x00dev->txstatus_timer, |
1339 |
++ ktime_set(0, TXSTATUS_READ_INTERVAL), |
1340 |
+ HRTIMER_MODE_REL); |
1341 |
+ return false; |
1342 |
+ } |
1343 |
+@@ -202,8 +205,9 @@ static void rt2800usb_async_read_tx_status(struct rt2x00_dev *rt2x00dev) |
1344 |
+ if (test_and_set_bit(TX_STATUS_READING, &rt2x00dev->flags)) |
1345 |
+ return; |
1346 |
+ |
1347 |
+- /* Read TX_STA_FIFO register after 500 us */ |
1348 |
+- hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 500000), |
1349 |
++ /* Read TX_STA_FIFO register after 2 ms */ |
1350 |
++ hrtimer_start(&rt2x00dev->txstatus_timer, |
1351 |
++ ktime_set(0, 2*TXSTATUS_READ_INTERVAL), |
1352 |
+ HRTIMER_MODE_REL); |
1353 |
+ } |
1354 |
+ |
1355 |
+diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c |
1356 |
+index 712eea9..f12e909 100644 |
1357 |
+--- a/drivers/net/wireless/rt2x00/rt2x00dev.c |
1358 |
++++ b/drivers/net/wireless/rt2x00/rt2x00dev.c |
1359 |
+@@ -181,6 +181,7 @@ static void rt2x00lib_autowakeup(struct work_struct *work) |
1360 |
+ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac, |
1361 |
+ struct ieee80211_vif *vif) |
1362 |
+ { |
1363 |
++ struct ieee80211_tx_control control = {}; |
1364 |
+ struct rt2x00_dev *rt2x00dev = data; |
1365 |
+ struct sk_buff *skb; |
1366 |
+ |
1367 |
+@@ -195,7 +196,7 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac, |
1368 |
+ */ |
1369 |
+ skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); |
1370 |
+ while (skb) { |
1371 |
+- rt2x00mac_tx(rt2x00dev->hw, NULL, skb); |
1372 |
++ rt2x00mac_tx(rt2x00dev->hw, &control, skb); |
1373 |
+ skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); |
1374 |
+ } |
1375 |
+ } |
1376 |
+diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h |
1377 |
+index a093598..7f40ab8 100644 |
1378 |
+--- a/drivers/net/wireless/rt2x00/rt2x00lib.h |
1379 |
++++ b/drivers/net/wireless/rt2x00/rt2x00lib.h |
1380 |
+@@ -146,7 +146,7 @@ void rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int header_length); |
1381 |
+ * @local: frame is not from mac80211 |
1382 |
+ */ |
1383 |
+ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb, |
1384 |
+- bool local); |
1385 |
++ struct ieee80211_sta *sta, bool local); |
1386 |
+ |
1387 |
+ /** |
1388 |
+ * rt2x00queue_update_beacon - Send new beacon from mac80211 |
1389 |
+diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c |
1390 |
+index f883802..f8cff1f 100644 |
1391 |
+--- a/drivers/net/wireless/rt2x00/rt2x00mac.c |
1392 |
++++ b/drivers/net/wireless/rt2x00/rt2x00mac.c |
1393 |
+@@ -90,7 +90,7 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, |
1394 |
+ frag_skb->data, data_length, tx_info, |
1395 |
+ (struct ieee80211_rts *)(skb->data)); |
1396 |
+ |
1397 |
+- retval = rt2x00queue_write_tx_frame(queue, skb, true); |
1398 |
++ retval = rt2x00queue_write_tx_frame(queue, skb, NULL, true); |
1399 |
+ if (retval) { |
1400 |
+ dev_kfree_skb_any(skb); |
1401 |
+ rt2x00_warn(rt2x00dev, "Failed to send RTS/CTS frame\n"); |
1402 |
+@@ -151,7 +151,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, |
1403 |
+ goto exit_fail; |
1404 |
+ } |
1405 |
+ |
1406 |
+- if (unlikely(rt2x00queue_write_tx_frame(queue, skb, false))) |
1407 |
++ if (unlikely(rt2x00queue_write_tx_frame(queue, skb, control->sta, false))) |
1408 |
+ goto exit_fail; |
1409 |
+ |
1410 |
+ /* |
1411 |
+@@ -754,6 +754,9 @@ void rt2x00mac_flush(struct ieee80211_hw *hw, u32 queues, bool drop) |
1412 |
+ struct rt2x00_dev *rt2x00dev = hw->priv; |
1413 |
+ struct data_queue *queue; |
1414 |
+ |
1415 |
++ if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags)) |
1416 |
++ return; |
1417 |
++ |
1418 |
+ tx_queue_for_each(rt2x00dev, queue) |
1419 |
+ rt2x00queue_flush_queue(queue, drop); |
1420 |
+ } |
1421 |
+diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c |
1422 |
+index 6c8a33b..66a2db8 100644 |
1423 |
+--- a/drivers/net/wireless/rt2x00/rt2x00queue.c |
1424 |
++++ b/drivers/net/wireless/rt2x00/rt2x00queue.c |
1425 |
+@@ -635,7 +635,7 @@ static void rt2x00queue_bar_check(struct queue_entry *entry) |
1426 |
+ } |
1427 |
+ |
1428 |
+ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb, |
1429 |
+- bool local) |
1430 |
++ struct ieee80211_sta *sta, bool local) |
1431 |
+ { |
1432 |
+ struct ieee80211_tx_info *tx_info; |
1433 |
+ struct queue_entry *entry; |
1434 |
+@@ -649,7 +649,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb, |
1435 |
+ * after that we are free to use the skb->cb array |
1436 |
+ * for our information. |
1437 |
+ */ |
1438 |
+- rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc, NULL); |
1439 |
++ rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc, sta); |
1440 |
+ |
1441 |
+ /* |
1442 |
+ * All information is retrieved from the skb->cb array, |
1443 |
+diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c |
1444 |
+index 03ca6c1..4e86e97 100644 |
1445 |
+--- a/drivers/platform/x86/thinkpad_acpi.c |
1446 |
++++ b/drivers/platform/x86/thinkpad_acpi.c |
1447 |
+@@ -6420,7 +6420,12 @@ static struct ibm_struct brightness_driver_data = { |
1448 |
+ #define TPACPI_ALSA_SHRTNAME "ThinkPad Console Audio Control" |
1449 |
+ #define TPACPI_ALSA_MIXERNAME TPACPI_ALSA_SHRTNAME |
1450 |
+ |
1451 |
+-static int alsa_index = ~((1 << (SNDRV_CARDS - 3)) - 1); /* last three slots */ |
1452 |
++#if SNDRV_CARDS <= 32 |
1453 |
++#define DEFAULT_ALSA_IDX ~((1 << (SNDRV_CARDS - 3)) - 1) |
1454 |
++#else |
1455 |
++#define DEFAULT_ALSA_IDX ~((1 << (32 - 3)) - 1) |
1456 |
++#endif |
1457 |
++static int alsa_index = DEFAULT_ALSA_IDX; /* last three slots */ |
1458 |
+ static char *alsa_id = "ThinkPadEC"; |
1459 |
+ static bool alsa_enable = SNDRV_DEFAULT_ENABLE1; |
1460 |
+ |
1461 |
+diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c |
1462 |
+index d85ac1a..fbcd48d 100644 |
1463 |
+--- a/drivers/scsi/aacraid/commctrl.c |
1464 |
++++ b/drivers/scsi/aacraid/commctrl.c |
1465 |
+@@ -511,7 +511,8 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) |
1466 |
+ goto cleanup; |
1467 |
+ } |
1468 |
+ |
1469 |
+- if (fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))) { |
1470 |
++ if ((fibsize < (sizeof(struct user_aac_srb) - sizeof(struct user_sgentry))) || |
1471 |
++ (fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr)))) { |
1472 |
+ rcode = -EINVAL; |
1473 |
+ goto cleanup; |
1474 |
+ } |
1475 |
+diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c |
1476 |
+index 8e76ddc..5a5e9c9 100644 |
1477 |
+--- a/drivers/staging/android/ashmem.c |
1478 |
++++ b/drivers/staging/android/ashmem.c |
1479 |
+@@ -706,7 +706,7 @@ static long ashmem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
1480 |
+ .gfp_mask = GFP_KERNEL, |
1481 |
+ .nr_to_scan = LONG_MAX, |
1482 |
+ }; |
1483 |
+- |
1484 |
++ ret = ashmem_shrink_count(&ashmem_shrinker, &sc); |
1485 |
+ nodes_setall(sc.nodes_to_scan); |
1486 |
+ ashmem_shrink_scan(&ashmem_shrinker, &sc); |
1487 |
+ } |
1488 |
+diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c |
1489 |
+index 1636c7c..a3af469 100644 |
1490 |
+--- a/drivers/staging/comedi/comedi_fops.c |
1491 |
++++ b/drivers/staging/comedi/comedi_fops.c |
1492 |
+@@ -543,7 +543,7 @@ void *comedi_alloc_spriv(struct comedi_subdevice *s, size_t size) |
1493 |
+ { |
1494 |
+ s->private = kzalloc(size, GFP_KERNEL); |
1495 |
+ if (s->private) |
1496 |
+- comedi_set_subdevice_runflags(s, ~0, SRF_FREE_SPRIV); |
1497 |
++ s->runflags |= SRF_FREE_SPRIV; |
1498 |
+ return s->private; |
1499 |
+ } |
1500 |
+ EXPORT_SYMBOL_GPL(comedi_alloc_spriv); |
1501 |
+@@ -1485,7 +1485,8 @@ static int do_cmd_ioctl(struct comedi_device *dev, |
1502 |
+ if (async->cmd.flags & TRIG_WAKE_EOS) |
1503 |
+ async->cb_mask |= COMEDI_CB_EOS; |
1504 |
+ |
1505 |
+- comedi_set_subdevice_runflags(s, ~0, SRF_USER | SRF_RUNNING); |
1506 |
++ comedi_set_subdevice_runflags(s, SRF_USER | SRF_ERROR | SRF_RUNNING, |
1507 |
++ SRF_USER | SRF_RUNNING); |
1508 |
+ |
1509 |
+ /* set s->busy _after_ setting SRF_RUNNING flag to avoid race with |
1510 |
+ * comedi_read() or comedi_write() */ |
1511 |
+diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c |
1512 |
+index 63bc913..8b2b4a8 100644 |
1513 |
+--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c |
1514 |
++++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c |
1515 |
+@@ -707,6 +707,10 @@ int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname) |
1516 |
+ return 0; |
1517 |
+ } |
1518 |
+ |
1519 |
++static const struct device_type wlan_type = { |
1520 |
++ .name = "wlan", |
1521 |
++}; |
1522 |
++ |
1523 |
+ struct net_device *rtw_init_netdev(struct adapter *old_padapter) |
1524 |
+ { |
1525 |
+ struct adapter *padapter; |
1526 |
+@@ -722,6 +726,7 @@ struct net_device *rtw_init_netdev(struct adapter *old_padapter) |
1527 |
+ if (!pnetdev) |
1528 |
+ return NULL; |
1529 |
+ |
1530 |
++ pnetdev->dev.type = &wlan_type; |
1531 |
+ padapter = rtw_netdev_priv(pnetdev); |
1532 |
+ padapter->pnetdev = pnetdev; |
1533 |
+ DBG_88E("register rtw_netdev_ops to netdev_ops\n"); |
1534 |
+diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c |
1535 |
+index 2c4ed52..012ba15 100644 |
1536 |
+--- a/drivers/staging/zram/zram_drv.c |
1537 |
++++ b/drivers/staging/zram/zram_drv.c |
1538 |
+@@ -648,6 +648,9 @@ static ssize_t reset_store(struct device *dev, |
1539 |
+ zram = dev_to_zram(dev); |
1540 |
+ bdev = bdget_disk(zram->disk, 0); |
1541 |
+ |
1542 |
++ if (!bdev) |
1543 |
++ return -ENOMEM; |
1544 |
++ |
1545 |
+ /* Do not reset an active device! */ |
1546 |
+ if (bdev->bd_holders) |
1547 |
+ return -EBUSY; |
1548 |
+@@ -660,8 +663,7 @@ static ssize_t reset_store(struct device *dev, |
1549 |
+ return -EINVAL; |
1550 |
+ |
1551 |
+ /* Make sure all pending I/O is finished */ |
1552 |
+- if (bdev) |
1553 |
+- fsync_bdev(bdev); |
1554 |
++ fsync_bdev(bdev); |
1555 |
+ |
1556 |
+ zram_reset_device(zram, true); |
1557 |
+ return len; |
1558 |
+diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c |
1559 |
+index f7841d4..689433c 100644 |
1560 |
+--- a/drivers/usb/core/driver.c |
1561 |
++++ b/drivers/usb/core/driver.c |
1562 |
+@@ -1790,6 +1790,9 @@ int usb_set_usb2_hardware_lpm(struct usb_device *udev, int enable) |
1563 |
+ struct usb_hcd *hcd = bus_to_hcd(udev->bus); |
1564 |
+ int ret = -EPERM; |
1565 |
+ |
1566 |
++ if (enable && !udev->usb2_hw_lpm_allowed) |
1567 |
++ return 0; |
1568 |
++ |
1569 |
+ if (hcd->driver->set_usb2_hw_lpm) { |
1570 |
+ ret = hcd->driver->set_usb2_hw_lpm(hcd, udev, enable); |
1571 |
+ if (!ret) |
1572 |
+diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c |
1573 |
+index 879651c..243c672 100644 |
1574 |
+--- a/drivers/usb/core/hub.c |
1575 |
++++ b/drivers/usb/core/hub.c |
1576 |
+@@ -1135,6 +1135,11 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) |
1577 |
+ usb_clear_port_feature(hub->hdev, port1, |
1578 |
+ USB_PORT_FEAT_C_ENABLE); |
1579 |
+ } |
1580 |
++ if (portchange & USB_PORT_STAT_C_RESET) { |
1581 |
++ need_debounce_delay = true; |
1582 |
++ usb_clear_port_feature(hub->hdev, port1, |
1583 |
++ USB_PORT_FEAT_C_RESET); |
1584 |
++ } |
1585 |
+ if ((portchange & USB_PORT_STAT_C_BH_RESET) && |
1586 |
+ hub_is_superspeed(hub->hdev)) { |
1587 |
+ need_debounce_delay = true; |
1588 |
+@@ -3954,6 +3959,32 @@ static int hub_set_address(struct usb_device *udev, int devnum) |
1589 |
+ return retval; |
1590 |
+ } |
1591 |
+ |
1592 |
++/* |
1593 |
++ * There are reports of USB 3.0 devices that say they support USB 2.0 Link PM |
1594 |
++ * when they're plugged into a USB 2.0 port, but they don't work when LPM is |
1595 |
++ * enabled. |
1596 |
++ * |
1597 |
++ * Only enable USB 2.0 Link PM if the port is internal (hardwired), or the |
1598 |
++ * device says it supports the new USB 2.0 Link PM errata by setting the BESL |
1599 |
++ * support bit in the BOS descriptor. |
1600 |
++ */ |
1601 |
++static void hub_set_initial_usb2_lpm_policy(struct usb_device *udev) |
1602 |
++{ |
1603 |
++ int connect_type; |
1604 |
++ |
1605 |
++ if (!udev->usb2_hw_lpm_capable) |
1606 |
++ return; |
1607 |
++ |
1608 |
++ connect_type = usb_get_hub_port_connect_type(udev->parent, |
1609 |
++ udev->portnum); |
1610 |
++ |
1611 |
++ if ((udev->bos->ext_cap->bmAttributes & USB_BESL_SUPPORT) || |
1612 |
++ connect_type == USB_PORT_CONNECT_TYPE_HARD_WIRED) { |
1613 |
++ udev->usb2_hw_lpm_allowed = 1; |
1614 |
++ usb_set_usb2_hardware_lpm(udev, 1); |
1615 |
++ } |
1616 |
++} |
1617 |
++ |
1618 |
+ /* Reset device, (re)assign address, get device descriptor. |
1619 |
+ * Device connection must be stable, no more debouncing needed. |
1620 |
+ * Returns device in USB_STATE_ADDRESS, except on error. |
1621 |
+@@ -4247,6 +4278,7 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, |
1622 |
+ /* notify HCD that we have a device connected and addressed */ |
1623 |
+ if (hcd->driver->update_device) |
1624 |
+ hcd->driver->update_device(hcd, udev); |
1625 |
++ hub_set_initial_usb2_lpm_policy(udev); |
1626 |
+ fail: |
1627 |
+ if (retval) { |
1628 |
+ hub_port_disable(hub, port1, 0); |
1629 |
+@@ -5091,6 +5123,12 @@ static int usb_reset_and_verify_device(struct usb_device *udev) |
1630 |
+ } |
1631 |
+ parent_hub = usb_hub_to_struct_hub(parent_hdev); |
1632 |
+ |
1633 |
++ /* Disable USB2 hardware LPM. |
1634 |
++ * It will be re-enabled by the enumeration process. |
1635 |
++ */ |
1636 |
++ if (udev->usb2_hw_lpm_enabled == 1) |
1637 |
++ usb_set_usb2_hardware_lpm(udev, 0); |
1638 |
++ |
1639 |
+ bos = udev->bos; |
1640 |
+ udev->bos = NULL; |
1641 |
+ |
1642 |
+@@ -5198,6 +5236,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev) |
1643 |
+ |
1644 |
+ done: |
1645 |
+ /* Now that the alt settings are re-installed, enable LTM and LPM. */ |
1646 |
++ usb_set_usb2_hardware_lpm(udev, 1); |
1647 |
+ usb_unlocked_enable_lpm(udev); |
1648 |
+ usb_enable_ltm(udev); |
1649 |
+ usb_release_bos_descriptor(udev); |
1650 |
+diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c |
1651 |
+index 6d2c8ed..ca516ac 100644 |
1652 |
+--- a/drivers/usb/core/sysfs.c |
1653 |
++++ b/drivers/usb/core/sysfs.c |
1654 |
+@@ -449,7 +449,7 @@ static ssize_t usb2_hardware_lpm_show(struct device *dev, |
1655 |
+ struct usb_device *udev = to_usb_device(dev); |
1656 |
+ const char *p; |
1657 |
+ |
1658 |
+- if (udev->usb2_hw_lpm_enabled == 1) |
1659 |
++ if (udev->usb2_hw_lpm_allowed == 1) |
1660 |
+ p = "enabled"; |
1661 |
+ else |
1662 |
+ p = "disabled"; |
1663 |
+@@ -469,8 +469,10 @@ static ssize_t usb2_hardware_lpm_store(struct device *dev, |
1664 |
+ |
1665 |
+ ret = strtobool(buf, &value); |
1666 |
+ |
1667 |
+- if (!ret) |
1668 |
++ if (!ret) { |
1669 |
++ udev->usb2_hw_lpm_allowed = value; |
1670 |
+ ret = usb_set_usb2_hardware_lpm(udev, value); |
1671 |
++ } |
1672 |
+ |
1673 |
+ usb_unlock_device(udev); |
1674 |
+ |
1675 |
+diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c |
1676 |
+index 83bcd13..49b8bd0 100644 |
1677 |
+--- a/drivers/usb/host/xhci-mem.c |
1678 |
++++ b/drivers/usb/host/xhci-mem.c |
1679 |
+@@ -1693,9 +1693,7 @@ void xhci_free_command(struct xhci_hcd *xhci, |
1680 |
+ void xhci_mem_cleanup(struct xhci_hcd *xhci) |
1681 |
+ { |
1682 |
+ struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller); |
1683 |
+- struct dev_info *dev_info, *next; |
1684 |
+ struct xhci_cd *cur_cd, *next_cd; |
1685 |
+- unsigned long flags; |
1686 |
+ int size; |
1687 |
+ int i, j, num_ports; |
1688 |
+ |
1689 |
+@@ -1756,13 +1754,6 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) |
1690 |
+ |
1691 |
+ scratchpad_free(xhci); |
1692 |
+ |
1693 |
+- spin_lock_irqsave(&xhci->lock, flags); |
1694 |
+- list_for_each_entry_safe(dev_info, next, &xhci->lpm_failed_devs, list) { |
1695 |
+- list_del(&dev_info->list); |
1696 |
+- kfree(dev_info); |
1697 |
+- } |
1698 |
+- spin_unlock_irqrestore(&xhci->lock, flags); |
1699 |
+- |
1700 |
+ if (!xhci->rh_bw) |
1701 |
+ goto no_bw; |
1702 |
+ |
1703 |
+@@ -2231,7 +2222,6 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) |
1704 |
+ u32 page_size, temp; |
1705 |
+ int i; |
1706 |
+ |
1707 |
+- INIT_LIST_HEAD(&xhci->lpm_failed_devs); |
1708 |
+ INIT_LIST_HEAD(&xhci->cancel_cmd_list); |
1709 |
+ |
1710 |
+ page_size = xhci_readl(xhci, &xhci->op_regs->page_size); |
1711 |
+diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c |
1712 |
+index 6e0d886..ed6c186 100644 |
1713 |
+--- a/drivers/usb/host/xhci.c |
1714 |
++++ b/drivers/usb/host/xhci.c |
1715 |
+@@ -4025,133 +4025,6 @@ static int xhci_calculate_usb2_hw_lpm_params(struct usb_device *udev) |
1716 |
+ return PORT_BESLD(besld) | PORT_L1_TIMEOUT(l1) | PORT_HIRDM(hirdm); |
1717 |
+ } |
1718 |
+ |
1719 |
+-static int xhci_usb2_software_lpm_test(struct usb_hcd *hcd, |
1720 |
+- struct usb_device *udev) |
1721 |
+-{ |
1722 |
+- struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
1723 |
+- struct dev_info *dev_info; |
1724 |
+- __le32 __iomem **port_array; |
1725 |
+- __le32 __iomem *addr, *pm_addr; |
1726 |
+- u32 temp, dev_id; |
1727 |
+- unsigned int port_num; |
1728 |
+- unsigned long flags; |
1729 |
+- int hird; |
1730 |
+- int ret; |
1731 |
+- |
1732 |
+- if (hcd->speed == HCD_USB3 || !xhci->sw_lpm_support || |
1733 |
+- !udev->lpm_capable) |
1734 |
+- return -EINVAL; |
1735 |
+- |
1736 |
+- /* we only support lpm for non-hub device connected to root hub yet */ |
1737 |
+- if (!udev->parent || udev->parent->parent || |
1738 |
+- udev->descriptor.bDeviceClass == USB_CLASS_HUB) |
1739 |
+- return -EINVAL; |
1740 |
+- |
1741 |
+- spin_lock_irqsave(&xhci->lock, flags); |
1742 |
+- |
1743 |
+- /* Look for devices in lpm_failed_devs list */ |
1744 |
+- dev_id = le16_to_cpu(udev->descriptor.idVendor) << 16 | |
1745 |
+- le16_to_cpu(udev->descriptor.idProduct); |
1746 |
+- list_for_each_entry(dev_info, &xhci->lpm_failed_devs, list) { |
1747 |
+- if (dev_info->dev_id == dev_id) { |
1748 |
+- ret = -EINVAL; |
1749 |
+- goto finish; |
1750 |
+- } |
1751 |
+- } |
1752 |
+- |
1753 |
+- port_array = xhci->usb2_ports; |
1754 |
+- port_num = udev->portnum - 1; |
1755 |
+- |
1756 |
+- if (port_num > HCS_MAX_PORTS(xhci->hcs_params1)) { |
1757 |
+- xhci_dbg(xhci, "invalid port number %d\n", udev->portnum); |
1758 |
+- ret = -EINVAL; |
1759 |
+- goto finish; |
1760 |
+- } |
1761 |
+- |
1762 |
+- /* |
1763 |
+- * Test USB 2.0 software LPM. |
1764 |
+- * FIXME: some xHCI 1.0 hosts may implement a new register to set up |
1765 |
+- * hardware-controlled USB 2.0 LPM. See section 5.4.11 and 4.23.5.1.1.1 |
1766 |
+- * in the June 2011 errata release. |
1767 |
+- */ |
1768 |
+- xhci_dbg(xhci, "test port %d software LPM\n", port_num); |
1769 |
+- /* |
1770 |
+- * Set L1 Device Slot and HIRD/BESL. |
1771 |
+- * Check device's USB 2.0 extension descriptor to determine whether |
1772 |
+- * HIRD or BESL shoule be used. See USB2.0 LPM errata. |
1773 |
+- */ |
1774 |
+- pm_addr = port_array[port_num] + PORTPMSC; |
1775 |
+- hird = xhci_calculate_hird_besl(xhci, udev); |
1776 |
+- temp = PORT_L1DS(udev->slot_id) | PORT_HIRD(hird); |
1777 |
+- xhci_writel(xhci, temp, pm_addr); |
1778 |
+- |
1779 |
+- /* Set port link state to U2(L1) */ |
1780 |
+- addr = port_array[port_num]; |
1781 |
+- xhci_set_link_state(xhci, port_array, port_num, XDEV_U2); |
1782 |
+- |
1783 |
+- /* wait for ACK */ |
1784 |
+- spin_unlock_irqrestore(&xhci->lock, flags); |
1785 |
+- msleep(10); |
1786 |
+- spin_lock_irqsave(&xhci->lock, flags); |
1787 |
+- |
1788 |
+- /* Check L1 Status */ |
1789 |
+- ret = xhci_handshake(xhci, pm_addr, |
1790 |
+- PORT_L1S_MASK, PORT_L1S_SUCCESS, 125); |
1791 |
+- if (ret != -ETIMEDOUT) { |
1792 |
+- /* enter L1 successfully */ |
1793 |
+- temp = xhci_readl(xhci, addr); |
1794 |
+- xhci_dbg(xhci, "port %d entered L1 state, port status 0x%x\n", |
1795 |
+- port_num, temp); |
1796 |
+- ret = 0; |
1797 |
+- } else { |
1798 |
+- temp = xhci_readl(xhci, pm_addr); |
1799 |
+- xhci_dbg(xhci, "port %d software lpm failed, L1 status %d\n", |
1800 |
+- port_num, temp & PORT_L1S_MASK); |
1801 |
+- ret = -EINVAL; |
1802 |
+- } |
1803 |
+- |
1804 |
+- /* Resume the port */ |
1805 |
+- xhci_set_link_state(xhci, port_array, port_num, XDEV_U0); |
1806 |
+- |
1807 |
+- spin_unlock_irqrestore(&xhci->lock, flags); |
1808 |
+- msleep(10); |
1809 |
+- spin_lock_irqsave(&xhci->lock, flags); |
1810 |
+- |
1811 |
+- /* Clear PLC */ |
1812 |
+- xhci_test_and_clear_bit(xhci, port_array, port_num, PORT_PLC); |
1813 |
+- |
1814 |
+- /* Check PORTSC to make sure the device is in the right state */ |
1815 |
+- if (!ret) { |
1816 |
+- temp = xhci_readl(xhci, addr); |
1817 |
+- xhci_dbg(xhci, "resumed port %d status 0x%x\n", port_num, temp); |
1818 |
+- if (!(temp & PORT_CONNECT) || !(temp & PORT_PE) || |
1819 |
+- (temp & PORT_PLS_MASK) != XDEV_U0) { |
1820 |
+- xhci_dbg(xhci, "port L1 resume fail\n"); |
1821 |
+- ret = -EINVAL; |
1822 |
+- } |
1823 |
+- } |
1824 |
+- |
1825 |
+- if (ret) { |
1826 |
+- /* Insert dev to lpm_failed_devs list */ |
1827 |
+- xhci_warn(xhci, "device LPM test failed, may disconnect and " |
1828 |
+- "re-enumerate\n"); |
1829 |
+- dev_info = kzalloc(sizeof(struct dev_info), GFP_ATOMIC); |
1830 |
+- if (!dev_info) { |
1831 |
+- ret = -ENOMEM; |
1832 |
+- goto finish; |
1833 |
+- } |
1834 |
+- dev_info->dev_id = dev_id; |
1835 |
+- INIT_LIST_HEAD(&dev_info->list); |
1836 |
+- list_add(&dev_info->list, &xhci->lpm_failed_devs); |
1837 |
+- } else { |
1838 |
+- xhci_ring_device(xhci, udev->slot_id); |
1839 |
+- } |
1840 |
+- |
1841 |
+-finish: |
1842 |
+- spin_unlock_irqrestore(&xhci->lock, flags); |
1843 |
+- return ret; |
1844 |
+-} |
1845 |
+- |
1846 |
+ int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd, |
1847 |
+ struct usb_device *udev, int enable) |
1848 |
+ { |
1849 |
+@@ -4228,7 +4101,7 @@ int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd, |
1850 |
+ } |
1851 |
+ |
1852 |
+ pm_val &= ~PORT_HIRD_MASK; |
1853 |
+- pm_val |= PORT_HIRD(hird) | PORT_RWE; |
1854 |
++ pm_val |= PORT_HIRD(hird) | PORT_RWE | PORT_L1DS(udev->slot_id); |
1855 |
+ xhci_writel(xhci, pm_val, pm_addr); |
1856 |
+ pm_val = xhci_readl(xhci, pm_addr); |
1857 |
+ pm_val |= PORT_HLE; |
1858 |
+@@ -4236,7 +4109,7 @@ int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd, |
1859 |
+ /* flush write */ |
1860 |
+ xhci_readl(xhci, pm_addr); |
1861 |
+ } else { |
1862 |
+- pm_val &= ~(PORT_HLE | PORT_RWE | PORT_HIRD_MASK); |
1863 |
++ pm_val &= ~(PORT_HLE | PORT_RWE | PORT_HIRD_MASK | PORT_L1DS_MASK); |
1864 |
+ xhci_writel(xhci, pm_val, pm_addr); |
1865 |
+ /* flush write */ |
1866 |
+ xhci_readl(xhci, pm_addr); |
1867 |
+@@ -4279,24 +4152,26 @@ static int xhci_check_usb2_port_capability(struct xhci_hcd *xhci, int port, |
1868 |
+ int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev) |
1869 |
+ { |
1870 |
+ struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
1871 |
+- int ret; |
1872 |
+ int portnum = udev->portnum - 1; |
1873 |
+ |
1874 |
+- ret = xhci_usb2_software_lpm_test(hcd, udev); |
1875 |
+- if (!ret) { |
1876 |
+- xhci_dbg(xhci, "software LPM test succeed\n"); |
1877 |
+- if (xhci->hw_lpm_support == 1 && |
1878 |
+- xhci_check_usb2_port_capability(xhci, portnum, XHCI_HLC)) { |
1879 |
+- udev->usb2_hw_lpm_capable = 1; |
1880 |
+- udev->l1_params.timeout = XHCI_L1_TIMEOUT; |
1881 |
+- udev->l1_params.besl = XHCI_DEFAULT_BESL; |
1882 |
+- if (xhci_check_usb2_port_capability(xhci, portnum, |
1883 |
+- XHCI_BLC)) |
1884 |
+- udev->usb2_hw_lpm_besl_capable = 1; |
1885 |
+- ret = xhci_set_usb2_hardware_lpm(hcd, udev, 1); |
1886 |
+- if (!ret) |
1887 |
+- udev->usb2_hw_lpm_enabled = 1; |
1888 |
+- } |
1889 |
++ if (hcd->speed == HCD_USB3 || !xhci->sw_lpm_support || |
1890 |
++ !udev->lpm_capable) |
1891 |
++ return 0; |
1892 |
++ |
1893 |
++ /* we only support lpm for non-hub device connected to root hub yet */ |
1894 |
++ if (!udev->parent || udev->parent->parent || |
1895 |
++ udev->descriptor.bDeviceClass == USB_CLASS_HUB) |
1896 |
++ return 0; |
1897 |
++ |
1898 |
++ if (xhci->hw_lpm_support == 1 && |
1899 |
++ xhci_check_usb2_port_capability( |
1900 |
++ xhci, portnum, XHCI_HLC)) { |
1901 |
++ udev->usb2_hw_lpm_capable = 1; |
1902 |
++ udev->l1_params.timeout = XHCI_L1_TIMEOUT; |
1903 |
++ udev->l1_params.besl = XHCI_DEFAULT_BESL; |
1904 |
++ if (xhci_check_usb2_port_capability(xhci, portnum, |
1905 |
++ XHCI_BLC)) |
1906 |
++ udev->usb2_hw_lpm_besl_capable = 1; |
1907 |
+ } |
1908 |
+ |
1909 |
+ return 0; |
1910 |
+diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h |
1911 |
+index 941d5f5..ed3a425 100644 |
1912 |
+--- a/drivers/usb/host/xhci.h |
1913 |
++++ b/drivers/usb/host/xhci.h |
1914 |
+@@ -383,6 +383,7 @@ struct xhci_op_regs { |
1915 |
+ #define PORT_RWE (1 << 3) |
1916 |
+ #define PORT_HIRD(p) (((p) & 0xf) << 4) |
1917 |
+ #define PORT_HIRD_MASK (0xf << 4) |
1918 |
++#define PORT_L1DS_MASK (0xff << 8) |
1919 |
+ #define PORT_L1DS(p) (((p) & 0xff) << 8) |
1920 |
+ #define PORT_HLE (1 << 16) |
1921 |
+ |
1922 |
+diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c |
1923 |
+index cd70cc8..0d0d118 100644 |
1924 |
+--- a/drivers/usb/musb/musb_core.c |
1925 |
++++ b/drivers/usb/musb/musb_core.c |
1926 |
+@@ -1809,6 +1809,7 @@ static void musb_free(struct musb *musb) |
1927 |
+ disable_irq_wake(musb->nIrq); |
1928 |
+ free_irq(musb->nIrq, musb); |
1929 |
+ } |
1930 |
++ cancel_work_sync(&musb->irq_work); |
1931 |
+ if (musb->dma_controller) |
1932 |
+ dma_controller_destroy(musb->dma_controller); |
1933 |
+ |
1934 |
+@@ -1946,6 +1947,8 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) |
1935 |
+ if (status < 0) |
1936 |
+ goto fail3; |
1937 |
+ status = musb_gadget_setup(musb); |
1938 |
++ if (status) |
1939 |
++ musb_host_cleanup(musb); |
1940 |
+ break; |
1941 |
+ default: |
1942 |
+ dev_err(dev, "unsupported port mode %d\n", musb->port_mode); |
1943 |
+@@ -1972,6 +1975,7 @@ fail5: |
1944 |
+ |
1945 |
+ fail4: |
1946 |
+ musb_gadget_cleanup(musb); |
1947 |
++ musb_host_cleanup(musb); |
1948 |
+ |
1949 |
+ fail3: |
1950 |
+ if (musb->dma_controller) |
1951 |
+diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c |
1952 |
+index bd4138d..1edee79 100644 |
1953 |
+--- a/drivers/usb/musb/musb_dsps.c |
1954 |
++++ b/drivers/usb/musb/musb_dsps.c |
1955 |
+@@ -121,6 +121,7 @@ struct dsps_glue { |
1956 |
+ unsigned long last_timer; /* last timer data for each instance */ |
1957 |
+ }; |
1958 |
+ |
1959 |
++static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout); |
1960 |
+ /** |
1961 |
+ * dsps_musb_enable - enable interrupts |
1962 |
+ */ |
1963 |
+@@ -143,6 +144,7 @@ static void dsps_musb_enable(struct musb *musb) |
1964 |
+ /* Force the DRVVBUS IRQ so we can start polling for ID change. */ |
1965 |
+ dsps_writel(reg_base, wrp->coreintr_set, |
1966 |
+ (1 << wrp->drvvbus) << wrp->usb_shift); |
1967 |
++ dsps_musb_try_idle(musb, 0); |
1968 |
+ } |
1969 |
+ |
1970 |
+ /** |
1971 |
+@@ -171,6 +173,7 @@ static void otg_timer(unsigned long _musb) |
1972 |
+ const struct dsps_musb_wrapper *wrp = glue->wrp; |
1973 |
+ u8 devctl; |
1974 |
+ unsigned long flags; |
1975 |
++ int skip_session = 0; |
1976 |
+ |
1977 |
+ /* |
1978 |
+ * We poll because DSPS IP's won't expose several OTG-critical |
1979 |
+@@ -183,10 +186,12 @@ static void otg_timer(unsigned long _musb) |
1980 |
+ spin_lock_irqsave(&musb->lock, flags); |
1981 |
+ switch (musb->xceiv->state) { |
1982 |
+ case OTG_STATE_A_WAIT_BCON: |
1983 |
+- devctl &= ~MUSB_DEVCTL_SESSION; |
1984 |
+- dsps_writeb(musb->mregs, MUSB_DEVCTL, devctl); |
1985 |
++ dsps_writeb(musb->mregs, MUSB_DEVCTL, 0); |
1986 |
++ skip_session = 1; |
1987 |
++ /* fall */ |
1988 |
+ |
1989 |
+- devctl = dsps_readb(musb->mregs, MUSB_DEVCTL); |
1990 |
++ case OTG_STATE_A_IDLE: |
1991 |
++ case OTG_STATE_B_IDLE: |
1992 |
+ if (devctl & MUSB_DEVCTL_BDEVICE) { |
1993 |
+ musb->xceiv->state = OTG_STATE_B_IDLE; |
1994 |
+ MUSB_DEV_MODE(musb); |
1995 |
+@@ -194,20 +199,15 @@ static void otg_timer(unsigned long _musb) |
1996 |
+ musb->xceiv->state = OTG_STATE_A_IDLE; |
1997 |
+ MUSB_HST_MODE(musb); |
1998 |
+ } |
1999 |
++ if (!(devctl & MUSB_DEVCTL_SESSION) && !skip_session) |
2000 |
++ dsps_writeb(mregs, MUSB_DEVCTL, MUSB_DEVCTL_SESSION); |
2001 |
++ mod_timer(&glue->timer, jiffies + wrp->poll_seconds * HZ); |
2002 |
+ break; |
2003 |
+ case OTG_STATE_A_WAIT_VFALL: |
2004 |
+ musb->xceiv->state = OTG_STATE_A_WAIT_VRISE; |
2005 |
+ dsps_writel(musb->ctrl_base, wrp->coreintr_set, |
2006 |
+ MUSB_INTR_VBUSERROR << wrp->usb_shift); |
2007 |
+ break; |
2008 |
+- case OTG_STATE_B_IDLE: |
2009 |
+- devctl = dsps_readb(mregs, MUSB_DEVCTL); |
2010 |
+- if (devctl & MUSB_DEVCTL_BDEVICE) |
2011 |
+- mod_timer(&glue->timer, |
2012 |
+- jiffies + wrp->poll_seconds * HZ); |
2013 |
+- else |
2014 |
+- musb->xceiv->state = OTG_STATE_A_IDLE; |
2015 |
+- break; |
2016 |
+ default: |
2017 |
+ break; |
2018 |
+ } |
2019 |
+@@ -234,6 +234,9 @@ static void dsps_musb_try_idle(struct musb *musb, unsigned long timeout) |
2020 |
+ if (musb->port_mode == MUSB_PORT_MODE_HOST) |
2021 |
+ return; |
2022 |
+ |
2023 |
++ if (!musb->g.dev.driver) |
2024 |
++ return; |
2025 |
++ |
2026 |
+ if (time_after(glue->last_timer, timeout) && |
2027 |
+ timer_pending(&glue->timer)) { |
2028 |
+ dev_dbg(musb->controller, |
2029 |
+diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c |
2030 |
+index d1d6b83..9af6bba 100644 |
2031 |
+--- a/drivers/usb/musb/musb_virthub.c |
2032 |
++++ b/drivers/usb/musb/musb_virthub.c |
2033 |
+@@ -220,6 +220,23 @@ int musb_hub_status_data(struct usb_hcd *hcd, char *buf) |
2034 |
+ return retval; |
2035 |
+ } |
2036 |
+ |
2037 |
++static int musb_has_gadget(struct musb *musb) |
2038 |
++{ |
2039 |
++ /* |
2040 |
++ * In host-only mode we start a connection right away. In OTG mode |
2041 |
++ * we have to wait until we loaded a gadget. We don't really need a |
2042 |
++ * gadget if we operate as a host but we should not start a session |
2043 |
++ * as a device without a gadget or else we explode. |
2044 |
++ */ |
2045 |
++#ifdef CONFIG_USB_MUSB_HOST |
2046 |
++ return 1; |
2047 |
++#else |
2048 |
++ if (musb->port_mode == MUSB_PORT_MODE_HOST) |
2049 |
++ return 1; |
2050 |
++ return musb->g.dev.driver != NULL; |
2051 |
++#endif |
2052 |
++} |
2053 |
++ |
2054 |
+ int musb_hub_control( |
2055 |
+ struct usb_hcd *hcd, |
2056 |
+ u16 typeReq, |
2057 |
+@@ -362,7 +379,7 @@ int musb_hub_control( |
2058 |
+ * initialization logic, e.g. for OTG, or change any |
2059 |
+ * logic relating to VBUS power-up. |
2060 |
+ */ |
2061 |
+- if (!hcd->self.is_b_host) |
2062 |
++ if (!hcd->self.is_b_host && musb_has_gadget(musb)) |
2063 |
+ musb_start(musb); |
2064 |
+ break; |
2065 |
+ case USB_PORT_FEAT_RESET: |
2066 |
+diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c |
2067 |
+index fdf9535..e5bdd98 100644 |
2068 |
+--- a/drivers/usb/serial/mos7840.c |
2069 |
++++ b/drivers/usb/serial/mos7840.c |
2070 |
+@@ -1532,7 +1532,11 @@ static int mos7840_tiocmget(struct tty_struct *tty) |
2071 |
+ return -ENODEV; |
2072 |
+ |
2073 |
+ status = mos7840_get_uart_reg(port, MODEM_STATUS_REGISTER, &msr); |
2074 |
++ if (status != 1) |
2075 |
++ return -EIO; |
2076 |
+ status = mos7840_get_uart_reg(port, MODEM_CONTROL_REGISTER, &mcr); |
2077 |
++ if (status != 1) |
2078 |
++ return -EIO; |
2079 |
+ result = ((mcr & MCR_DTR) ? TIOCM_DTR : 0) |
2080 |
+ | ((mcr & MCR_RTS) ? TIOCM_RTS : 0) |
2081 |
+ | ((mcr & MCR_LOOPBACK) ? TIOCM_LOOP : 0) |
2082 |
+diff --git a/drivers/usb/wusbcore/wa-rpipe.c b/drivers/usb/wusbcore/wa-rpipe.c |
2083 |
+index fd4f1ce..b5e4fc1 100644 |
2084 |
+--- a/drivers/usb/wusbcore/wa-rpipe.c |
2085 |
++++ b/drivers/usb/wusbcore/wa-rpipe.c |
2086 |
+@@ -333,7 +333,10 @@ static int rpipe_aim(struct wa_rpipe *rpipe, struct wahc *wa, |
2087 |
+ /* FIXME: compute so seg_size > ep->maxpktsize */ |
2088 |
+ rpipe->descr.wBlocks = cpu_to_le16(16); /* given */ |
2089 |
+ /* ep0 maxpktsize is 0x200 (WUSB1.0[4.8.1]) */ |
2090 |
+- rpipe->descr.wMaxPacketSize = cpu_to_le16(ep->desc.wMaxPacketSize); |
2091 |
++ if (usb_endpoint_xfer_isoc(&ep->desc)) |
2092 |
++ rpipe->descr.wMaxPacketSize = epcd->wOverTheAirPacketSize; |
2093 |
++ else |
2094 |
++ rpipe->descr.wMaxPacketSize = ep->desc.wMaxPacketSize; |
2095 |
+ |
2096 |
+ rpipe->descr.hwa_bMaxBurst = max(min_t(unsigned int, |
2097 |
+ epcd->bMaxBurst, 16U), 1U); |
2098 |
+diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c |
2099 |
+index 4a35572..26450d8 100644 |
2100 |
+--- a/fs/btrfs/relocation.c |
2101 |
++++ b/fs/btrfs/relocation.c |
2102 |
+@@ -4481,6 +4481,7 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len) |
2103 |
+ struct btrfs_root *root = BTRFS_I(inode)->root; |
2104 |
+ int ret; |
2105 |
+ u64 disk_bytenr; |
2106 |
++ u64 new_bytenr; |
2107 |
+ LIST_HEAD(list); |
2108 |
+ |
2109 |
+ ordered = btrfs_lookup_ordered_extent(inode, file_pos); |
2110 |
+@@ -4492,13 +4493,24 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len) |
2111 |
+ if (ret) |
2112 |
+ goto out; |
2113 |
+ |
2114 |
+- disk_bytenr = ordered->start; |
2115 |
+ while (!list_empty(&list)) { |
2116 |
+ sums = list_entry(list.next, struct btrfs_ordered_sum, list); |
2117 |
+ list_del_init(&sums->list); |
2118 |
+ |
2119 |
+- sums->bytenr = disk_bytenr; |
2120 |
+- disk_bytenr += sums->len; |
2121 |
++ /* |
2122 |
++ * We need to offset the new_bytenr based on where the csum is. |
2123 |
++ * We need to do this because we will read in entire prealloc |
2124 |
++ * extents but we may have written to say the middle of the |
2125 |
++ * prealloc extent, so we need to make sure the csum goes with |
2126 |
++ * the right disk offset. |
2127 |
++ * |
2128 |
++ * We can do this because the data reloc inode refers strictly |
2129 |
++ * to the on disk bytes, so we don't have to worry about |
2130 |
++ * disk_len vs real len like with real inodes since it's all |
2131 |
++ * disk length. |
2132 |
++ */ |
2133 |
++ new_bytenr = ordered->start + (sums->bytenr - disk_bytenr); |
2134 |
++ sums->bytenr = new_bytenr; |
2135 |
+ |
2136 |
+ btrfs_add_ordered_sum(inode, ordered, sums); |
2137 |
+ } |
2138 |
+diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c |
2139 |
+index 277bd1b..511d415 100644 |
2140 |
+--- a/fs/configfs/dir.c |
2141 |
++++ b/fs/configfs/dir.c |
2142 |
+@@ -56,10 +56,19 @@ static void configfs_d_iput(struct dentry * dentry, |
2143 |
+ struct configfs_dirent *sd = dentry->d_fsdata; |
2144 |
+ |
2145 |
+ if (sd) { |
2146 |
+- BUG_ON(sd->s_dentry != dentry); |
2147 |
+ /* Coordinate with configfs_readdir */ |
2148 |
+ spin_lock(&configfs_dirent_lock); |
2149 |
+- sd->s_dentry = NULL; |
2150 |
++ /* Coordinate with configfs_attach_attr where will increase |
2151 |
++ * sd->s_count and update sd->s_dentry to new allocated one. |
2152 |
++ * Only set sd->dentry to null when this dentry is the only |
2153 |
++ * sd owner. |
2154 |
++ * If not do so, configfs_d_iput may run just after |
2155 |
++ * configfs_attach_attr and set sd->s_dentry to null |
2156 |
++ * even it's still in use. |
2157 |
++ */ |
2158 |
++ if (atomic_read(&sd->s_count) <= 2) |
2159 |
++ sd->s_dentry = NULL; |
2160 |
++ |
2161 |
+ spin_unlock(&configfs_dirent_lock); |
2162 |
+ configfs_put(sd); |
2163 |
+ } |
2164 |
+@@ -426,8 +435,11 @@ static int configfs_attach_attr(struct configfs_dirent * sd, struct dentry * den |
2165 |
+ struct configfs_attribute * attr = sd->s_element; |
2166 |
+ int error; |
2167 |
+ |
2168 |
++ spin_lock(&configfs_dirent_lock); |
2169 |
+ dentry->d_fsdata = configfs_get(sd); |
2170 |
+ sd->s_dentry = dentry; |
2171 |
++ spin_unlock(&configfs_dirent_lock); |
2172 |
++ |
2173 |
+ error = configfs_create(dentry, (attr->ca_mode & S_IALLUGO) | S_IFREG, |
2174 |
+ configfs_init_file); |
2175 |
+ if (error) { |
2176 |
+diff --git a/fs/dcache.c b/fs/dcache.c |
2177 |
+index ae6ebb8..89f9671 100644 |
2178 |
+--- a/fs/dcache.c |
2179 |
++++ b/fs/dcache.c |
2180 |
+@@ -2881,9 +2881,9 @@ static int prepend_path(const struct path *path, |
2181 |
+ const struct path *root, |
2182 |
+ char **buffer, int *buflen) |
2183 |
+ { |
2184 |
+- struct dentry *dentry = path->dentry; |
2185 |
+- struct vfsmount *vfsmnt = path->mnt; |
2186 |
+- struct mount *mnt = real_mount(vfsmnt); |
2187 |
++ struct dentry *dentry; |
2188 |
++ struct vfsmount *vfsmnt; |
2189 |
++ struct mount *mnt; |
2190 |
+ int error = 0; |
2191 |
+ unsigned seq = 0; |
2192 |
+ char *bptr; |
2193 |
+@@ -2893,6 +2893,9 @@ static int prepend_path(const struct path *path, |
2194 |
+ restart: |
2195 |
+ bptr = *buffer; |
2196 |
+ blen = *buflen; |
2197 |
++ dentry = path->dentry; |
2198 |
++ vfsmnt = path->mnt; |
2199 |
++ mnt = real_mount(vfsmnt); |
2200 |
+ read_seqbegin_or_lock(&rename_lock, &seq); |
2201 |
+ while (dentry != root->dentry || vfsmnt != root->mnt) { |
2202 |
+ struct dentry * parent; |
2203 |
+diff --git a/fs/exec.c b/fs/exec.c |
2204 |
+index 8875dd1..bb8afc1 100644 |
2205 |
+--- a/fs/exec.c |
2206 |
++++ b/fs/exec.c |
2207 |
+@@ -1668,6 +1668,12 @@ int __get_dumpable(unsigned long mm_flags) |
2208 |
+ return (ret > SUID_DUMP_USER) ? SUID_DUMP_ROOT : ret; |
2209 |
+ } |
2210 |
+ |
2211 |
++/* |
2212 |
++ * This returns the actual value of the suid_dumpable flag. For things |
2213 |
++ * that are using this for checking for privilege transitions, it must |
2214 |
++ * test against SUID_DUMP_USER rather than treating it as a boolean |
2215 |
++ * value. |
2216 |
++ */ |
2217 |
+ int get_dumpable(struct mm_struct *mm) |
2218 |
+ { |
2219 |
+ return __get_dumpable(mm->flags); |
2220 |
+diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c |
2221 |
+index ced3257..968d4c56 100644 |
2222 |
+--- a/fs/gfs2/inode.c |
2223 |
++++ b/fs/gfs2/inode.c |
2224 |
+@@ -584,17 +584,17 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry, |
2225 |
+ if (!IS_ERR(inode)) { |
2226 |
+ d = d_splice_alias(inode, dentry); |
2227 |
+ error = 0; |
2228 |
+- if (file && !IS_ERR(d)) { |
2229 |
+- if (d == NULL) |
2230 |
+- d = dentry; |
2231 |
+- if (S_ISREG(inode->i_mode)) |
2232 |
+- error = finish_open(file, d, gfs2_open_common, opened); |
2233 |
+- else |
2234 |
++ if (file) { |
2235 |
++ if (S_ISREG(inode->i_mode)) { |
2236 |
++ WARN_ON(d != NULL); |
2237 |
++ error = finish_open(file, dentry, gfs2_open_common, opened); |
2238 |
++ } else { |
2239 |
+ error = finish_no_open(file, d); |
2240 |
++ } |
2241 |
++ } else { |
2242 |
++ dput(d); |
2243 |
+ } |
2244 |
+ gfs2_glock_dq_uninit(ghs); |
2245 |
+- if (IS_ERR(d)) |
2246 |
+- return PTR_ERR(d); |
2247 |
+ return error; |
2248 |
+ } else if (error != -ENOENT) { |
2249 |
+ goto fail_gunlock; |
2250 |
+@@ -781,8 +781,10 @@ static struct dentry *__gfs2_lookup(struct inode *dir, struct dentry *dentry, |
2251 |
+ error = finish_open(file, dentry, gfs2_open_common, opened); |
2252 |
+ |
2253 |
+ gfs2_glock_dq_uninit(&gh); |
2254 |
+- if (error) |
2255 |
++ if (error) { |
2256 |
++ dput(d); |
2257 |
+ return ERR_PTR(error); |
2258 |
++ } |
2259 |
+ return d; |
2260 |
+ } |
2261 |
+ |
2262 |
+@@ -1163,14 +1165,16 @@ static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry, |
2263 |
+ d = __gfs2_lookup(dir, dentry, file, opened); |
2264 |
+ if (IS_ERR(d)) |
2265 |
+ return PTR_ERR(d); |
2266 |
+- if (d == NULL) |
2267 |
+- d = dentry; |
2268 |
+- if (d->d_inode) { |
2269 |
++ if (d != NULL) |
2270 |
++ dentry = d; |
2271 |
++ if (dentry->d_inode) { |
2272 |
+ if (!(*opened & FILE_OPENED)) |
2273 |
+- return finish_no_open(file, d); |
2274 |
++ return finish_no_open(file, dentry); |
2275 |
++ dput(d); |
2276 |
+ return 0; |
2277 |
+ } |
2278 |
+ |
2279 |
++ BUG_ON(d != NULL); |
2280 |
+ if (!(flags & O_CREAT)) |
2281 |
+ return -ENOENT; |
2282 |
+ |
2283 |
+diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c |
2284 |
+index d53d678..3b11565 100644 |
2285 |
+--- a/fs/nfs/nfs4proc.c |
2286 |
++++ b/fs/nfs/nfs4proc.c |
2287 |
+@@ -1318,21 +1318,14 @@ _nfs4_opendata_reclaim_to_nfs4_state(struct nfs4_opendata *data) |
2288 |
+ int ret; |
2289 |
+ |
2290 |
+ if (!data->rpc_done) { |
2291 |
+- ret = data->rpc_status; |
2292 |
+- goto err; |
2293 |
++ if (data->rpc_status) { |
2294 |
++ ret = data->rpc_status; |
2295 |
++ goto err; |
2296 |
++ } |
2297 |
++ /* cached opens have already been processed */ |
2298 |
++ goto update; |
2299 |
+ } |
2300 |
+ |
2301 |
+- ret = -ESTALE; |
2302 |
+- if (!(data->f_attr.valid & NFS_ATTR_FATTR_TYPE) || |
2303 |
+- !(data->f_attr.valid & NFS_ATTR_FATTR_FILEID) || |
2304 |
+- !(data->f_attr.valid & NFS_ATTR_FATTR_CHANGE)) |
2305 |
+- goto err; |
2306 |
+- |
2307 |
+- ret = -ENOMEM; |
2308 |
+- state = nfs4_get_open_state(inode, data->owner); |
2309 |
+- if (state == NULL) |
2310 |
+- goto err; |
2311 |
+- |
2312 |
+ ret = nfs_refresh_inode(inode, &data->f_attr); |
2313 |
+ if (ret) |
2314 |
+ goto err; |
2315 |
+@@ -1341,8 +1334,10 @@ _nfs4_opendata_reclaim_to_nfs4_state(struct nfs4_opendata *data) |
2316 |
+ |
2317 |
+ if (data->o_res.delegation_type != 0) |
2318 |
+ nfs4_opendata_check_deleg(data, state); |
2319 |
++update: |
2320 |
+ update_open_stateid(state, &data->o_res.stateid, NULL, |
2321 |
+ data->o_arg.fmode); |
2322 |
++ atomic_inc(&state->count); |
2323 |
+ |
2324 |
+ return state; |
2325 |
+ err: |
2326 |
+@@ -4575,7 +4570,7 @@ static int _nfs4_get_security_label(struct inode *inode, void *buf, |
2327 |
+ struct nfs4_label label = {0, 0, buflen, buf}; |
2328 |
+ |
2329 |
+ u32 bitmask[3] = { 0, 0, FATTR4_WORD2_SECURITY_LABEL }; |
2330 |
+- struct nfs4_getattr_arg args = { |
2331 |
++ struct nfs4_getattr_arg arg = { |
2332 |
+ .fh = NFS_FH(inode), |
2333 |
+ .bitmask = bitmask, |
2334 |
+ }; |
2335 |
+@@ -4586,14 +4581,14 @@ static int _nfs4_get_security_label(struct inode *inode, void *buf, |
2336 |
+ }; |
2337 |
+ struct rpc_message msg = { |
2338 |
+ .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_GETATTR], |
2339 |
+- .rpc_argp = &args, |
2340 |
++ .rpc_argp = &arg, |
2341 |
+ .rpc_resp = &res, |
2342 |
+ }; |
2343 |
+ int ret; |
2344 |
+ |
2345 |
+ nfs_fattr_init(&fattr); |
2346 |
+ |
2347 |
+- ret = rpc_call_sync(server->client, &msg, 0); |
2348 |
++ ret = nfs4_call_sync(server->client, server, &msg, &arg.seq_args, &res.seq_res, 0); |
2349 |
+ if (ret) |
2350 |
+ return ret; |
2351 |
+ if (!(fattr.valid & NFS_ATTR_FATTR_V4_SECURITY_LABEL)) |
2352 |
+@@ -4630,7 +4625,7 @@ static int _nfs4_do_set_security_label(struct inode *inode, |
2353 |
+ struct iattr sattr = {0}; |
2354 |
+ struct nfs_server *server = NFS_SERVER(inode); |
2355 |
+ const u32 bitmask[3] = { 0, 0, FATTR4_WORD2_SECURITY_LABEL }; |
2356 |
+- struct nfs_setattrargs args = { |
2357 |
++ struct nfs_setattrargs arg = { |
2358 |
+ .fh = NFS_FH(inode), |
2359 |
+ .iap = &sattr, |
2360 |
+ .server = server, |
2361 |
+@@ -4644,14 +4639,14 @@ static int _nfs4_do_set_security_label(struct inode *inode, |
2362 |
+ }; |
2363 |
+ struct rpc_message msg = { |
2364 |
+ .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_SETATTR], |
2365 |
+- .rpc_argp = &args, |
2366 |
++ .rpc_argp = &arg, |
2367 |
+ .rpc_resp = &res, |
2368 |
+ }; |
2369 |
+ int status; |
2370 |
+ |
2371 |
+- nfs4_stateid_copy(&args.stateid, &zero_stateid); |
2372 |
++ nfs4_stateid_copy(&arg.stateid, &zero_stateid); |
2373 |
+ |
2374 |
+- status = rpc_call_sync(server->client, &msg, 0); |
2375 |
++ status = nfs4_call_sync(server->client, server, &msg, &arg.seq_args, &res.seq_res, 1); |
2376 |
+ if (status) |
2377 |
+ dprintk("%s failed: %d\n", __func__, status); |
2378 |
+ |
2379 |
+@@ -5106,6 +5101,7 @@ static int _nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock |
2380 |
+ status = 0; |
2381 |
+ } |
2382 |
+ request->fl_ops->fl_release_private(request); |
2383 |
++ request->fl_ops = NULL; |
2384 |
+ out: |
2385 |
+ return status; |
2386 |
+ } |
2387 |
+diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c |
2388 |
+index cc14cbb..ebced8d 100644 |
2389 |
+--- a/fs/nfs/nfs4state.c |
2390 |
++++ b/fs/nfs/nfs4state.c |
2391 |
+@@ -1422,7 +1422,7 @@ restart: |
2392 |
+ if (status >= 0) { |
2393 |
+ status = nfs4_reclaim_locks(state, ops); |
2394 |
+ if (status >= 0) { |
2395 |
+- if (test_bit(NFS_DELEGATED_STATE, &state->flags) != 0) { |
2396 |
++ if (!test_bit(NFS_DELEGATED_STATE, &state->flags)) { |
2397 |
+ spin_lock(&state->state_lock); |
2398 |
+ list_for_each_entry(lock, &state->lock_states, ls_locks) { |
2399 |
+ if (!test_bit(NFS_LOCK_INITIALIZED, &lock->ls_flags)) |
2400 |
+@@ -1881,10 +1881,15 @@ again: |
2401 |
+ nfs4_root_machine_cred(clp); |
2402 |
+ goto again; |
2403 |
+ } |
2404 |
+- if (i > 2) |
2405 |
++ if (clnt->cl_auth->au_flavor == RPC_AUTH_UNIX) |
2406 |
+ break; |
2407 |
+ case -NFS4ERR_CLID_INUSE: |
2408 |
+ case -NFS4ERR_WRONGSEC: |
2409 |
++ /* No point in retrying if we already used RPC_AUTH_UNIX */ |
2410 |
++ if (clnt->cl_auth->au_flavor == RPC_AUTH_UNIX) { |
2411 |
++ status = -EPERM; |
2412 |
++ break; |
2413 |
++ } |
2414 |
+ clnt = rpc_clone_client_set_auth(clnt, RPC_AUTH_UNIX); |
2415 |
+ if (IS_ERR(clnt)) { |
2416 |
+ status = PTR_ERR(clnt); |
2417 |
+diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c |
2418 |
+index 5f38ea3..af51cf9 100644 |
2419 |
+--- a/fs/nfsd/export.c |
2420 |
++++ b/fs/nfsd/export.c |
2421 |
+@@ -536,16 +536,12 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen) |
2422 |
+ if (err) |
2423 |
+ goto out3; |
2424 |
+ exp.ex_anon_uid= make_kuid(&init_user_ns, an_int); |
2425 |
+- if (!uid_valid(exp.ex_anon_uid)) |
2426 |
+- goto out3; |
2427 |
+ |
2428 |
+ /* anon gid */ |
2429 |
+ err = get_int(&mesg, &an_int); |
2430 |
+ if (err) |
2431 |
+ goto out3; |
2432 |
+ exp.ex_anon_gid= make_kgid(&init_user_ns, an_int); |
2433 |
+- if (!gid_valid(exp.ex_anon_gid)) |
2434 |
+- goto out3; |
2435 |
+ |
2436 |
+ /* fsid */ |
2437 |
+ err = get_int(&mesg, &an_int); |
2438 |
+@@ -583,6 +579,17 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen) |
2439 |
+ exp.ex_uuid); |
2440 |
+ if (err) |
2441 |
+ goto out4; |
2442 |
++ /* |
2443 |
++ * For some reason exportfs has been passing down an |
2444 |
++ * invalid (-1) uid & gid on the "dummy" export which it |
2445 |
++ * uses to test export support. To make sure exportfs |
2446 |
++ * sees errors from check_export we therefore need to |
2447 |
++ * delay these checks till after check_export: |
2448 |
++ */ |
2449 |
++ if (!uid_valid(exp.ex_anon_uid)) |
2450 |
++ goto out4; |
2451 |
++ if (!gid_valid(exp.ex_anon_gid)) |
2452 |
++ goto out4; |
2453 |
+ } |
2454 |
+ |
2455 |
+ expp = svc_export_lookup(&exp); |
2456 |
+diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c |
2457 |
+index d9454fe..ecc735e 100644 |
2458 |
+--- a/fs/nfsd/nfs4xdr.c |
2459 |
++++ b/fs/nfsd/nfs4xdr.c |
2460 |
+@@ -141,8 +141,8 @@ xdr_error: \ |
2461 |
+ |
2462 |
+ static void next_decode_page(struct nfsd4_compoundargs *argp) |
2463 |
+ { |
2464 |
+- argp->pagelist++; |
2465 |
+ argp->p = page_address(argp->pagelist[0]); |
2466 |
++ argp->pagelist++; |
2467 |
+ if (argp->pagelen < PAGE_SIZE) { |
2468 |
+ argp->end = argp->p + (argp->pagelen>>2); |
2469 |
+ argp->pagelen = 0; |
2470 |
+@@ -411,6 +411,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, |
2471 |
+ label->data = kzalloc(dummy32 + 1, GFP_KERNEL); |
2472 |
+ if (!label->data) |
2473 |
+ return nfserr_jukebox; |
2474 |
++ label->len = dummy32; |
2475 |
+ defer_free(argp, kfree, label->data); |
2476 |
+ memcpy(label->data, buf, dummy32); |
2477 |
+ } |
2478 |
+@@ -1208,6 +1209,7 @@ nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write) |
2479 |
+ len -= pages * PAGE_SIZE; |
2480 |
+ |
2481 |
+ argp->p = (__be32 *)page_address(argp->pagelist[0]); |
2482 |
++ argp->pagelist++; |
2483 |
+ argp->end = argp->p + XDR_QUADLEN(PAGE_SIZE); |
2484 |
+ } |
2485 |
+ argp->p += XDR_QUADLEN(len); |
2486 |
+diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c |
2487 |
+index c827acb..72cb28e 100644 |
2488 |
+--- a/fs/nfsd/vfs.c |
2489 |
++++ b/fs/nfsd/vfs.c |
2490 |
+@@ -298,41 +298,12 @@ commit_metadata(struct svc_fh *fhp) |
2491 |
+ } |
2492 |
+ |
2493 |
+ /* |
2494 |
+- * Set various file attributes. |
2495 |
+- * N.B. After this call fhp needs an fh_put |
2496 |
++ * Go over the attributes and take care of the small differences between |
2497 |
++ * NFS semantics and what Linux expects. |
2498 |
+ */ |
2499 |
+-__be32 |
2500 |
+-nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, |
2501 |
+- int check_guard, time_t guardtime) |
2502 |
++static void |
2503 |
++nfsd_sanitize_attrs(struct inode *inode, struct iattr *iap) |
2504 |
+ { |
2505 |
+- struct dentry *dentry; |
2506 |
+- struct inode *inode; |
2507 |
+- int accmode = NFSD_MAY_SATTR; |
2508 |
+- umode_t ftype = 0; |
2509 |
+- __be32 err; |
2510 |
+- int host_err; |
2511 |
+- int size_change = 0; |
2512 |
+- |
2513 |
+- if (iap->ia_valid & (ATTR_ATIME | ATTR_MTIME | ATTR_SIZE)) |
2514 |
+- accmode |= NFSD_MAY_WRITE|NFSD_MAY_OWNER_OVERRIDE; |
2515 |
+- if (iap->ia_valid & ATTR_SIZE) |
2516 |
+- ftype = S_IFREG; |
2517 |
+- |
2518 |
+- /* Get inode */ |
2519 |
+- err = fh_verify(rqstp, fhp, ftype, accmode); |
2520 |
+- if (err) |
2521 |
+- goto out; |
2522 |
+- |
2523 |
+- dentry = fhp->fh_dentry; |
2524 |
+- inode = dentry->d_inode; |
2525 |
+- |
2526 |
+- /* Ignore any mode updates on symlinks */ |
2527 |
+- if (S_ISLNK(inode->i_mode)) |
2528 |
+- iap->ia_valid &= ~ATTR_MODE; |
2529 |
+- |
2530 |
+- if (!iap->ia_valid) |
2531 |
+- goto out; |
2532 |
+- |
2533 |
+ /* |
2534 |
+ * NFSv2 does not differentiate between "set-[ac]time-to-now" |
2535 |
+ * which only requires access, and "set-[ac]time-to-X" which |
2536 |
+@@ -342,8 +313,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, |
2537 |
+ * convert to "set to now" instead of "set to explicit time" |
2538 |
+ * |
2539 |
+ * We only call inode_change_ok as the last test as technically |
2540 |
+- * it is not an interface that we should be using. It is only |
2541 |
+- * valid if the filesystem does not define it's own i_op->setattr. |
2542 |
++ * it is not an interface that we should be using. |
2543 |
+ */ |
2544 |
+ #define BOTH_TIME_SET (ATTR_ATIME_SET | ATTR_MTIME_SET) |
2545 |
+ #define MAX_TOUCH_TIME_ERROR (30*60) |
2546 |
+@@ -369,30 +339,6 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, |
2547 |
+ iap->ia_valid &= ~BOTH_TIME_SET; |
2548 |
+ } |
2549 |
+ } |
2550 |
+- |
2551 |
+- /* |
2552 |
+- * The size case is special. |
2553 |
+- * It changes the file as well as the attributes. |
2554 |
+- */ |
2555 |
+- if (iap->ia_valid & ATTR_SIZE) { |
2556 |
+- if (iap->ia_size < inode->i_size) { |
2557 |
+- err = nfsd_permission(rqstp, fhp->fh_export, dentry, |
2558 |
+- NFSD_MAY_TRUNC|NFSD_MAY_OWNER_OVERRIDE); |
2559 |
+- if (err) |
2560 |
+- goto out; |
2561 |
+- } |
2562 |
+- |
2563 |
+- host_err = get_write_access(inode); |
2564 |
+- if (host_err) |
2565 |
+- goto out_nfserr; |
2566 |
+- |
2567 |
+- size_change = 1; |
2568 |
+- host_err = locks_verify_truncate(inode, NULL, iap->ia_size); |
2569 |
+- if (host_err) { |
2570 |
+- put_write_access(inode); |
2571 |
+- goto out_nfserr; |
2572 |
+- } |
2573 |
+- } |
2574 |
+ |
2575 |
+ /* sanitize the mode change */ |
2576 |
+ if (iap->ia_valid & ATTR_MODE) { |
2577 |
+@@ -415,32 +361,111 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, |
2578 |
+ iap->ia_valid |= (ATTR_KILL_SUID | ATTR_KILL_SGID); |
2579 |
+ } |
2580 |
+ } |
2581 |
++} |
2582 |
+ |
2583 |
+- /* Change the attributes. */ |
2584 |
++static __be32 |
2585 |
++nfsd_get_write_access(struct svc_rqst *rqstp, struct svc_fh *fhp, |
2586 |
++ struct iattr *iap) |
2587 |
++{ |
2588 |
++ struct inode *inode = fhp->fh_dentry->d_inode; |
2589 |
++ int host_err; |
2590 |
+ |
2591 |
+- iap->ia_valid |= ATTR_CTIME; |
2592 |
++ if (iap->ia_size < inode->i_size) { |
2593 |
++ __be32 err; |
2594 |
+ |
2595 |
+- err = nfserr_notsync; |
2596 |
+- if (!check_guard || guardtime == inode->i_ctime.tv_sec) { |
2597 |
+- host_err = nfsd_break_lease(inode); |
2598 |
+- if (host_err) |
2599 |
+- goto out_nfserr; |
2600 |
+- fh_lock(fhp); |
2601 |
++ err = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry, |
2602 |
++ NFSD_MAY_TRUNC | NFSD_MAY_OWNER_OVERRIDE); |
2603 |
++ if (err) |
2604 |
++ return err; |
2605 |
++ } |
2606 |
+ |
2607 |
+- host_err = notify_change(dentry, iap); |
2608 |
+- err = nfserrno(host_err); |
2609 |
+- fh_unlock(fhp); |
2610 |
++ host_err = get_write_access(inode); |
2611 |
++ if (host_err) |
2612 |
++ goto out_nfserrno; |
2613 |
++ |
2614 |
++ host_err = locks_verify_truncate(inode, NULL, iap->ia_size); |
2615 |
++ if (host_err) |
2616 |
++ goto out_put_write_access; |
2617 |
++ return 0; |
2618 |
++ |
2619 |
++out_put_write_access: |
2620 |
++ put_write_access(inode); |
2621 |
++out_nfserrno: |
2622 |
++ return nfserrno(host_err); |
2623 |
++} |
2624 |
++ |
2625 |
++/* |
2626 |
++ * Set various file attributes. After this call fhp needs an fh_put. |
2627 |
++ */ |
2628 |
++__be32 |
2629 |
++nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, |
2630 |
++ int check_guard, time_t guardtime) |
2631 |
++{ |
2632 |
++ struct dentry *dentry; |
2633 |
++ struct inode *inode; |
2634 |
++ int accmode = NFSD_MAY_SATTR; |
2635 |
++ umode_t ftype = 0; |
2636 |
++ __be32 err; |
2637 |
++ int host_err; |
2638 |
++ int size_change = 0; |
2639 |
++ |
2640 |
++ if (iap->ia_valid & (ATTR_ATIME | ATTR_MTIME | ATTR_SIZE)) |
2641 |
++ accmode |= NFSD_MAY_WRITE|NFSD_MAY_OWNER_OVERRIDE; |
2642 |
++ if (iap->ia_valid & ATTR_SIZE) |
2643 |
++ ftype = S_IFREG; |
2644 |
++ |
2645 |
++ /* Get inode */ |
2646 |
++ err = fh_verify(rqstp, fhp, ftype, accmode); |
2647 |
++ if (err) |
2648 |
++ goto out; |
2649 |
++ |
2650 |
++ dentry = fhp->fh_dentry; |
2651 |
++ inode = dentry->d_inode; |
2652 |
++ |
2653 |
++ /* Ignore any mode updates on symlinks */ |
2654 |
++ if (S_ISLNK(inode->i_mode)) |
2655 |
++ iap->ia_valid &= ~ATTR_MODE; |
2656 |
++ |
2657 |
++ if (!iap->ia_valid) |
2658 |
++ goto out; |
2659 |
++ |
2660 |
++ nfsd_sanitize_attrs(inode, iap); |
2661 |
++ |
2662 |
++ /* |
2663 |
++ * The size case is special, it changes the file in addition to the |
2664 |
++ * attributes. |
2665 |
++ */ |
2666 |
++ if (iap->ia_valid & ATTR_SIZE) { |
2667 |
++ err = nfsd_get_write_access(rqstp, fhp, iap); |
2668 |
++ if (err) |
2669 |
++ goto out; |
2670 |
++ size_change = 1; |
2671 |
+ } |
2672 |
++ |
2673 |
++ iap->ia_valid |= ATTR_CTIME; |
2674 |
++ |
2675 |
++ if (check_guard && guardtime != inode->i_ctime.tv_sec) { |
2676 |
++ err = nfserr_notsync; |
2677 |
++ goto out_put_write_access; |
2678 |
++ } |
2679 |
++ |
2680 |
++ host_err = nfsd_break_lease(inode); |
2681 |
++ if (host_err) |
2682 |
++ goto out_put_write_access_nfserror; |
2683 |
++ |
2684 |
++ fh_lock(fhp); |
2685 |
++ host_err = notify_change(dentry, iap); |
2686 |
++ fh_unlock(fhp); |
2687 |
++ |
2688 |
++out_put_write_access_nfserror: |
2689 |
++ err = nfserrno(host_err); |
2690 |
++out_put_write_access: |
2691 |
+ if (size_change) |
2692 |
+ put_write_access(inode); |
2693 |
+ if (!err) |
2694 |
+ commit_metadata(fhp); |
2695 |
+ out: |
2696 |
+ return err; |
2697 |
+- |
2698 |
+-out_nfserr: |
2699 |
+- err = nfserrno(host_err); |
2700 |
+- goto out; |
2701 |
+ } |
2702 |
+ |
2703 |
+ #if defined(CONFIG_NFSD_V2_ACL) || \ |
2704 |
+diff --git a/fs/xfs/xfs_sb.c b/fs/xfs/xfs_sb.c |
2705 |
+index a5b59d9..0397081 100644 |
2706 |
+--- a/fs/xfs/xfs_sb.c |
2707 |
++++ b/fs/xfs/xfs_sb.c |
2708 |
+@@ -596,6 +596,11 @@ xfs_sb_verify( |
2709 |
+ * single bit error could clear the feature bit and unused parts of the |
2710 |
+ * superblock are supposed to be zero. Hence a non-null crc field indicates that |
2711 |
+ * we've potentially lost a feature bit and we should check it anyway. |
2712 |
++ * |
2713 |
++ * However, past bugs (i.e. in growfs) left non-zeroed regions beyond the |
2714 |
++ * last field in V4 secondary superblocks. So for secondary superblocks, |
2715 |
++ * we are more forgiving, and ignore CRC failures if the primary doesn't |
2716 |
++ * indicate that the fs version is V5. |
2717 |
+ */ |
2718 |
+ static void |
2719 |
+ xfs_sb_read_verify( |
2720 |
+@@ -616,8 +621,12 @@ xfs_sb_read_verify( |
2721 |
+ |
2722 |
+ if (!xfs_verify_cksum(bp->b_addr, be16_to_cpu(dsb->sb_sectsize), |
2723 |
+ offsetof(struct xfs_sb, sb_crc))) { |
2724 |
+- error = EFSCORRUPTED; |
2725 |
+- goto out_error; |
2726 |
++ /* Only fail bad secondaries on a known V5 filesystem */ |
2727 |
++ if (bp->b_bn != XFS_SB_DADDR && |
2728 |
++ xfs_sb_version_hascrc(&mp->m_sb)) { |
2729 |
++ error = EFSCORRUPTED; |
2730 |
++ goto out_error; |
2731 |
++ } |
2732 |
+ } |
2733 |
+ } |
2734 |
+ error = xfs_sb_verify(bp, true); |
2735 |
+diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h |
2736 |
+index e8112ae..7554fd4 100644 |
2737 |
+--- a/include/linux/binfmts.h |
2738 |
++++ b/include/linux/binfmts.h |
2739 |
+@@ -99,9 +99,6 @@ extern void setup_new_exec(struct linux_binprm * bprm); |
2740 |
+ extern void would_dump(struct linux_binprm *, struct file *); |
2741 |
+ |
2742 |
+ extern int suid_dumpable; |
2743 |
+-#define SUID_DUMP_DISABLE 0 /* No setuid dumping */ |
2744 |
+-#define SUID_DUMP_USER 1 /* Dump as user of process */ |
2745 |
+-#define SUID_DUMP_ROOT 2 /* Dump as root */ |
2746 |
+ |
2747 |
+ /* Stack area protections */ |
2748 |
+ #define EXSTACK_DEFAULT 0 /* Whatever the arch defaults to */ |
2749 |
+diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h |
2750 |
+index e36dee5..3859ddb 100644 |
2751 |
+--- a/include/linux/nfs4.h |
2752 |
++++ b/include/linux/nfs4.h |
2753 |
+@@ -395,7 +395,7 @@ enum lock_type4 { |
2754 |
+ #define FATTR4_WORD1_FS_LAYOUT_TYPES (1UL << 30) |
2755 |
+ #define FATTR4_WORD2_LAYOUT_BLKSIZE (1UL << 1) |
2756 |
+ #define FATTR4_WORD2_MDSTHRESHOLD (1UL << 4) |
2757 |
+-#define FATTR4_WORD2_SECURITY_LABEL (1UL << 17) |
2758 |
++#define FATTR4_WORD2_SECURITY_LABEL (1UL << 16) |
2759 |
+ |
2760 |
+ /* MDS threshold bitmap bits */ |
2761 |
+ #define THRESHOLD_RD (1UL << 0) |
2762 |
+diff --git a/include/linux/sched.h b/include/linux/sched.h |
2763 |
+index e27baee..b1e963e 100644 |
2764 |
+--- a/include/linux/sched.h |
2765 |
++++ b/include/linux/sched.h |
2766 |
+@@ -322,6 +322,10 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} |
2767 |
+ extern void set_dumpable(struct mm_struct *mm, int value); |
2768 |
+ extern int get_dumpable(struct mm_struct *mm); |
2769 |
+ |
2770 |
++#define SUID_DUMP_DISABLE 0 /* No setuid dumping */ |
2771 |
++#define SUID_DUMP_USER 1 /* Dump as user of process */ |
2772 |
++#define SUID_DUMP_ROOT 2 /* Dump as root */ |
2773 |
++ |
2774 |
+ /* mm flags */ |
2775 |
+ /* dumpable bits */ |
2776 |
+ #define MMF_DUMPABLE 0 /* core dump is permitted */ |
2777 |
+@@ -2474,34 +2478,98 @@ static inline int tsk_is_polling(struct task_struct *p) |
2778 |
+ { |
2779 |
+ return task_thread_info(p)->status & TS_POLLING; |
2780 |
+ } |
2781 |
+-static inline void current_set_polling(void) |
2782 |
++static inline void __current_set_polling(void) |
2783 |
+ { |
2784 |
+ current_thread_info()->status |= TS_POLLING; |
2785 |
+ } |
2786 |
+ |
2787 |
+-static inline void current_clr_polling(void) |
2788 |
++static inline bool __must_check current_set_polling_and_test(void) |
2789 |
++{ |
2790 |
++ __current_set_polling(); |
2791 |
++ |
2792 |
++ /* |
2793 |
++ * Polling state must be visible before we test NEED_RESCHED, |
2794 |
++ * paired by resched_task() |
2795 |
++ */ |
2796 |
++ smp_mb(); |
2797 |
++ |
2798 |
++ return unlikely(tif_need_resched()); |
2799 |
++} |
2800 |
++ |
2801 |
++static inline void __current_clr_polling(void) |
2802 |
+ { |
2803 |
+ current_thread_info()->status &= ~TS_POLLING; |
2804 |
+- smp_mb__after_clear_bit(); |
2805 |
++} |
2806 |
++ |
2807 |
++static inline bool __must_check current_clr_polling_and_test(void) |
2808 |
++{ |
2809 |
++ __current_clr_polling(); |
2810 |
++ |
2811 |
++ /* |
2812 |
++ * Polling state must be visible before we test NEED_RESCHED, |
2813 |
++ * paired by resched_task() |
2814 |
++ */ |
2815 |
++ smp_mb(); |
2816 |
++ |
2817 |
++ return unlikely(tif_need_resched()); |
2818 |
+ } |
2819 |
+ #elif defined(TIF_POLLING_NRFLAG) |
2820 |
+ static inline int tsk_is_polling(struct task_struct *p) |
2821 |
+ { |
2822 |
+ return test_tsk_thread_flag(p, TIF_POLLING_NRFLAG); |
2823 |
+ } |
2824 |
+-static inline void current_set_polling(void) |
2825 |
++ |
2826 |
++static inline void __current_set_polling(void) |
2827 |
+ { |
2828 |
+ set_thread_flag(TIF_POLLING_NRFLAG); |
2829 |
+ } |
2830 |
+ |
2831 |
+-static inline void current_clr_polling(void) |
2832 |
++static inline bool __must_check current_set_polling_and_test(void) |
2833 |
++{ |
2834 |
++ __current_set_polling(); |
2835 |
++ |
2836 |
++ /* |
2837 |
++ * Polling state must be visible before we test NEED_RESCHED, |
2838 |
++ * paired by resched_task() |
2839 |
++ * |
2840 |
++ * XXX: assumes set/clear bit are identical barrier wise. |
2841 |
++ */ |
2842 |
++ smp_mb__after_clear_bit(); |
2843 |
++ |
2844 |
++ return unlikely(tif_need_resched()); |
2845 |
++} |
2846 |
++ |
2847 |
++static inline void __current_clr_polling(void) |
2848 |
+ { |
2849 |
+ clear_thread_flag(TIF_POLLING_NRFLAG); |
2850 |
+ } |
2851 |
++ |
2852 |
++static inline bool __must_check current_clr_polling_and_test(void) |
2853 |
++{ |
2854 |
++ __current_clr_polling(); |
2855 |
++ |
2856 |
++ /* |
2857 |
++ * Polling state must be visible before we test NEED_RESCHED, |
2858 |
++ * paired by resched_task() |
2859 |
++ */ |
2860 |
++ smp_mb__after_clear_bit(); |
2861 |
++ |
2862 |
++ return unlikely(tif_need_resched()); |
2863 |
++} |
2864 |
++ |
2865 |
+ #else |
2866 |
+ static inline int tsk_is_polling(struct task_struct *p) { return 0; } |
2867 |
+-static inline void current_set_polling(void) { } |
2868 |
+-static inline void current_clr_polling(void) { } |
2869 |
++static inline void __current_set_polling(void) { } |
2870 |
++static inline void __current_clr_polling(void) { } |
2871 |
++ |
2872 |
++static inline bool __must_check current_set_polling_and_test(void) |
2873 |
++{ |
2874 |
++ return unlikely(tif_need_resched()); |
2875 |
++} |
2876 |
++static inline bool __must_check current_clr_polling_and_test(void) |
2877 |
++{ |
2878 |
++ return unlikely(tif_need_resched()); |
2879 |
++} |
2880 |
+ #endif |
2881 |
+ |
2882 |
+ /* |
2883 |
+diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h |
2884 |
+index e7e0473..4ae6f32 100644 |
2885 |
+--- a/include/linux/thread_info.h |
2886 |
++++ b/include/linux/thread_info.h |
2887 |
+@@ -107,6 +107,8 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag) |
2888 |
+ #define set_need_resched() set_thread_flag(TIF_NEED_RESCHED) |
2889 |
+ #define clear_need_resched() clear_thread_flag(TIF_NEED_RESCHED) |
2890 |
+ |
2891 |
++#define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED) |
2892 |
++ |
2893 |
+ #if defined TIF_RESTORE_SIGMASK && !defined HAVE_SET_RESTORE_SIGMASK |
2894 |
+ /* |
2895 |
+ * An arch can define its own version of set_restore_sigmask() to get the |
2896 |
+diff --git a/include/linux/usb.h b/include/linux/usb.h |
2897 |
+index 001629c..39cfa0a 100644 |
2898 |
+--- a/include/linux/usb.h |
2899 |
++++ b/include/linux/usb.h |
2900 |
+@@ -475,7 +475,8 @@ struct usb3_lpm_parameters { |
2901 |
+ * @lpm_capable: device supports LPM |
2902 |
+ * @usb2_hw_lpm_capable: device can perform USB2 hardware LPM |
2903 |
+ * @usb2_hw_lpm_besl_capable: device can perform USB2 hardware BESL LPM |
2904 |
+- * @usb2_hw_lpm_enabled: USB2 hardware LPM enabled |
2905 |
++ * @usb2_hw_lpm_enabled: USB2 hardware LPM is enabled |
2906 |
++ * @usb2_hw_lpm_allowed: Userspace allows USB 2.0 LPM to be enabled |
2907 |
+ * @usb3_lpm_enabled: USB3 hardware LPM enabled |
2908 |
+ * @string_langid: language ID for strings |
2909 |
+ * @product: iProduct string, if present (static) |
2910 |
+@@ -548,6 +549,7 @@ struct usb_device { |
2911 |
+ unsigned usb2_hw_lpm_capable:1; |
2912 |
+ unsigned usb2_hw_lpm_besl_capable:1; |
2913 |
+ unsigned usb2_hw_lpm_enabled:1; |
2914 |
++ unsigned usb2_hw_lpm_allowed:1; |
2915 |
+ unsigned usb3_lpm_enabled:1; |
2916 |
+ int string_langid; |
2917 |
+ |
2918 |
+diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h |
2919 |
+index 9031a26..ae6c3b8 100644 |
2920 |
+--- a/include/sound/compress_driver.h |
2921 |
++++ b/include/sound/compress_driver.h |
2922 |
+@@ -171,4 +171,13 @@ static inline void snd_compr_fragment_elapsed(struct snd_compr_stream *stream) |
2923 |
+ wake_up(&stream->runtime->sleep); |
2924 |
+ } |
2925 |
+ |
2926 |
++static inline void snd_compr_drain_notify(struct snd_compr_stream *stream) |
2927 |
++{ |
2928 |
++ if (snd_BUG_ON(!stream)) |
2929 |
++ return; |
2930 |
++ |
2931 |
++ stream->runtime->state = SNDRV_PCM_STATE_SETUP; |
2932 |
++ wake_up(&stream->runtime->sleep); |
2933 |
++} |
2934 |
++ |
2935 |
+ #endif |
2936 |
+diff --git a/ipc/shm.c b/ipc/shm.c |
2937 |
+index d697396..7a51443 100644 |
2938 |
+--- a/ipc/shm.c |
2939 |
++++ b/ipc/shm.c |
2940 |
+@@ -208,15 +208,18 @@ static void shm_open(struct vm_area_struct *vma) |
2941 |
+ */ |
2942 |
+ static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp) |
2943 |
+ { |
2944 |
++ struct file *shm_file; |
2945 |
++ |
2946 |
++ shm_file = shp->shm_file; |
2947 |
++ shp->shm_file = NULL; |
2948 |
+ ns->shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT; |
2949 |
+ shm_rmid(ns, shp); |
2950 |
+ shm_unlock(shp); |
2951 |
+- if (!is_file_hugepages(shp->shm_file)) |
2952 |
+- shmem_lock(shp->shm_file, 0, shp->mlock_user); |
2953 |
++ if (!is_file_hugepages(shm_file)) |
2954 |
++ shmem_lock(shm_file, 0, shp->mlock_user); |
2955 |
+ else if (shp->mlock_user) |
2956 |
+- user_shm_unlock(file_inode(shp->shm_file)->i_size, |
2957 |
+- shp->mlock_user); |
2958 |
+- fput (shp->shm_file); |
2959 |
++ user_shm_unlock(file_inode(shm_file)->i_size, shp->mlock_user); |
2960 |
++ fput(shm_file); |
2961 |
+ ipc_rcu_putref(shp, shm_rcu_free); |
2962 |
+ } |
2963 |
+ |
2964 |
+@@ -974,15 +977,25 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf) |
2965 |
+ ipc_lock_object(&shp->shm_perm); |
2966 |
+ if (!ns_capable(ns->user_ns, CAP_IPC_LOCK)) { |
2967 |
+ kuid_t euid = current_euid(); |
2968 |
+- err = -EPERM; |
2969 |
+ if (!uid_eq(euid, shp->shm_perm.uid) && |
2970 |
+- !uid_eq(euid, shp->shm_perm.cuid)) |
2971 |
++ !uid_eq(euid, shp->shm_perm.cuid)) { |
2972 |
++ err = -EPERM; |
2973 |
+ goto out_unlock0; |
2974 |
+- if (cmd == SHM_LOCK && !rlimit(RLIMIT_MEMLOCK)) |
2975 |
++ } |
2976 |
++ if (cmd == SHM_LOCK && !rlimit(RLIMIT_MEMLOCK)) { |
2977 |
++ err = -EPERM; |
2978 |
+ goto out_unlock0; |
2979 |
++ } |
2980 |
+ } |
2981 |
+ |
2982 |
+ shm_file = shp->shm_file; |
2983 |
++ |
2984 |
++ /* check if shm_destroy() is tearing down shp */ |
2985 |
++ if (shm_file == NULL) { |
2986 |
++ err = -EIDRM; |
2987 |
++ goto out_unlock0; |
2988 |
++ } |
2989 |
++ |
2990 |
+ if (is_file_hugepages(shm_file)) |
2991 |
+ goto out_unlock0; |
2992 |
+ |
2993 |
+@@ -1101,6 +1114,14 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, |
2994 |
+ goto out_unlock; |
2995 |
+ |
2996 |
+ ipc_lock_object(&shp->shm_perm); |
2997 |
++ |
2998 |
++ /* check if shm_destroy() is tearing down shp */ |
2999 |
++ if (shp->shm_file == NULL) { |
3000 |
++ ipc_unlock_object(&shp->shm_perm); |
3001 |
++ err = -EIDRM; |
3002 |
++ goto out_unlock; |
3003 |
++ } |
3004 |
++ |
3005 |
+ path = shp->shm_file->f_path; |
3006 |
+ path_get(&path); |
3007 |
+ shp->shm_nattch++; |
3008 |
+diff --git a/kernel/cpu/idle.c b/kernel/cpu/idle.c |
3009 |
+index e695c0a..c261409 100644 |
3010 |
+--- a/kernel/cpu/idle.c |
3011 |
++++ b/kernel/cpu/idle.c |
3012 |
+@@ -44,7 +44,7 @@ static inline int cpu_idle_poll(void) |
3013 |
+ rcu_idle_enter(); |
3014 |
+ trace_cpu_idle_rcuidle(0, smp_processor_id()); |
3015 |
+ local_irq_enable(); |
3016 |
+- while (!need_resched()) |
3017 |
++ while (!tif_need_resched()) |
3018 |
+ cpu_relax(); |
3019 |
+ trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); |
3020 |
+ rcu_idle_exit(); |
3021 |
+@@ -92,8 +92,7 @@ static void cpu_idle_loop(void) |
3022 |
+ if (cpu_idle_force_poll || tick_check_broadcast_expired()) { |
3023 |
+ cpu_idle_poll(); |
3024 |
+ } else { |
3025 |
+- current_clr_polling(); |
3026 |
+- if (!need_resched()) { |
3027 |
++ if (!current_clr_polling_and_test()) { |
3028 |
+ stop_critical_timings(); |
3029 |
+ rcu_idle_enter(); |
3030 |
+ arch_cpu_idle(); |
3031 |
+@@ -103,7 +102,7 @@ static void cpu_idle_loop(void) |
3032 |
+ } else { |
3033 |
+ local_irq_enable(); |
3034 |
+ } |
3035 |
+- current_set_polling(); |
3036 |
++ __current_set_polling(); |
3037 |
+ } |
3038 |
+ arch_cpu_idle_exit(); |
3039 |
+ } |
3040 |
+@@ -129,7 +128,7 @@ void cpu_startup_entry(enum cpuhp_state state) |
3041 |
+ */ |
3042 |
+ boot_init_stack_canary(); |
3043 |
+ #endif |
3044 |
+- current_set_polling(); |
3045 |
++ __current_set_polling(); |
3046 |
+ arch_cpu_idle_prepare(); |
3047 |
+ cpu_idle_loop(); |
3048 |
+ } |
3049 |
+diff --git a/kernel/ptrace.c b/kernel/ptrace.c |
3050 |
+index dd562e9..1f4bcb3 100644 |
3051 |
+--- a/kernel/ptrace.c |
3052 |
++++ b/kernel/ptrace.c |
3053 |
+@@ -257,7 +257,8 @@ ok: |
3054 |
+ if (task->mm) |
3055 |
+ dumpable = get_dumpable(task->mm); |
3056 |
+ rcu_read_lock(); |
3057 |
+- if (!dumpable && !ptrace_has_cap(__task_cred(task)->user_ns, mode)) { |
3058 |
++ if (dumpable != SUID_DUMP_USER && |
3059 |
++ !ptrace_has_cap(__task_cred(task)->user_ns, mode)) { |
3060 |
+ rcu_read_unlock(); |
3061 |
+ return -EPERM; |
3062 |
+ } |
3063 |
+diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c |
3064 |
+index 80c36bc..78e27e3 100644 |
3065 |
+--- a/kernel/trace/trace_event_perf.c |
3066 |
++++ b/kernel/trace/trace_event_perf.c |
3067 |
+@@ -26,7 +26,7 @@ static int perf_trace_event_perm(struct ftrace_event_call *tp_event, |
3068 |
+ { |
3069 |
+ /* The ftrace function trace is allowed only for root. */ |
3070 |
+ if (ftrace_event_is_function(tp_event) && |
3071 |
+- perf_paranoid_kernel() && !capable(CAP_SYS_ADMIN)) |
3072 |
++ perf_paranoid_tracepoint_raw() && !capable(CAP_SYS_ADMIN)) |
3073 |
+ return -EPERM; |
3074 |
+ |
3075 |
+ /* No tracing, just counting, so no obvious leak */ |
3076 |
+diff --git a/mm/slub.c b/mm/slub.c |
3077 |
+index c3eb3d3..96f2169 100644 |
3078 |
+--- a/mm/slub.c |
3079 |
++++ b/mm/slub.c |
3080 |
+@@ -1217,8 +1217,8 @@ static unsigned long kmem_cache_flags(unsigned long object_size, |
3081 |
+ /* |
3082 |
+ * Enable debugging if selected on the kernel commandline. |
3083 |
+ */ |
3084 |
+- if (slub_debug && (!slub_debug_slabs || |
3085 |
+- !strncmp(slub_debug_slabs, name, strlen(slub_debug_slabs)))) |
3086 |
++ if (slub_debug && (!slub_debug_slabs || (name && |
3087 |
++ !strncmp(slub_debug_slabs, name, strlen(slub_debug_slabs))))) |
3088 |
+ flags |= slub_debug; |
3089 |
+ |
3090 |
+ return flags; |
3091 |
+diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c |
3092 |
+index 0846566..cc24323 100644 |
3093 |
+--- a/net/sunrpc/auth_gss/auth_gss.c |
3094 |
++++ b/net/sunrpc/auth_gss/auth_gss.c |
3095 |
+@@ -482,6 +482,7 @@ gss_alloc_msg(struct gss_auth *gss_auth, |
3096 |
+ switch (vers) { |
3097 |
+ case 0: |
3098 |
+ gss_encode_v0_msg(gss_msg); |
3099 |
++ break; |
3100 |
+ default: |
3101 |
+ gss_encode_v1_msg(gss_msg, service_name, gss_auth->target_name); |
3102 |
+ }; |
3103 |
+diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c |
3104 |
+index 7747960..941d19f 100644 |
3105 |
+--- a/net/sunrpc/clnt.c |
3106 |
++++ b/net/sunrpc/clnt.c |
3107 |
+@@ -656,14 +656,16 @@ EXPORT_SYMBOL_GPL(rpc_shutdown_client); |
3108 |
+ /* |
3109 |
+ * Free an RPC client |
3110 |
+ */ |
3111 |
+-static void |
3112 |
++static struct rpc_clnt * |
3113 |
+ rpc_free_client(struct rpc_clnt *clnt) |
3114 |
+ { |
3115 |
++ struct rpc_clnt *parent = NULL; |
3116 |
++ |
3117 |
+ dprintk_rcu("RPC: destroying %s client for %s\n", |
3118 |
+ clnt->cl_program->name, |
3119 |
+ rcu_dereference(clnt->cl_xprt)->servername); |
3120 |
+ if (clnt->cl_parent != clnt) |
3121 |
+- rpc_release_client(clnt->cl_parent); |
3122 |
++ parent = clnt->cl_parent; |
3123 |
+ rpc_clnt_remove_pipedir(clnt); |
3124 |
+ rpc_unregister_client(clnt); |
3125 |
+ rpc_free_iostats(clnt->cl_metrics); |
3126 |
+@@ -672,18 +674,17 @@ rpc_free_client(struct rpc_clnt *clnt) |
3127 |
+ rpciod_down(); |
3128 |
+ rpc_free_clid(clnt); |
3129 |
+ kfree(clnt); |
3130 |
++ return parent; |
3131 |
+ } |
3132 |
+ |
3133 |
+ /* |
3134 |
+ * Free an RPC client |
3135 |
+ */ |
3136 |
+-static void |
3137 |
++static struct rpc_clnt * |
3138 |
+ rpc_free_auth(struct rpc_clnt *clnt) |
3139 |
+ { |
3140 |
+- if (clnt->cl_auth == NULL) { |
3141 |
+- rpc_free_client(clnt); |
3142 |
+- return; |
3143 |
+- } |
3144 |
++ if (clnt->cl_auth == NULL) |
3145 |
++ return rpc_free_client(clnt); |
3146 |
+ |
3147 |
+ /* |
3148 |
+ * Note: RPCSEC_GSS may need to send NULL RPC calls in order to |
3149 |
+@@ -694,7 +695,8 @@ rpc_free_auth(struct rpc_clnt *clnt) |
3150 |
+ rpcauth_release(clnt->cl_auth); |
3151 |
+ clnt->cl_auth = NULL; |
3152 |
+ if (atomic_dec_and_test(&clnt->cl_count)) |
3153 |
+- rpc_free_client(clnt); |
3154 |
++ return rpc_free_client(clnt); |
3155 |
++ return NULL; |
3156 |
+ } |
3157 |
+ |
3158 |
+ /* |
3159 |
+@@ -705,10 +707,13 @@ rpc_release_client(struct rpc_clnt *clnt) |
3160 |
+ { |
3161 |
+ dprintk("RPC: rpc_release_client(%p)\n", clnt); |
3162 |
+ |
3163 |
+- if (list_empty(&clnt->cl_tasks)) |
3164 |
+- wake_up(&destroy_wait); |
3165 |
+- if (atomic_dec_and_test(&clnt->cl_count)) |
3166 |
+- rpc_free_auth(clnt); |
3167 |
++ do { |
3168 |
++ if (list_empty(&clnt->cl_tasks)) |
3169 |
++ wake_up(&destroy_wait); |
3170 |
++ if (!atomic_dec_and_test(&clnt->cl_count)) |
3171 |
++ break; |
3172 |
++ clnt = rpc_free_auth(clnt); |
3173 |
++ } while (clnt != NULL); |
3174 |
+ } |
3175 |
+ EXPORT_SYMBOL_GPL(rpc_release_client); |
3176 |
+ |
3177 |
+diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c |
3178 |
+index ee03d35..b752e1d 100644 |
3179 |
+--- a/net/sunrpc/xprtsock.c |
3180 |
++++ b/net/sunrpc/xprtsock.c |
3181 |
+@@ -393,8 +393,10 @@ static int xs_send_kvec(struct socket *sock, struct sockaddr *addr, int addrlen, |
3182 |
+ return kernel_sendmsg(sock, &msg, NULL, 0, 0); |
3183 |
+ } |
3184 |
+ |
3185 |
+-static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned int base, int more) |
3186 |
++static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned int base, int more, bool zerocopy) |
3187 |
+ { |
3188 |
++ ssize_t (*do_sendpage)(struct socket *sock, struct page *page, |
3189 |
++ int offset, size_t size, int flags); |
3190 |
+ struct page **ppage; |
3191 |
+ unsigned int remainder; |
3192 |
+ int err, sent = 0; |
3193 |
+@@ -403,6 +405,9 @@ static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned i |
3194 |
+ base += xdr->page_base; |
3195 |
+ ppage = xdr->pages + (base >> PAGE_SHIFT); |
3196 |
+ base &= ~PAGE_MASK; |
3197 |
++ do_sendpage = sock->ops->sendpage; |
3198 |
++ if (!zerocopy) |
3199 |
++ do_sendpage = sock_no_sendpage; |
3200 |
+ for(;;) { |
3201 |
+ unsigned int len = min_t(unsigned int, PAGE_SIZE - base, remainder); |
3202 |
+ int flags = XS_SENDMSG_FLAGS; |
3203 |
+@@ -410,7 +415,7 @@ static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned i |
3204 |
+ remainder -= len; |
3205 |
+ if (remainder != 0 || more) |
3206 |
+ flags |= MSG_MORE; |
3207 |
+- err = sock->ops->sendpage(sock, *ppage, base, len, flags); |
3208 |
++ err = do_sendpage(sock, *ppage, base, len, flags); |
3209 |
+ if (remainder == 0 || err != len) |
3210 |
+ break; |
3211 |
+ sent += err; |
3212 |
+@@ -431,9 +436,10 @@ static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned i |
3213 |
+ * @addrlen: UDP only -- length of destination address |
3214 |
+ * @xdr: buffer containing this request |
3215 |
+ * @base: starting position in the buffer |
3216 |
++ * @zerocopy: true if it is safe to use sendpage() |
3217 |
+ * |
3218 |
+ */ |
3219 |
+-static int xs_sendpages(struct socket *sock, struct sockaddr *addr, int addrlen, struct xdr_buf *xdr, unsigned int base) |
3220 |
++static int xs_sendpages(struct socket *sock, struct sockaddr *addr, int addrlen, struct xdr_buf *xdr, unsigned int base, bool zerocopy) |
3221 |
+ { |
3222 |
+ unsigned int remainder = xdr->len - base; |
3223 |
+ int err, sent = 0; |
3224 |
+@@ -461,7 +467,7 @@ static int xs_sendpages(struct socket *sock, struct sockaddr *addr, int addrlen, |
3225 |
+ if (base < xdr->page_len) { |
3226 |
+ unsigned int len = xdr->page_len - base; |
3227 |
+ remainder -= len; |
3228 |
+- err = xs_send_pagedata(sock, xdr, base, remainder != 0); |
3229 |
++ err = xs_send_pagedata(sock, xdr, base, remainder != 0, zerocopy); |
3230 |
+ if (remainder == 0 || err != len) |
3231 |
+ goto out; |
3232 |
+ sent += err; |
3233 |
+@@ -564,7 +570,7 @@ static int xs_local_send_request(struct rpc_task *task) |
3234 |
+ req->rq_svec->iov_base, req->rq_svec->iov_len); |
3235 |
+ |
3236 |
+ status = xs_sendpages(transport->sock, NULL, 0, |
3237 |
+- xdr, req->rq_bytes_sent); |
3238 |
++ xdr, req->rq_bytes_sent, true); |
3239 |
+ dprintk("RPC: %s(%u) = %d\n", |
3240 |
+ __func__, xdr->len - req->rq_bytes_sent, status); |
3241 |
+ if (likely(status >= 0)) { |
3242 |
+@@ -620,7 +626,7 @@ static int xs_udp_send_request(struct rpc_task *task) |
3243 |
+ status = xs_sendpages(transport->sock, |
3244 |
+ xs_addr(xprt), |
3245 |
+ xprt->addrlen, xdr, |
3246 |
+- req->rq_bytes_sent); |
3247 |
++ req->rq_bytes_sent, true); |
3248 |
+ |
3249 |
+ dprintk("RPC: xs_udp_send_request(%u) = %d\n", |
3250 |
+ xdr->len - req->rq_bytes_sent, status); |
3251 |
+@@ -693,6 +699,7 @@ static int xs_tcp_send_request(struct rpc_task *task) |
3252 |
+ struct rpc_xprt *xprt = req->rq_xprt; |
3253 |
+ struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); |
3254 |
+ struct xdr_buf *xdr = &req->rq_snd_buf; |
3255 |
++ bool zerocopy = true; |
3256 |
+ int status; |
3257 |
+ |
3258 |
+ xs_encode_stream_record_marker(&req->rq_snd_buf); |
3259 |
+@@ -700,13 +707,20 @@ static int xs_tcp_send_request(struct rpc_task *task) |
3260 |
+ xs_pktdump("packet data:", |
3261 |
+ req->rq_svec->iov_base, |
3262 |
+ req->rq_svec->iov_len); |
3263 |
++ /* Don't use zero copy if this is a resend. If the RPC call |
3264 |
++ * completes while the socket holds a reference to the pages, |
3265 |
++ * then we may end up resending corrupted data. |
3266 |
++ */ |
3267 |
++ if (task->tk_flags & RPC_TASK_SENT) |
3268 |
++ zerocopy = false; |
3269 |
+ |
3270 |
+ /* Continue transmitting the packet/record. We must be careful |
3271 |
+ * to cope with writespace callbacks arriving _after_ we have |
3272 |
+ * called sendmsg(). */ |
3273 |
+ while (1) { |
3274 |
+ status = xs_sendpages(transport->sock, |
3275 |
+- NULL, 0, xdr, req->rq_bytes_sent); |
3276 |
++ NULL, 0, xdr, req->rq_bytes_sent, |
3277 |
++ zerocopy); |
3278 |
+ |
3279 |
+ dprintk("RPC: xs_tcp_send_request(%u) = %d\n", |
3280 |
+ xdr->len - req->rq_bytes_sent, status); |
3281 |
+diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c |
3282 |
+index 399433a..a9c3d3c 100644 |
3283 |
+--- a/security/integrity/ima/ima_policy.c |
3284 |
++++ b/security/integrity/ima/ima_policy.c |
3285 |
+@@ -73,7 +73,6 @@ static struct ima_rule_entry default_rules[] = { |
3286 |
+ {.action = DONT_MEASURE,.fsmagic = SYSFS_MAGIC,.flags = IMA_FSMAGIC}, |
3287 |
+ {.action = DONT_MEASURE,.fsmagic = DEBUGFS_MAGIC,.flags = IMA_FSMAGIC}, |
3288 |
+ {.action = DONT_MEASURE,.fsmagic = TMPFS_MAGIC,.flags = IMA_FSMAGIC}, |
3289 |
+- {.action = DONT_MEASURE,.fsmagic = RAMFS_MAGIC,.flags = IMA_FSMAGIC}, |
3290 |
+ {.action = DONT_MEASURE,.fsmagic = DEVPTS_SUPER_MAGIC,.flags = IMA_FSMAGIC}, |
3291 |
+ {.action = DONT_MEASURE,.fsmagic = BINFMTFS_MAGIC,.flags = IMA_FSMAGIC}, |
3292 |
+ {.action = DONT_MEASURE,.fsmagic = SECURITYFS_MAGIC,.flags = IMA_FSMAGIC}, |
3293 |
+diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c |
3294 |
+index bea523a..d9af638 100644 |
3295 |
+--- a/sound/core/compress_offload.c |
3296 |
++++ b/sound/core/compress_offload.c |
3297 |
+@@ -680,14 +680,48 @@ static int snd_compr_stop(struct snd_compr_stream *stream) |
3298 |
+ return -EPERM; |
3299 |
+ retval = stream->ops->trigger(stream, SNDRV_PCM_TRIGGER_STOP); |
3300 |
+ if (!retval) { |
3301 |
+- stream->runtime->state = SNDRV_PCM_STATE_SETUP; |
3302 |
+- wake_up(&stream->runtime->sleep); |
3303 |
++ snd_compr_drain_notify(stream); |
3304 |
+ stream->runtime->total_bytes_available = 0; |
3305 |
+ stream->runtime->total_bytes_transferred = 0; |
3306 |
+ } |
3307 |
+ return retval; |
3308 |
+ } |
3309 |
+ |
3310 |
++static int snd_compress_wait_for_drain(struct snd_compr_stream *stream) |
3311 |
++{ |
3312 |
++ int ret; |
3313 |
++ |
3314 |
++ /* |
3315 |
++ * We are called with lock held. So drop the lock while we wait for |
3316 |
++ * drain complete notfication from the driver |
3317 |
++ * |
3318 |
++ * It is expected that driver will notify the drain completion and then |
3319 |
++ * stream will be moved to SETUP state, even if draining resulted in an |
3320 |
++ * error. We can trigger next track after this. |
3321 |
++ */ |
3322 |
++ stream->runtime->state = SNDRV_PCM_STATE_DRAINING; |
3323 |
++ mutex_unlock(&stream->device->lock); |
3324 |
++ |
3325 |
++ /* we wait for drain to complete here, drain can return when |
3326 |
++ * interruption occurred, wait returned error or success. |
3327 |
++ * For the first two cases we don't do anything different here and |
3328 |
++ * return after waking up |
3329 |
++ */ |
3330 |
++ |
3331 |
++ ret = wait_event_interruptible(stream->runtime->sleep, |
3332 |
++ (stream->runtime->state != SNDRV_PCM_STATE_DRAINING)); |
3333 |
++ if (ret == -ERESTARTSYS) |
3334 |
++ pr_debug("wait aborted by a signal"); |
3335 |
++ else if (ret) |
3336 |
++ pr_debug("wait for drain failed with %d\n", ret); |
3337 |
++ |
3338 |
++ |
3339 |
++ wake_up(&stream->runtime->sleep); |
3340 |
++ mutex_lock(&stream->device->lock); |
3341 |
++ |
3342 |
++ return ret; |
3343 |
++} |
3344 |
++ |
3345 |
+ static int snd_compr_drain(struct snd_compr_stream *stream) |
3346 |
+ { |
3347 |
+ int retval; |
3348 |
+@@ -695,12 +729,15 @@ static int snd_compr_drain(struct snd_compr_stream *stream) |
3349 |
+ if (stream->runtime->state == SNDRV_PCM_STATE_PREPARED || |
3350 |
+ stream->runtime->state == SNDRV_PCM_STATE_SETUP) |
3351 |
+ return -EPERM; |
3352 |
++ |
3353 |
+ retval = stream->ops->trigger(stream, SND_COMPR_TRIGGER_DRAIN); |
3354 |
+- if (!retval) { |
3355 |
+- stream->runtime->state = SNDRV_PCM_STATE_DRAINING; |
3356 |
++ if (retval) { |
3357 |
++ pr_debug("SND_COMPR_TRIGGER_DRAIN failed %d\n", retval); |
3358 |
+ wake_up(&stream->runtime->sleep); |
3359 |
++ return retval; |
3360 |
+ } |
3361 |
+- return retval; |
3362 |
++ |
3363 |
++ return snd_compress_wait_for_drain(stream); |
3364 |
+ } |
3365 |
+ |
3366 |
+ static int snd_compr_next_track(struct snd_compr_stream *stream) |
3367 |
+@@ -736,9 +773,14 @@ static int snd_compr_partial_drain(struct snd_compr_stream *stream) |
3368 |
+ return -EPERM; |
3369 |
+ |
3370 |
+ retval = stream->ops->trigger(stream, SND_COMPR_TRIGGER_PARTIAL_DRAIN); |
3371 |
++ if (retval) { |
3372 |
++ pr_debug("Partial drain returned failure\n"); |
3373 |
++ wake_up(&stream->runtime->sleep); |
3374 |
++ return retval; |
3375 |
++ } |
3376 |
+ |
3377 |
+ stream->next_track = false; |
3378 |
+- return retval; |
3379 |
++ return snd_compress_wait_for_drain(stream); |
3380 |
+ } |
3381 |
+ |
3382 |
+ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg) |
3383 |
+diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c |
3384 |
+index 1c19cd7..83b8a9a 100644 |
3385 |
+--- a/sound/drivers/pcsp/pcsp.c |
3386 |
++++ b/sound/drivers/pcsp/pcsp.c |
3387 |
+@@ -187,8 +187,8 @@ static int pcsp_probe(struct platform_device *dev) |
3388 |
+ static int pcsp_remove(struct platform_device *dev) |
3389 |
+ { |
3390 |
+ struct snd_pcsp *chip = platform_get_drvdata(dev); |
3391 |
+- alsa_card_pcsp_exit(chip); |
3392 |
+ pcspkr_input_remove(chip->input_dev); |
3393 |
++ alsa_card_pcsp_exit(chip); |
3394 |
+ return 0; |
3395 |
+ } |
3396 |
+ |
3397 |
+diff --git a/sound/isa/msnd/msnd_pinnacle.c b/sound/isa/msnd/msnd_pinnacle.c |
3398 |
+index 81aeb93..0a90bd6 100644 |
3399 |
+--- a/sound/isa/msnd/msnd_pinnacle.c |
3400 |
++++ b/sound/isa/msnd/msnd_pinnacle.c |
3401 |
+@@ -73,9 +73,11 @@ |
3402 |
+ #ifdef MSND_CLASSIC |
3403 |
+ # include "msnd_classic.h" |
3404 |
+ # define LOGNAME "msnd_classic" |
3405 |
++# define DEV_NAME "msnd-classic" |
3406 |
+ #else |
3407 |
+ # include "msnd_pinnacle.h" |
3408 |
+ # define LOGNAME "snd_msnd_pinnacle" |
3409 |
++# define DEV_NAME "msnd-pinnacle" |
3410 |
+ #endif |
3411 |
+ |
3412 |
+ static void set_default_audio_parameters(struct snd_msnd *chip) |
3413 |
+@@ -1067,8 +1069,6 @@ static int snd_msnd_isa_remove(struct device *pdev, unsigned int dev) |
3414 |
+ return 0; |
3415 |
+ } |
3416 |
+ |
3417 |
+-#define DEV_NAME "msnd-pinnacle" |
3418 |
+- |
3419 |
+ static struct isa_driver snd_msnd_driver = { |
3420 |
+ .match = snd_msnd_isa_match, |
3421 |
+ .probe = snd_msnd_isa_probe, |
3422 |
+diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c |
3423 |
+index 748c6a9..e938a68 100644 |
3424 |
+--- a/sound/pci/hda/hda_codec.c |
3425 |
++++ b/sound/pci/hda/hda_codec.c |
3426 |
+@@ -2579,9 +2579,6 @@ int snd_hda_codec_reset(struct hda_codec *codec) |
3427 |
+ cancel_delayed_work_sync(&codec->jackpoll_work); |
3428 |
+ #ifdef CONFIG_PM |
3429 |
+ cancel_delayed_work_sync(&codec->power_work); |
3430 |
+- codec->power_on = 0; |
3431 |
+- codec->power_transition = 0; |
3432 |
+- codec->power_jiffies = jiffies; |
3433 |
+ flush_workqueue(bus->workq); |
3434 |
+ #endif |
3435 |
+ snd_hda_ctls_clear(codec); |
3436 |
+@@ -3991,6 +3988,10 @@ static void hda_call_codec_resume(struct hda_codec *codec) |
3437 |
+ * in the resume / power-save sequence |
3438 |
+ */ |
3439 |
+ hda_keep_power_on(codec); |
3440 |
++ if (codec->pm_down_notified) { |
3441 |
++ codec->pm_down_notified = 0; |
3442 |
++ hda_call_pm_notify(codec->bus, true); |
3443 |
++ } |
3444 |
+ hda_set_power_state(codec, AC_PWRST_D0); |
3445 |
+ restore_shutup_pins(codec); |
3446 |
+ hda_exec_init_verbs(codec); |
3447 |
+diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c |
3448 |
+index b7c89df..3067ed4 100644 |
3449 |
+--- a/sound/pci/hda/hda_generic.c |
3450 |
++++ b/sound/pci/hda/hda_generic.c |
3451 |
+@@ -549,11 +549,15 @@ static hda_nid_t look_for_out_mute_nid(struct hda_codec *codec, |
3452 |
+ static hda_nid_t look_for_out_vol_nid(struct hda_codec *codec, |
3453 |
+ struct nid_path *path) |
3454 |
+ { |
3455 |
++ struct hda_gen_spec *spec = codec->spec; |
3456 |
+ int i; |
3457 |
+ |
3458 |
+ for (i = path->depth - 1; i >= 0; i--) { |
3459 |
+- if (nid_has_volume(codec, path->path[i], HDA_OUTPUT)) |
3460 |
+- return path->path[i]; |
3461 |
++ hda_nid_t nid = path->path[i]; |
3462 |
++ if ((spec->out_vol_mask >> nid) & 1) |
3463 |
++ continue; |
3464 |
++ if (nid_has_volume(codec, nid, HDA_OUTPUT)) |
3465 |
++ return nid; |
3466 |
+ } |
3467 |
+ return 0; |
3468 |
+ } |
3469 |
+@@ -792,10 +796,10 @@ static void set_pin_eapd(struct hda_codec *codec, hda_nid_t pin, bool enable) |
3470 |
+ if (spec->own_eapd_ctl || |
3471 |
+ !(snd_hda_query_pin_caps(codec, pin) & AC_PINCAP_EAPD)) |
3472 |
+ return; |
3473 |
+- if (codec->inv_eapd) |
3474 |
+- enable = !enable; |
3475 |
+ if (spec->keep_eapd_on && !enable) |
3476 |
+ return; |
3477 |
++ if (codec->inv_eapd) |
3478 |
++ enable = !enable; |
3479 |
+ snd_hda_codec_update_cache(codec, pin, 0, |
3480 |
+ AC_VERB_SET_EAPD_BTLENABLE, |
3481 |
+ enable ? 0x02 : 0x00); |
3482 |
+diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h |
3483 |
+index 48d4402..7e45cb4 100644 |
3484 |
+--- a/sound/pci/hda/hda_generic.h |
3485 |
++++ b/sound/pci/hda/hda_generic.h |
3486 |
+@@ -242,6 +242,9 @@ struct hda_gen_spec { |
3487 |
+ /* additional mute flags (only effective with auto_mute_via_amp=1) */ |
3488 |
+ u64 mute_bits; |
3489 |
+ |
3490 |
++ /* bitmask for skipping volume controls */ |
3491 |
++ u64 out_vol_mask; |
3492 |
++ |
3493 |
+ /* badness tables for output path evaluations */ |
3494 |
+ const struct badness_table *main_out_badness; |
3495 |
+ const struct badness_table *extra_out_badness; |
3496 |
+diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c |
3497 |
+index 6e61a01..a63aff2 100644 |
3498 |
+--- a/sound/pci/hda/hda_intel.c |
3499 |
++++ b/sound/pci/hda/hda_intel.c |
3500 |
+@@ -612,6 +612,11 @@ enum { |
3501 |
+ #define AZX_DCAPS_INTEL_PCH \ |
3502 |
+ (AZX_DCAPS_INTEL_PCH_NOPM | AZX_DCAPS_PM_RUNTIME) |
3503 |
+ |
3504 |
++#define AZX_DCAPS_INTEL_HASWELL \ |
3505 |
++ (AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_ALIGN_BUFSIZE | \ |
3506 |
++ AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_PM_RUNTIME | \ |
3507 |
++ AZX_DCAPS_I915_POWERWELL) |
3508 |
++ |
3509 |
+ /* quirks for ATI SB / AMD Hudson */ |
3510 |
+ #define AZX_DCAPS_PRESET_ATI_SB \ |
3511 |
+ (AZX_DCAPS_ATI_SNOOP | AZX_DCAPS_NO_TCSEL | \ |
3512 |
+@@ -3987,14 +3992,11 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { |
3513 |
+ .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, |
3514 |
+ /* Haswell */ |
3515 |
+ { PCI_DEVICE(0x8086, 0x0a0c), |
3516 |
+- .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH | |
3517 |
+- AZX_DCAPS_I915_POWERWELL }, |
3518 |
++ .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_HASWELL }, |
3519 |
+ { PCI_DEVICE(0x8086, 0x0c0c), |
3520 |
+- .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH | |
3521 |
+- AZX_DCAPS_I915_POWERWELL }, |
3522 |
++ .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_HASWELL }, |
3523 |
+ { PCI_DEVICE(0x8086, 0x0d0c), |
3524 |
+- .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH | |
3525 |
+- AZX_DCAPS_I915_POWERWELL }, |
3526 |
++ .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_HASWELL }, |
3527 |
+ /* 5 Series/3400 */ |
3528 |
+ { PCI_DEVICE(0x8086, 0x3b56), |
3529 |
+ .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM }, |
3530 |
+diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c |
3531 |
+index 2aa2f57..a52d2a1 100644 |
3532 |
+--- a/sound/pci/hda/patch_analog.c |
3533 |
++++ b/sound/pci/hda/patch_analog.c |
3534 |
+@@ -219,8 +219,12 @@ static int alloc_ad_spec(struct hda_codec *codec) |
3535 |
+ static void ad_fixup_inv_jack_detect(struct hda_codec *codec, |
3536 |
+ const struct hda_fixup *fix, int action) |
3537 |
+ { |
3538 |
+- if (action == HDA_FIXUP_ACT_PRE_PROBE) |
3539 |
++ struct ad198x_spec *spec = codec->spec; |
3540 |
++ |
3541 |
++ if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
3542 |
+ codec->inv_jack_detect = 1; |
3543 |
++ spec->gen.keep_eapd_on = 1; |
3544 |
++ } |
3545 |
+ } |
3546 |
+ |
3547 |
+ enum { |
3548 |
+diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c |
3549 |
+index 18d9725..072755c 100644 |
3550 |
+--- a/sound/pci/hda/patch_cirrus.c |
3551 |
++++ b/sound/pci/hda/patch_cirrus.c |
3552 |
+@@ -597,6 +597,7 @@ static int patch_cs420x(struct hda_codec *codec) |
3553 |
+ * Its layout is no longer compatible with CS4206/CS4207 |
3554 |
+ */ |
3555 |
+ enum { |
3556 |
++ CS4208_MAC_AUTO, |
3557 |
+ CS4208_MBA6, |
3558 |
+ CS4208_GPIO0, |
3559 |
+ }; |
3560 |
+@@ -608,7 +609,12 @@ static const struct hda_model_fixup cs4208_models[] = { |
3561 |
+ }; |
3562 |
+ |
3563 |
+ static const struct snd_pci_quirk cs4208_fixup_tbl[] = { |
3564 |
+- /* codec SSID */ |
3565 |
++ SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS4208_MAC_AUTO), |
3566 |
++ {} /* terminator */ |
3567 |
++}; |
3568 |
++ |
3569 |
++/* codec SSID matching */ |
3570 |
++static const struct snd_pci_quirk cs4208_mac_fixup_tbl[] = { |
3571 |
+ SND_PCI_QUIRK(0x106b, 0x7100, "MacBookAir 6,1", CS4208_MBA6), |
3572 |
+ SND_PCI_QUIRK(0x106b, 0x7200, "MacBookAir 6,2", CS4208_MBA6), |
3573 |
+ {} /* terminator */ |
3574 |
+@@ -626,6 +632,20 @@ static void cs4208_fixup_gpio0(struct hda_codec *codec, |
3575 |
+ } |
3576 |
+ } |
3577 |
+ |
3578 |
++static const struct hda_fixup cs4208_fixups[]; |
3579 |
++ |
3580 |
++/* remap the fixup from codec SSID and apply it */ |
3581 |
++static void cs4208_fixup_mac(struct hda_codec *codec, |
3582 |
++ const struct hda_fixup *fix, int action) |
3583 |
++{ |
3584 |
++ if (action != HDA_FIXUP_ACT_PRE_PROBE) |
3585 |
++ return; |
3586 |
++ snd_hda_pick_fixup(codec, NULL, cs4208_mac_fixup_tbl, cs4208_fixups); |
3587 |
++ if (codec->fixup_id < 0 || codec->fixup_id == CS4208_MAC_AUTO) |
3588 |
++ codec->fixup_id = CS4208_GPIO0; /* default fixup */ |
3589 |
++ snd_hda_apply_fixup(codec, action); |
3590 |
++} |
3591 |
++ |
3592 |
+ static const struct hda_fixup cs4208_fixups[] = { |
3593 |
+ [CS4208_MBA6] = { |
3594 |
+ .type = HDA_FIXUP_PINS, |
3595 |
+@@ -637,6 +657,10 @@ static const struct hda_fixup cs4208_fixups[] = { |
3596 |
+ .type = HDA_FIXUP_FUNC, |
3597 |
+ .v.func = cs4208_fixup_gpio0, |
3598 |
+ }, |
3599 |
++ [CS4208_MAC_AUTO] = { |
3600 |
++ .type = HDA_FIXUP_FUNC, |
3601 |
++ .v.func = cs4208_fixup_mac, |
3602 |
++ }, |
3603 |
+ }; |
3604 |
+ |
3605 |
+ /* correct the 0dB offset of input pins */ |
3606 |
+@@ -660,6 +684,8 @@ static int patch_cs4208(struct hda_codec *codec) |
3607 |
+ return -ENOMEM; |
3608 |
+ |
3609 |
+ spec->gen.automute_hook = cs_automute; |
3610 |
++ /* exclude NID 0x10 (HP) from output volumes due to different steps */ |
3611 |
++ spec->gen.out_vol_mask = 1ULL << 0x10; |
3612 |
+ |
3613 |
+ snd_hda_pick_fixup(codec, cs4208_models, cs4208_fixup_tbl, |
3614 |
+ cs4208_fixups); |
3615 |
+diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c |
3616 |
+index ec68eae..96f07ce 100644 |
3617 |
+--- a/sound/pci/hda/patch_conexant.c |
3618 |
++++ b/sound/pci/hda/patch_conexant.c |
3619 |
+@@ -3568,6 +3568,8 @@ static const struct hda_codec_preset snd_hda_preset_conexant[] = { |
3620 |
+ .patch = patch_conexant_auto }, |
3621 |
+ { .id = 0x14f15115, .name = "CX20757", |
3622 |
+ .patch = patch_conexant_auto }, |
3623 |
++ { .id = 0x14f151d7, .name = "CX20952", |
3624 |
++ .patch = patch_conexant_auto }, |
3625 |
+ {} /* terminator */ |
3626 |
+ }; |
3627 |
+ |
3628 |
+@@ -3594,6 +3596,7 @@ MODULE_ALIAS("snd-hda-codec-id:14f15111"); |
3629 |
+ MODULE_ALIAS("snd-hda-codec-id:14f15113"); |
3630 |
+ MODULE_ALIAS("snd-hda-codec-id:14f15114"); |
3631 |
+ MODULE_ALIAS("snd-hda-codec-id:14f15115"); |
3632 |
++MODULE_ALIAS("snd-hda-codec-id:14f151d7"); |
3633 |
+ |
3634 |
+ MODULE_LICENSE("GPL"); |
3635 |
+ MODULE_DESCRIPTION("Conexant HD-audio codec"); |
3636 |
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
3637 |
+index 8ad5543..2f39631 100644 |
3638 |
+--- a/sound/pci/hda/patch_realtek.c |
3639 |
++++ b/sound/pci/hda/patch_realtek.c |
3640 |
+@@ -1043,6 +1043,7 @@ enum { |
3641 |
+ ALC880_FIXUP_UNIWILL, |
3642 |
+ ALC880_FIXUP_UNIWILL_DIG, |
3643 |
+ ALC880_FIXUP_Z71V, |
3644 |
++ ALC880_FIXUP_ASUS_W5A, |
3645 |
+ ALC880_FIXUP_3ST_BASE, |
3646 |
+ ALC880_FIXUP_3ST, |
3647 |
+ ALC880_FIXUP_3ST_DIG, |
3648 |
+@@ -1213,6 +1214,26 @@ static const struct hda_fixup alc880_fixups[] = { |
3649 |
+ { } |
3650 |
+ } |
3651 |
+ }, |
3652 |
++ [ALC880_FIXUP_ASUS_W5A] = { |
3653 |
++ .type = HDA_FIXUP_PINS, |
3654 |
++ .v.pins = (const struct hda_pintbl[]) { |
3655 |
++ /* set up the whole pins as BIOS is utterly broken */ |
3656 |
++ { 0x14, 0x0121411f }, /* HP */ |
3657 |
++ { 0x15, 0x411111f0 }, /* N/A */ |
3658 |
++ { 0x16, 0x411111f0 }, /* N/A */ |
3659 |
++ { 0x17, 0x411111f0 }, /* N/A */ |
3660 |
++ { 0x18, 0x90a60160 }, /* mic */ |
3661 |
++ { 0x19, 0x411111f0 }, /* N/A */ |
3662 |
++ { 0x1a, 0x411111f0 }, /* N/A */ |
3663 |
++ { 0x1b, 0x411111f0 }, /* N/A */ |
3664 |
++ { 0x1c, 0x411111f0 }, /* N/A */ |
3665 |
++ { 0x1d, 0x411111f0 }, /* N/A */ |
3666 |
++ { 0x1e, 0xb743111e }, /* SPDIF out */ |
3667 |
++ { } |
3668 |
++ }, |
3669 |
++ .chained = true, |
3670 |
++ .chain_id = ALC880_FIXUP_GPIO1, |
3671 |
++ }, |
3672 |
+ [ALC880_FIXUP_3ST_BASE] = { |
3673 |
+ .type = HDA_FIXUP_PINS, |
3674 |
+ .v.pins = (const struct hda_pintbl[]) { |
3675 |
+@@ -1334,6 +1355,7 @@ static const struct hda_fixup alc880_fixups[] = { |
3676 |
+ |
3677 |
+ static const struct snd_pci_quirk alc880_fixup_tbl[] = { |
3678 |
+ SND_PCI_QUIRK(0x1019, 0x0f69, "Coeus G610P", ALC880_FIXUP_W810), |
3679 |
++ SND_PCI_QUIRK(0x1043, 0x10c3, "ASUS W5A", ALC880_FIXUP_ASUS_W5A), |
3680 |
+ SND_PCI_QUIRK(0x1043, 0x1964, "ASUS Z71V", ALC880_FIXUP_Z71V), |
3681 |
+ SND_PCI_QUIRK_VENDOR(0x1043, "ASUS", ALC880_FIXUP_GPIO1), |
3682 |
+ SND_PCI_QUIRK(0x1558, 0x5401, "Clevo GPIO2", ALC880_FIXUP_GPIO2), |
3683 |
+@@ -1479,6 +1501,7 @@ enum { |
3684 |
+ ALC260_FIXUP_KN1, |
3685 |
+ ALC260_FIXUP_FSC_S7020, |
3686 |
+ ALC260_FIXUP_FSC_S7020_JWSE, |
3687 |
++ ALC260_FIXUP_VAIO_PINS, |
3688 |
+ }; |
3689 |
+ |
3690 |
+ static void alc260_gpio1_automute(struct hda_codec *codec) |
3691 |
+@@ -1619,6 +1642,24 @@ static const struct hda_fixup alc260_fixups[] = { |
3692 |
+ .chained = true, |
3693 |
+ .chain_id = ALC260_FIXUP_FSC_S7020, |
3694 |
+ }, |
3695 |
++ [ALC260_FIXUP_VAIO_PINS] = { |
3696 |
++ .type = HDA_FIXUP_PINS, |
3697 |
++ .v.pins = (const struct hda_pintbl[]) { |
3698 |
++ /* Pin configs are missing completely on some VAIOs */ |
3699 |
++ { 0x0f, 0x01211020 }, |
3700 |
++ { 0x10, 0x0001003f }, |
3701 |
++ { 0x11, 0x411111f0 }, |
3702 |
++ { 0x12, 0x01a15930 }, |
3703 |
++ { 0x13, 0x411111f0 }, |
3704 |
++ { 0x14, 0x411111f0 }, |
3705 |
++ { 0x15, 0x411111f0 }, |
3706 |
++ { 0x16, 0x411111f0 }, |
3707 |
++ { 0x17, 0x411111f0 }, |
3708 |
++ { 0x18, 0x411111f0 }, |
3709 |
++ { 0x19, 0x411111f0 }, |
3710 |
++ { } |
3711 |
++ } |
3712 |
++ }, |
3713 |
+ }; |
3714 |
+ |
3715 |
+ static const struct snd_pci_quirk alc260_fixup_tbl[] = { |
3716 |
+@@ -1627,6 +1668,8 @@ static const struct snd_pci_quirk alc260_fixup_tbl[] = { |
3717 |
+ SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_FIXUP_GPIO1), |
3718 |
+ SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), |
3719 |
+ SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900), |
3720 |
++ SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_FIXUP_VAIO_PINS), |
3721 |
++ SND_PCI_QUIRK(0x104d, 0x81e2, "Sony VAIO TX", ALC260_FIXUP_HP_PIN_0F), |
3722 |
+ SND_PCI_QUIRK(0x10cf, 0x1326, "FSC LifeBook S7020", ALC260_FIXUP_FSC_S7020), |
3723 |
+ SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1), |
3724 |
+ SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1), |
3725 |
+@@ -2388,6 +2431,7 @@ static const struct hda_verb alc268_beep_init_verbs[] = { |
3726 |
+ enum { |
3727 |
+ ALC268_FIXUP_INV_DMIC, |
3728 |
+ ALC268_FIXUP_HP_EAPD, |
3729 |
++ ALC268_FIXUP_SPDIF, |
3730 |
+ }; |
3731 |
+ |
3732 |
+ static const struct hda_fixup alc268_fixups[] = { |
3733 |
+@@ -2402,6 +2446,13 @@ static const struct hda_fixup alc268_fixups[] = { |
3734 |
+ {} |
3735 |
+ } |
3736 |
+ }, |
3737 |
++ [ALC268_FIXUP_SPDIF] = { |
3738 |
++ .type = HDA_FIXUP_PINS, |
3739 |
++ .v.pins = (const struct hda_pintbl[]) { |
3740 |
++ { 0x1e, 0x014b1180 }, /* enable SPDIF out */ |
3741 |
++ {} |
3742 |
++ } |
3743 |
++ }, |
3744 |
+ }; |
3745 |
+ |
3746 |
+ static const struct hda_model_fixup alc268_fixup_models[] = { |
3747 |
+@@ -2411,6 +2462,7 @@ static const struct hda_model_fixup alc268_fixup_models[] = { |
3748 |
+ }; |
3749 |
+ |
3750 |
+ static const struct snd_pci_quirk alc268_fixup_tbl[] = { |
3751 |
++ SND_PCI_QUIRK(0x1025, 0x0139, "Acer TravelMate 6293", ALC268_FIXUP_SPDIF), |
3752 |
+ SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC), |
3753 |
+ /* below is codec SSID since multiple Toshiba laptops have the |
3754 |
+ * same PCI SSID 1179:ff00 |
3755 |
+@@ -2540,6 +2592,7 @@ enum { |
3756 |
+ ALC269_TYPE_ALC283, |
3757 |
+ ALC269_TYPE_ALC284, |
3758 |
+ ALC269_TYPE_ALC286, |
3759 |
++ ALC269_TYPE_ALC255, |
3760 |
+ }; |
3761 |
+ |
3762 |
+ /* |
3763 |
+@@ -2565,6 +2618,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec) |
3764 |
+ case ALC269_TYPE_ALC282: |
3765 |
+ case ALC269_TYPE_ALC283: |
3766 |
+ case ALC269_TYPE_ALC286: |
3767 |
++ case ALC269_TYPE_ALC255: |
3768 |
+ ssids = alc269_ssids; |
3769 |
+ break; |
3770 |
+ default: |
3771 |
+@@ -2944,6 +2998,23 @@ static void alc269_fixup_mic_mute_hook(void *private_data, int enabled) |
3772 |
+ snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval); |
3773 |
+ } |
3774 |
+ |
3775 |
++/* Make sure the led works even in runtime suspend */ |
3776 |
++static unsigned int led_power_filter(struct hda_codec *codec, |
3777 |
++ hda_nid_t nid, |
3778 |
++ unsigned int power_state) |
3779 |
++{ |
3780 |
++ struct alc_spec *spec = codec->spec; |
3781 |
++ |
3782 |
++ if (power_state != AC_PWRST_D3 || nid != spec->mute_led_nid) |
3783 |
++ return power_state; |
3784 |
++ |
3785 |
++ /* Set pin ctl again, it might have just been set to 0 */ |
3786 |
++ snd_hda_set_pin_ctl(codec, nid, |
3787 |
++ snd_hda_codec_get_pin_target(codec, nid)); |
3788 |
++ |
3789 |
++ return AC_PWRST_D0; |
3790 |
++} |
3791 |
++ |
3792 |
+ static void alc269_fixup_hp_mute_led(struct hda_codec *codec, |
3793 |
+ const struct hda_fixup *fix, int action) |
3794 |
+ { |
3795 |
+@@ -2963,6 +3034,7 @@ static void alc269_fixup_hp_mute_led(struct hda_codec *codec, |
3796 |
+ spec->mute_led_nid = pin - 0x0a + 0x18; |
3797 |
+ spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; |
3798 |
+ spec->gen.vmaster_mute_enum = 1; |
3799 |
++ codec->power_filter = led_power_filter; |
3800 |
+ snd_printd("Detected mute LED for %x:%d\n", spec->mute_led_nid, |
3801 |
+ spec->mute_led_polarity); |
3802 |
+ break; |
3803 |
+@@ -2978,6 +3050,7 @@ static void alc269_fixup_hp_mute_led_mic1(struct hda_codec *codec, |
3804 |
+ spec->mute_led_nid = 0x18; |
3805 |
+ spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; |
3806 |
+ spec->gen.vmaster_mute_enum = 1; |
3807 |
++ codec->power_filter = led_power_filter; |
3808 |
+ } |
3809 |
+ } |
3810 |
+ |
3811 |
+@@ -2990,6 +3063,7 @@ static void alc269_fixup_hp_mute_led_mic2(struct hda_codec *codec, |
3812 |
+ spec->mute_led_nid = 0x19; |
3813 |
+ spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; |
3814 |
+ spec->gen.vmaster_mute_enum = 1; |
3815 |
++ codec->power_filter = led_power_filter; |
3816 |
+ } |
3817 |
+ } |
3818 |
+ |
3819 |
+@@ -3230,8 +3304,10 @@ static void alc_update_headset_mode(struct hda_codec *codec) |
3820 |
+ else |
3821 |
+ new_headset_mode = ALC_HEADSET_MODE_HEADPHONE; |
3822 |
+ |
3823 |
+- if (new_headset_mode == spec->current_headset_mode) |
3824 |
++ if (new_headset_mode == spec->current_headset_mode) { |
3825 |
++ snd_hda_gen_update_outputs(codec); |
3826 |
+ return; |
3827 |
++ } |
3828 |
+ |
3829 |
+ switch (new_headset_mode) { |
3830 |
+ case ALC_HEADSET_MODE_UNPLUGGED: |
3831 |
+@@ -3895,6 +3971,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
3832 |
+ SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3833 |
+ SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3834 |
+ SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3835 |
++ SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3836 |
+ SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), |
3837 |
+ SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
3838 |
+ SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
3839 |
+@@ -4128,6 +4205,9 @@ static int patch_alc269(struct hda_codec *codec) |
3840 |
+ case 0x10ec0286: |
3841 |
+ spec->codec_variant = ALC269_TYPE_ALC286; |
3842 |
+ break; |
3843 |
++ case 0x10ec0255: |
3844 |
++ spec->codec_variant = ALC269_TYPE_ALC255; |
3845 |
++ break; |
3846 |
+ } |
3847 |
+ |
3848 |
+ if (snd_hda_codec_read(codec, 0x51, 0, AC_VERB_PARAMETERS, 0) == 0x10ec5505) { |
3849 |
+@@ -4842,6 +4922,7 @@ static int patch_alc680(struct hda_codec *codec) |
3850 |
+ static const struct hda_codec_preset snd_hda_preset_realtek[] = { |
3851 |
+ { .id = 0x10ec0221, .name = "ALC221", .patch = patch_alc269 }, |
3852 |
+ { .id = 0x10ec0233, .name = "ALC233", .patch = patch_alc269 }, |
3853 |
++ { .id = 0x10ec0255, .name = "ALC255", .patch = patch_alc269 }, |
3854 |
+ { .id = 0x10ec0260, .name = "ALC260", .patch = patch_alc260 }, |
3855 |
+ { .id = 0x10ec0262, .name = "ALC262", .patch = patch_alc262 }, |
3856 |
+ { .id = 0x10ec0267, .name = "ALC267", .patch = patch_alc268 }, |
3857 |
+diff --git a/sound/usb/6fire/chip.c b/sound/usb/6fire/chip.c |
3858 |
+index c39c779..66edc4a 100644 |
3859 |
+--- a/sound/usb/6fire/chip.c |
3860 |
++++ b/sound/usb/6fire/chip.c |
3861 |
+@@ -101,7 +101,7 @@ static int usb6fire_chip_probe(struct usb_interface *intf, |
3862 |
+ usb_set_intfdata(intf, chips[i]); |
3863 |
+ mutex_unlock(®ister_mutex); |
3864 |
+ return 0; |
3865 |
+- } else if (regidx < 0) |
3866 |
++ } else if (!devices[i] && regidx < 0) |
3867 |
+ regidx = i; |
3868 |
+ } |
3869 |
+ if (regidx < 0) { |
3870 |
+diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c |
3871 |
+index 72a130b..c329c8f 100644 |
3872 |
+--- a/virt/kvm/iommu.c |
3873 |
++++ b/virt/kvm/iommu.c |
3874 |
+@@ -103,6 +103,10 @@ int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot) |
3875 |
+ while ((gfn << PAGE_SHIFT) & (page_size - 1)) |
3876 |
+ page_size >>= 1; |
3877 |
+ |
3878 |
++ /* Make sure hva is aligned to the page size we want to map */ |
3879 |
++ while (__gfn_to_hva_memslot(slot, gfn) & (page_size - 1)) |
3880 |
++ page_size >>= 1; |
3881 |
++ |
3882 |
+ /* |
3883 |
+ * Pin all pages we are about to map in memory. This is |
3884 |
+ * important because we unmap and unpin in 4kb steps later. |
3885 |
|
3886 |
diff --git a/3.12.1/4420_grsecurity-3.0-3.12.1-201311261522.patch b/3.12.2/4420_grsecurity-3.0-3.12.2-201312011111.patch |
3887 |
similarity index 99% |
3888 |
rename from 3.12.1/4420_grsecurity-3.0-3.12.1-201311261522.patch |
3889 |
rename to 3.12.2/4420_grsecurity-3.0-3.12.2-201312011111.patch |
3890 |
index 4b0fd79..284b9ed 100644 |
3891 |
--- a/3.12.1/4420_grsecurity-3.0-3.12.1-201311261522.patch |
3892 |
+++ b/3.12.2/4420_grsecurity-3.0-3.12.2-201312011111.patch |
3893 |
@@ -281,7 +281,7 @@ index fcbb736..5508d8c 100644 |
3894 |
|
3895 |
pcd. [PARIDE] |
3896 |
diff --git a/Makefile b/Makefile |
3897 |
-index eb29ec7..876409e 100644 |
3898 |
+index e6e72b6..570e70a 100644 |
3899 |
--- a/Makefile |
3900 |
+++ b/Makefile |
3901 |
@@ -241,8 +241,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
3902 |
@@ -3559,7 +3559,7 @@ index 17ca1ae..beba869 100644 |
3903 |
struct omap_device *omap_device_alloc(struct platform_device *pdev, |
3904 |
struct omap_hwmod **ohs, int oh_cnt); |
3905 |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c |
3906 |
-index d9ee0ff..24f224a 100644 |
3907 |
+index 3d5db8c..ddfa144 100644 |
3908 |
--- a/arch/arm/mach-omap2/omap_hwmod.c |
3909 |
+++ b/arch/arm/mach-omap2/omap_hwmod.c |
3910 |
@@ -194,10 +194,10 @@ struct omap_hwmod_soc_ops { |
3911 |
@@ -8120,10 +8120,10 @@ index 9a0d24c..e7fbedf 100644 |
3912 |
|
3913 |
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) |
3914 |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c |
3915 |
-index bebdf1a..7a9e095 100644 |
3916 |
+index 36d49e6..9147e39d 100644 |
3917 |
--- a/arch/powerpc/kernel/signal_32.c |
3918 |
+++ b/arch/powerpc/kernel/signal_32.c |
3919 |
-@@ -996,7 +996,7 @@ int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka, |
3920 |
+@@ -1004,7 +1004,7 @@ int handle_rt_signal32(unsigned long sig, struct k_sigaction *ka, |
3921 |
/* Save user registers on the stack */ |
3922 |
frame = &rt_sf->uc.uc_mcontext; |
3923 |
addr = frame; |
3924 |
@@ -8371,7 +8371,7 @@ index cb8bdbe..d770680 100644 |
3925 |
} |
3926 |
} |
3927 |
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c |
3928 |
-index 3e99c14..f00953c 100644 |
3929 |
+index 7ce9cf3..a964087 100644 |
3930 |
--- a/arch/powerpc/mm/slice.c |
3931 |
+++ b/arch/powerpc/mm/slice.c |
3932 |
@@ -103,7 +103,7 @@ static int slice_area_is_free(struct mm_struct *mm, unsigned long addr, |
3933 |
@@ -20089,7 +20089,7 @@ index 7d9481c..99c7e4b 100644 |
3934 |
.notifier_call = cpuid_class_cpu_callback, |
3935 |
}; |
3936 |
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c |
3937 |
-index e0e0841..da37e6f 100644 |
3938 |
+index 18677a9..f67c45b 100644 |
3939 |
--- a/arch/x86/kernel/crash.c |
3940 |
+++ b/arch/x86/kernel/crash.c |
3941 |
@@ -58,10 +58,8 @@ static void kdump_nmi_callback(int cpu, struct pt_regs *regs) |
3942 |
@@ -22493,7 +22493,7 @@ index b077f4c..feb26c1 100644 |
3943 |
/* |
3944 |
* End of kprobes section |
3945 |
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c |
3946 |
-index 42a392a..fbbd930 100644 |
3947 |
+index d4bdd25..912664c 100644 |
3948 |
--- a/arch/x86/kernel/ftrace.c |
3949 |
+++ b/arch/x86/kernel/ftrace.c |
3950 |
@@ -105,6 +105,8 @@ ftrace_modify_code_direct(unsigned long ip, unsigned const char *old_code, |
3951 |
@@ -22523,7 +22523,7 @@ index 42a392a..fbbd930 100644 |
3952 |
new = ftrace_call_replace(ip, (unsigned long)func); |
3953 |
ret = ftrace_modify_code(ip, old, new); |
3954 |
} |
3955 |
-@@ -279,7 +281,7 @@ static int ftrace_write(unsigned long ip, const char *val, int size) |
3956 |
+@@ -291,7 +293,7 @@ static int ftrace_write(unsigned long ip, const char *val, int size) |
3957 |
* kernel identity mapping to modify code. |
3958 |
*/ |
3959 |
if (within(ip, (unsigned long)_text, (unsigned long)_etext)) |
3960 |
@@ -22532,7 +22532,7 @@ index 42a392a..fbbd930 100644 |
3961 |
|
3962 |
return probe_kernel_write((void *)ip, val, size); |
3963 |
} |
3964 |
-@@ -289,7 +291,7 @@ static int add_break(unsigned long ip, const char *old) |
3965 |
+@@ -301,7 +303,7 @@ static int add_break(unsigned long ip, const char *old) |
3966 |
unsigned char replaced[MCOUNT_INSN_SIZE]; |
3967 |
unsigned char brk = BREAKPOINT_INSTRUCTION; |
3968 |
|
3969 |
@@ -22541,7 +22541,7 @@ index 42a392a..fbbd930 100644 |
3970 |
return -EFAULT; |
3971 |
|
3972 |
/* Make sure it is what we expect it to be */ |
3973 |
-@@ -637,7 +639,7 @@ ftrace_modify_code(unsigned long ip, unsigned const char *old_code, |
3974 |
+@@ -649,7 +651,7 @@ ftrace_modify_code(unsigned long ip, unsigned const char *old_code, |
3975 |
return ret; |
3976 |
|
3977 |
fail_update: |
3978 |
@@ -22550,7 +22550,7 @@ index 42a392a..fbbd930 100644 |
3979 |
goto out; |
3980 |
} |
3981 |
|
3982 |
-@@ -670,6 +672,8 @@ static int ftrace_mod_jmp(unsigned long ip, |
3983 |
+@@ -682,6 +684,8 @@ static int ftrace_mod_jmp(unsigned long ip, |
3984 |
{ |
3985 |
unsigned char code[MCOUNT_INSN_SIZE]; |
3986 |
|
3987 |
@@ -24479,7 +24479,7 @@ index 6c483ba..d10ce2f 100644 |
3988 |
|
3989 |
static struct dma_map_ops swiotlb_dma_ops = { |
3990 |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c |
3991 |
-index c83516b..432ad6d 100644 |
3992 |
+index 3fb8d95..254dc51 100644 |
3993 |
--- a/arch/x86/kernel/process.c |
3994 |
+++ b/arch/x86/kernel/process.c |
3995 |
@@ -36,7 +36,8 @@ |
3996 |
@@ -24926,7 +24926,7 @@ index a16bae3..1f65f25 100644 |
3997 |
|
3998 |
return ret; |
3999 |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c |
4000 |
-index 7e920bf..cc24446 100644 |
4001 |
+index 618ce26..ec7e21c 100644 |
4002 |
--- a/arch/x86/kernel/reboot.c |
4003 |
+++ b/arch/x86/kernel/reboot.c |
4004 |
@@ -68,6 +68,11 @@ static int __init set_bios_reboot(const struct dmi_system_id *d) |
4005 |
@@ -34658,10 +34658,10 @@ index 9515f18..4b149c9 100644 |
4006 |
.callback = dmi_disable_osi_vista, |
4007 |
.ident = "Fujitsu Siemens", |
4008 |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c |
4009 |
-index f98dd00..7b69865 100644 |
4010 |
+index c7414a5..d5afd71 100644 |
4011 |
--- a/drivers/acpi/processor_idle.c |
4012 |
+++ b/drivers/acpi/processor_idle.c |
4013 |
-@@ -992,7 +992,7 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr) |
4014 |
+@@ -966,7 +966,7 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr) |
4015 |
{ |
4016 |
int i, count = CPUIDLE_DRIVER_STATE_START; |
4017 |
struct acpi_processor_cx *cx; |
4018 |
@@ -36406,7 +36406,7 @@ index cc29cd3..d4b058b 100644 |
4019 |
static struct asender_cmd asender_tbl[] = { |
4020 |
[P_PING] = { 0, got_Ping }, |
4021 |
diff --git a/drivers/block/loop.c b/drivers/block/loop.c |
4022 |
-index 40e7155..df5c79a 100644 |
4023 |
+index 2f036ca..68d3f40 100644 |
4024 |
--- a/drivers/block/loop.c |
4025 |
+++ b/drivers/block/loop.c |
4026 |
@@ -232,7 +232,7 @@ static int __do_lo_send_write(struct file *file, |
4027 |
@@ -44637,7 +44637,7 @@ index fe4c572..99dedfa 100644 |
4028 |
|
4029 |
static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif) |
4030 |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c |
4031 |
-index 6c8a33b..78212fa 100644 |
4032 |
+index 66a2db8..70cad04 100644 |
4033 |
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c |
4034 |
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c |
4035 |
@@ -252,9 +252,9 @@ static void rt2x00queue_create_tx_descriptor_seq(struct rt2x00_dev *rt2x00dev, |
4036 |
@@ -45225,7 +45225,7 @@ index 13ec195..6af61af 100644 |
4037 |
static ssize_t sony_nc_highspeed_charging_store(struct device *dev, |
4038 |
struct device_attribute *attr, |
4039 |
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c |
4040 |
-index 03ca6c1..1ef2ddd 100644 |
4041 |
+index 4e86e97..04d50d1 100644 |
4042 |
--- a/drivers/platform/x86/thinkpad_acpi.c |
4043 |
+++ b/drivers/platform/x86/thinkpad_acpi.c |
4044 |
@@ -2091,7 +2091,7 @@ static int hotkey_mask_get(void) |
4045 |
@@ -48770,7 +48770,7 @@ index f20a044..d1059aa 100644 |
4046 |
wake_up(&usb_kill_urb_queue); |
4047 |
usb_put_urb(urb); |
4048 |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c |
4049 |
-index 879651c..87e0131 100644 |
4050 |
+index 243c672..8b66fbb 100644 |
4051 |
--- a/drivers/usb/core/hub.c |
4052 |
+++ b/drivers/usb/core/hub.c |
4053 |
@@ -27,6 +27,7 @@ |
4054 |
@@ -48781,7 +48781,7 @@ index 879651c..87e0131 100644 |
4055 |
|
4056 |
#include <asm/uaccess.h> |
4057 |
#include <asm/byteorder.h> |
4058 |
-@@ -4435,6 +4436,10 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, |
4059 |
+@@ -4467,6 +4468,10 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, |
4060 |
goto done; |
4061 |
return; |
4062 |
} |
4063 |
@@ -48824,7 +48824,7 @@ index 82927e1..4993dbf 100644 |
4064 |
{ |
4065 |
struct urb *urb; |
4066 |
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c |
4067 |
-index 6d2c8ed..3a794ca 100644 |
4068 |
+index ca516ac..6c36ee4 100644 |
4069 |
--- a/drivers/usb/core/sysfs.c |
4070 |
+++ b/drivers/usb/core/sysfs.c |
4071 |
@@ -236,7 +236,7 @@ static ssize_t urbnum_show(struct device *dev, struct device_attribute *attr, |
4072 |
@@ -54804,10 +54804,10 @@ index 5d19acf..9ab093b 100644 |
4073 |
return 1; |
4074 |
if (a < b) |
4075 |
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c |
4076 |
-index 277bd1b..f312c9e 100644 |
4077 |
+index 511d415..319d0e5 100644 |
4078 |
--- a/fs/configfs/dir.c |
4079 |
+++ b/fs/configfs/dir.c |
4080 |
-@@ -1546,7 +1546,8 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx) |
4081 |
+@@ -1558,7 +1558,8 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx) |
4082 |
} |
4083 |
for (p = q->next; p != &parent_sd->s_children; p = p->next) { |
4084 |
struct configfs_dirent *next; |
4085 |
@@ -54817,7 +54817,7 @@ index 277bd1b..f312c9e 100644 |
4086 |
int len; |
4087 |
struct inode *inode = NULL; |
4088 |
|
4089 |
-@@ -1555,7 +1556,12 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx) |
4090 |
+@@ -1567,7 +1568,12 @@ static int configfs_readdir(struct file *file, struct dir_context *ctx) |
4091 |
continue; |
4092 |
|
4093 |
name = configfs_get_name(next); |
4094 |
@@ -54929,34 +54929,18 @@ index 9bdeca1..2247b92 100644 |
4095 |
EXPORT_SYMBOL(dump_write); |
4096 |
|
4097 |
diff --git a/fs/dcache.c b/fs/dcache.c |
4098 |
-index ae6ebb8..5977a84 100644 |
4099 |
+index 89f9671..5977a84 100644 |
4100 |
--- a/fs/dcache.c |
4101 |
+++ b/fs/dcache.c |
4102 |
-@@ -2881,9 +2881,9 @@ static int prepend_path(const struct path *path, |
4103 |
- const struct path *root, |
4104 |
- char **buffer, int *buflen) |
4105 |
- { |
4106 |
-- struct dentry *dentry = path->dentry; |
4107 |
-- struct vfsmount *vfsmnt = path->mnt; |
4108 |
-- struct mount *mnt = real_mount(vfsmnt); |
4109 |
-+ struct dentry *dentry; |
4110 |
-+ struct vfsmount *vfsmnt; |
4111 |
-+ struct mount *mnt; |
4112 |
- int error = 0; |
4113 |
- unsigned seq = 0; |
4114 |
- char *bptr; |
4115 |
-@@ -2893,6 +2893,10 @@ static int prepend_path(const struct path *path, |
4116 |
+@@ -2893,6 +2893,7 @@ static int prepend_path(const struct path *path, |
4117 |
restart: |
4118 |
bptr = *buffer; |
4119 |
blen = *buflen; |
4120 |
+ error = 0; |
4121 |
-+ dentry = path->dentry; |
4122 |
-+ vfsmnt = path->mnt; |
4123 |
-+ mnt = real_mount(vfsmnt); |
4124 |
- read_seqbegin_or_lock(&rename_lock, &seq); |
4125 |
- while (dentry != root->dentry || vfsmnt != root->mnt) { |
4126 |
- struct dentry * parent; |
4127 |
-@@ -3429,7 +3433,8 @@ void __init vfs_caches_init(unsigned long mempages) |
4128 |
+ dentry = path->dentry; |
4129 |
+ vfsmnt = path->mnt; |
4130 |
+ mnt = real_mount(vfsmnt); |
4131 |
+@@ -3432,7 +3433,8 @@ void __init vfs_caches_init(unsigned long mempages) |
4132 |
mempages -= reserve; |
4133 |
|
4134 |
names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0, |
4135 |
@@ -55018,7 +55002,7 @@ index e4141f2..d8263e8 100644 |
4136 |
i += packet_length_size; |
4137 |
if (copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size)) |
4138 |
diff --git a/fs/exec.c b/fs/exec.c |
4139 |
-index 8875dd1..c53682a 100644 |
4140 |
+index bb8afc1..2f5087e 100644 |
4141 |
--- a/fs/exec.c |
4142 |
+++ b/fs/exec.c |
4143 |
@@ -55,8 +55,20 @@ |
4144 |
@@ -55501,7 +55485,7 @@ index 8875dd1..c53682a 100644 |
4145 |
out: |
4146 |
if (bprm->mm) { |
4147 |
acct_arg_size(bprm, 0); |
4148 |
-@@ -1700,3 +1874,295 @@ asmlinkage long compat_sys_execve(const char __user * filename, |
4149 |
+@@ -1706,3 +1880,295 @@ asmlinkage long compat_sys_execve(const char __user * filename, |
4150 |
return error; |
4151 |
} |
4152 |
#endif |
4153 |
@@ -57718,10 +57702,10 @@ index b7989f2..1f72ec4 100644 |
4154 |
if (!IS_ERR(link)) |
4155 |
free_page((unsigned long) link); |
4156 |
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c |
4157 |
-index ced3257..b5c3b942 100644 |
4158 |
+index 968d4c56..54a398d 100644 |
4159 |
--- a/fs/gfs2/inode.c |
4160 |
+++ b/fs/gfs2/inode.c |
4161 |
-@@ -1508,7 +1508,7 @@ out: |
4162 |
+@@ -1512,7 +1512,7 @@ out: |
4163 |
|
4164 |
static void gfs2_put_link(struct dentry *dentry, struct nameidata *nd, void *p) |
4165 |
{ |
4166 |
@@ -58644,27 +58628,6 @@ index eda8879..bfc6837 100644 |
4167 |
} |
4168 |
|
4169 |
void nfs_fattr_init(struct nfs_fattr *fattr) |
4170 |
-diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c |
4171 |
-index cc14cbb..6021bb6 100644 |
4172 |
---- a/fs/nfs/nfs4state.c |
4173 |
-+++ b/fs/nfs/nfs4state.c |
4174 |
-@@ -1881,10 +1881,15 @@ again: |
4175 |
- nfs4_root_machine_cred(clp); |
4176 |
- goto again; |
4177 |
- } |
4178 |
-- if (i > 2) |
4179 |
-+ if (clnt->cl_auth->au_flavor == RPC_AUTH_UNIX) |
4180 |
- break; |
4181 |
- case -NFS4ERR_CLID_INUSE: |
4182 |
- case -NFS4ERR_WRONGSEC: |
4183 |
-+ /* No point in retrying if we already used RPC_AUTH_UNIX */ |
4184 |
-+ if (clnt->cl_auth->au_flavor == RPC_AUTH_UNIX) { |
4185 |
-+ status = -EPERM; |
4186 |
-+ break; |
4187 |
-+ } |
4188 |
- clnt = rpc_clone_client_set_auth(clnt, RPC_AUTH_UNIX); |
4189 |
- if (IS_ERR(clnt)) { |
4190 |
- status = PTR_ERR(clnt); |
4191 |
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c |
4192 |
index 419572f..5414a23 100644 |
4193 |
--- a/fs/nfsd/nfs4proc.c |
4194 |
@@ -58679,10 +58642,10 @@ index 419572f..5414a23 100644 |
4195 |
static struct nfsd4_operation nfsd4_ops[]; |
4196 |
|
4197 |
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c |
4198 |
-index d9454fe..855c9d1 100644 |
4199 |
+index ecc735e..79b2d31 100644 |
4200 |
--- a/fs/nfsd/nfs4xdr.c |
4201 |
+++ b/fs/nfsd/nfs4xdr.c |
4202 |
-@@ -1498,7 +1498,7 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p) |
4203 |
+@@ -1500,7 +1500,7 @@ nfsd4_decode_notsupp(struct nfsd4_compoundargs *argp, void *p) |
4204 |
|
4205 |
typedef __be32(*nfsd4_dec)(struct nfsd4_compoundargs *argp, void *); |
4206 |
|
4207 |
@@ -58691,7 +58654,7 @@ index d9454fe..855c9d1 100644 |
4208 |
[OP_ACCESS] = (nfsd4_dec)nfsd4_decode_access, |
4209 |
[OP_CLOSE] = (nfsd4_dec)nfsd4_decode_close, |
4210 |
[OP_COMMIT] = (nfsd4_dec)nfsd4_decode_commit, |
4211 |
-@@ -1538,7 +1538,7 @@ static nfsd4_dec nfsd4_dec_ops[] = { |
4212 |
+@@ -1540,7 +1540,7 @@ static nfsd4_dec nfsd4_dec_ops[] = { |
4213 |
[OP_RELEASE_LOCKOWNER] = (nfsd4_dec)nfsd4_decode_release_lockowner, |
4214 |
}; |
4215 |
|
4216 |
@@ -58700,7 +58663,7 @@ index d9454fe..855c9d1 100644 |
4217 |
[OP_ACCESS] = (nfsd4_dec)nfsd4_decode_access, |
4218 |
[OP_CLOSE] = (nfsd4_dec)nfsd4_decode_close, |
4219 |
[OP_COMMIT] = (nfsd4_dec)nfsd4_decode_commit, |
4220 |
-@@ -1600,7 +1600,7 @@ static nfsd4_dec nfsd41_dec_ops[] = { |
4221 |
+@@ -1602,7 +1602,7 @@ static nfsd4_dec nfsd41_dec_ops[] = { |
4222 |
}; |
4223 |
|
4224 |
struct nfsd4_minorversion_ops { |
4225 |
@@ -58735,10 +58698,10 @@ index 9186c7c..3fdde3e 100644 |
4226 |
/* Don't cache excessive amounts of data and XDR failures */ |
4227 |
if (!statp || len > (256 >> 2)) { |
4228 |
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c |
4229 |
-index c827acb..b253b77 100644 |
4230 |
+index 72cb28e..5b5f87d 100644 |
4231 |
--- a/fs/nfsd/vfs.c |
4232 |
+++ b/fs/nfsd/vfs.c |
4233 |
-@@ -968,7 +968,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, |
4234 |
+@@ -993,7 +993,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, |
4235 |
} else { |
4236 |
oldfs = get_fs(); |
4237 |
set_fs(KERNEL_DS); |
4238 |
@@ -58747,7 +58710,7 @@ index c827acb..b253b77 100644 |
4239 |
set_fs(oldfs); |
4240 |
} |
4241 |
|
4242 |
-@@ -1055,7 +1055,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, |
4243 |
+@@ -1080,7 +1080,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, |
4244 |
|
4245 |
/* Write the data. */ |
4246 |
oldfs = get_fs(); set_fs(KERNEL_DS); |
4247 |
@@ -58756,7 +58719,7 @@ index c827acb..b253b77 100644 |
4248 |
set_fs(oldfs); |
4249 |
if (host_err < 0) |
4250 |
goto out_nfserr; |
4251 |
-@@ -1601,7 +1601,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) |
4252 |
+@@ -1626,7 +1626,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) |
4253 |
*/ |
4254 |
|
4255 |
oldfs = get_fs(); set_fs(KERNEL_DS); |
4256 |
@@ -73214,7 +73177,7 @@ index 729a4d1..9b304ae 100644 |
4257 |
static inline kuid_t audit_get_loginuid(struct task_struct *tsk) |
4258 |
{ |
4259 |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h |
4260 |
-index e8112ae..05b8e7f 100644 |
4261 |
+index 7554fd4..0f86379 100644 |
4262 |
--- a/include/linux/binfmts.h |
4263 |
+++ b/include/linux/binfmts.h |
4264 |
@@ -73,8 +73,10 @@ struct linux_binfmt { |
4265 |
@@ -77219,7 +77182,7 @@ index 6dacb93..6174423 100644 |
4266 |
static inline void anon_vma_merge(struct vm_area_struct *vma, |
4267 |
struct vm_area_struct *next) |
4268 |
diff --git a/include/linux/sched.h b/include/linux/sched.h |
4269 |
-index e27baee..aaef421 100644 |
4270 |
+index b1e963e..114b8fd 100644 |
4271 |
--- a/include/linux/sched.h |
4272 |
+++ b/include/linux/sched.h |
4273 |
@@ -62,6 +62,7 @@ struct bio_list; |
4274 |
@@ -77259,7 +77222,7 @@ index e27baee..aaef421 100644 |
4275 |
extern void arch_pick_mmap_layout(struct mm_struct *mm); |
4276 |
extern unsigned long |
4277 |
arch_get_unmapped_area(struct file *, unsigned long, unsigned long, |
4278 |
-@@ -581,6 +595,17 @@ struct signal_struct { |
4279 |
+@@ -585,6 +599,17 @@ struct signal_struct { |
4280 |
#ifdef CONFIG_TASKSTATS |
4281 |
struct taskstats *stats; |
4282 |
#endif |
4283 |
@@ -77277,7 +77240,7 @@ index e27baee..aaef421 100644 |
4284 |
#ifdef CONFIG_AUDIT |
4285 |
unsigned audit_tty; |
4286 |
unsigned audit_tty_log_passwd; |
4287 |
-@@ -661,6 +686,14 @@ struct user_struct { |
4288 |
+@@ -665,6 +690,14 @@ struct user_struct { |
4289 |
struct key *session_keyring; /* UID's default session keyring */ |
4290 |
#endif |
4291 |
|
4292 |
@@ -77292,7 +77255,7 @@ index e27baee..aaef421 100644 |
4293 |
/* Hash table maintenance information */ |
4294 |
struct hlist_node uidhash_node; |
4295 |
kuid_t uid; |
4296 |
-@@ -1146,8 +1179,8 @@ struct task_struct { |
4297 |
+@@ -1150,8 +1183,8 @@ struct task_struct { |
4298 |
struct list_head thread_group; |
4299 |
|
4300 |
struct completion *vfork_done; /* for vfork() */ |
4301 |
@@ -77303,7 +77266,7 @@ index e27baee..aaef421 100644 |
4302 |
|
4303 |
cputime_t utime, stime, utimescaled, stimescaled; |
4304 |
cputime_t gtime; |
4305 |
-@@ -1172,11 +1205,6 @@ struct task_struct { |
4306 |
+@@ -1176,11 +1209,6 @@ struct task_struct { |
4307 |
struct task_cputime cputime_expires; |
4308 |
struct list_head cpu_timers[3]; |
4309 |
|
4310 |
@@ -77315,7 +77278,7 @@ index e27baee..aaef421 100644 |
4311 |
char comm[TASK_COMM_LEN]; /* executable name excluding path |
4312 |
- access with [gs]et_task_comm (which lock |
4313 |
it with task_lock()) |
4314 |
-@@ -1193,6 +1221,10 @@ struct task_struct { |
4315 |
+@@ -1197,6 +1225,10 @@ struct task_struct { |
4316 |
#endif |
4317 |
/* CPU-specific state of this task */ |
4318 |
struct thread_struct thread; |
4319 |
@@ -77326,7 +77289,7 @@ index e27baee..aaef421 100644 |
4320 |
/* filesystem information */ |
4321 |
struct fs_struct *fs; |
4322 |
/* open file information */ |
4323 |
-@@ -1266,6 +1298,10 @@ struct task_struct { |
4324 |
+@@ -1270,6 +1302,10 @@ struct task_struct { |
4325 |
gfp_t lockdep_reclaim_gfp; |
4326 |
#endif |
4327 |
|
4328 |
@@ -77337,7 +77300,7 @@ index e27baee..aaef421 100644 |
4329 |
/* journalling filesystem info */ |
4330 |
void *journal_info; |
4331 |
|
4332 |
-@@ -1304,6 +1340,10 @@ struct task_struct { |
4333 |
+@@ -1308,6 +1344,10 @@ struct task_struct { |
4334 |
/* cg_list protected by css_set_lock and tsk->alloc_lock */ |
4335 |
struct list_head cg_list; |
4336 |
#endif |
4337 |
@@ -77348,7 +77311,7 @@ index e27baee..aaef421 100644 |
4338 |
#ifdef CONFIG_FUTEX |
4339 |
struct robust_list_head __user *robust_list; |
4340 |
#ifdef CONFIG_COMPAT |
4341 |
-@@ -1407,8 +1447,78 @@ struct task_struct { |
4342 |
+@@ -1411,8 +1451,78 @@ struct task_struct { |
4343 |
unsigned int sequential_io; |
4344 |
unsigned int sequential_io_avg; |
4345 |
#endif |
4346 |
@@ -77427,7 +77390,7 @@ index e27baee..aaef421 100644 |
4347 |
/* Future-safe accessor for struct task_struct's cpus_allowed. */ |
4348 |
#define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed) |
4349 |
|
4350 |
-@@ -1467,7 +1577,7 @@ struct pid_namespace; |
4351 |
+@@ -1471,7 +1581,7 @@ struct pid_namespace; |
4352 |
pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, |
4353 |
struct pid_namespace *ns); |
4354 |
|
4355 |
@@ -77436,7 +77399,7 @@ index e27baee..aaef421 100644 |
4356 |
{ |
4357 |
return tsk->pid; |
4358 |
} |
4359 |
-@@ -1917,7 +2027,9 @@ void yield(void); |
4360 |
+@@ -1921,7 +2031,9 @@ void yield(void); |
4361 |
extern struct exec_domain default_exec_domain; |
4362 |
|
4363 |
union thread_union { |
4364 |
@@ -77446,7 +77409,7 @@ index e27baee..aaef421 100644 |
4365 |
unsigned long stack[THREAD_SIZE/sizeof(long)]; |
4366 |
}; |
4367 |
|
4368 |
-@@ -1950,6 +2062,7 @@ extern struct pid_namespace init_pid_ns; |
4369 |
+@@ -1954,6 +2066,7 @@ extern struct pid_namespace init_pid_ns; |
4370 |
*/ |
4371 |
|
4372 |
extern struct task_struct *find_task_by_vpid(pid_t nr); |
4373 |
@@ -77454,7 +77417,7 @@ index e27baee..aaef421 100644 |
4374 |
extern struct task_struct *find_task_by_pid_ns(pid_t nr, |
4375 |
struct pid_namespace *ns); |
4376 |
|
4377 |
-@@ -2114,7 +2227,7 @@ extern void __cleanup_sighand(struct sighand_struct *); |
4378 |
+@@ -2118,7 +2231,7 @@ extern void __cleanup_sighand(struct sighand_struct *); |
4379 |
extern void exit_itimers(struct signal_struct *); |
4380 |
extern void flush_itimer_signals(void); |
4381 |
|
4382 |
@@ -77463,7 +77426,7 @@ index e27baee..aaef421 100644 |
4383 |
|
4384 |
extern int allow_signal(int); |
4385 |
extern int disallow_signal(int); |
4386 |
-@@ -2305,9 +2418,9 @@ static inline unsigned long *end_of_stack(struct task_struct *p) |
4387 |
+@@ -2309,9 +2422,9 @@ static inline unsigned long *end_of_stack(struct task_struct *p) |
4388 |
|
4389 |
#endif |
4390 |
|
4391 |
@@ -78076,10 +78039,10 @@ index 7faf933..9b85a0c 100644 |
4392 |
#ifdef CONFIG_MAGIC_SYSRQ |
4393 |
|
4394 |
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h |
4395 |
-index e7e0473..7989295 100644 |
4396 |
+index 4ae6f32..425d3e1 100644 |
4397 |
--- a/include/linux/thread_info.h |
4398 |
+++ b/include/linux/thread_info.h |
4399 |
-@@ -148,6 +148,15 @@ static inline bool test_and_clear_restore_sigmask(void) |
4400 |
+@@ -150,6 +150,15 @@ static inline bool test_and_clear_restore_sigmask(void) |
4401 |
#error "no set_restore_sigmask() provided and default one won't work" |
4402 |
#endif |
4403 |
|
4404 |
@@ -78259,10 +78222,10 @@ index 99c1b4d..562e6f3 100644 |
4405 |
|
4406 |
static inline void put_unaligned_le16(u16 val, void *p) |
4407 |
diff --git a/include/linux/usb.h b/include/linux/usb.h |
4408 |
-index 001629c..7c1cc9b 100644 |
4409 |
+index 39cfa0a..d45fa38 100644 |
4410 |
--- a/include/linux/usb.h |
4411 |
+++ b/include/linux/usb.h |
4412 |
-@@ -561,7 +561,7 @@ struct usb_device { |
4413 |
+@@ -563,7 +563,7 @@ struct usb_device { |
4414 |
int maxchild; |
4415 |
|
4416 |
u32 quirks; |
4417 |
@@ -78271,7 +78234,7 @@ index 001629c..7c1cc9b 100644 |
4418 |
|
4419 |
unsigned long active_duration; |
4420 |
|
4421 |
-@@ -1635,7 +1635,7 @@ void usb_buffer_unmap_sg(const struct usb_device *dev, int is_in, |
4422 |
+@@ -1637,7 +1637,7 @@ void usb_buffer_unmap_sg(const struct usb_device *dev, int is_in, |
4423 |
|
4424 |
extern int usb_control_msg(struct usb_device *dev, unsigned int pipe, |
4425 |
__u8 request, __u8 requesttype, __u16 value, __u16 index, |
4426 |
@@ -79293,7 +79256,7 @@ index b797e8f..8e2c3aa 100644 |
4427 |
|
4428 |
/** |
4429 |
diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h |
4430 |
-index 9031a26..750d592 100644 |
4431 |
+index ae6c3b8..fd748ac 100644 |
4432 |
--- a/include/sound/compress_driver.h |
4433 |
+++ b/include/sound/compress_driver.h |
4434 |
@@ -128,7 +128,7 @@ struct snd_compr_ops { |
4435 |
@@ -80376,7 +80339,7 @@ index db9d241..bc8427c 100644 |
4436 |
sem_params.flg = semflg; |
4437 |
sem_params.u.nsems = nsems; |
4438 |
diff --git a/ipc/shm.c b/ipc/shm.c |
4439 |
-index d697396..5aadb3f 100644 |
4440 |
+index 7a51443..3a257d8 100644 |
4441 |
--- a/ipc/shm.c |
4442 |
+++ b/ipc/shm.c |
4443 |
@@ -72,6 +72,14 @@ static void shm_destroy (struct ipc_namespace *ns, struct shmid_kernel *shp); |
4444 |
@@ -80394,7 +80357,7 @@ index d697396..5aadb3f 100644 |
4445 |
void shm_init_ns(struct ipc_namespace *ns) |
4446 |
{ |
4447 |
ns->shm_ctlmax = SHMMAX; |
4448 |
-@@ -551,6 +559,14 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) |
4449 |
+@@ -554,6 +562,14 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) |
4450 |
shp->shm_lprid = 0; |
4451 |
shp->shm_atim = shp->shm_dtim = 0; |
4452 |
shp->shm_ctim = get_seconds(); |
4453 |
@@ -80409,7 +80372,7 @@ index d697396..5aadb3f 100644 |
4454 |
shp->shm_segsz = size; |
4455 |
shp->shm_nattch = 0; |
4456 |
shp->shm_file = file; |
4457 |
-@@ -604,18 +620,19 @@ static inline int shm_more_checks(struct kern_ipc_perm *ipcp, |
4458 |
+@@ -607,18 +623,19 @@ static inline int shm_more_checks(struct kern_ipc_perm *ipcp, |
4459 |
return 0; |
4460 |
} |
4461 |
|
4462 |
@@ -80434,7 +80397,7 @@ index d697396..5aadb3f 100644 |
4463 |
shm_params.key = key; |
4464 |
shm_params.flg = shmflg; |
4465 |
shm_params.u.size = size; |
4466 |
-@@ -1076,6 +1093,12 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, |
4467 |
+@@ -1089,6 +1106,12 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, |
4468 |
f_mode = FMODE_READ | FMODE_WRITE; |
4469 |
} |
4470 |
if (shmflg & SHM_EXEC) { |
4471 |
@@ -80447,7 +80410,7 @@ index d697396..5aadb3f 100644 |
4472 |
prot |= PROT_EXEC; |
4473 |
acc_mode |= S_IXUGO; |
4474 |
} |
4475 |
-@@ -1100,10 +1123,23 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, |
4476 |
+@@ -1113,6 +1136,15 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, |
4477 |
if (err) |
4478 |
goto out_unlock; |
4479 |
|
4480 |
@@ -80461,7 +80424,9 @@ index d697396..5aadb3f 100644 |
4481 |
+#endif |
4482 |
+ |
4483 |
ipc_lock_object(&shp->shm_perm); |
4484 |
-+ |
4485 |
+ |
4486 |
+ /* check if shm_destroy() is tearing down shp */ |
4487 |
+@@ -1125,6 +1157,9 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, |
4488 |
path = shp->shm_file->f_path; |
4489 |
path_get(&path); |
4490 |
shp->shm_nattch++; |
4491 |
@@ -83643,10 +83608,10 @@ index 6631e1e..310c266 100644 |
4492 |
} |
4493 |
|
4494 |
diff --git a/kernel/ptrace.c b/kernel/ptrace.c |
4495 |
-index dd562e9..74fc16d 100644 |
4496 |
+index 1f4bcb3..99cf7ab 100644 |
4497 |
--- a/kernel/ptrace.c |
4498 |
+++ b/kernel/ptrace.c |
4499 |
-@@ -326,7 +326,7 @@ static int ptrace_attach(struct task_struct *task, long request, |
4500 |
+@@ -327,7 +327,7 @@ static int ptrace_attach(struct task_struct *task, long request, |
4501 |
if (seize) |
4502 |
flags |= PT_SEIZED; |
4503 |
rcu_read_lock(); |
4504 |
@@ -83655,7 +83620,7 @@ index dd562e9..74fc16d 100644 |
4505 |
flags |= PT_PTRACE_CAP; |
4506 |
rcu_read_unlock(); |
4507 |
task->ptrace = flags; |
4508 |
-@@ -537,7 +537,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst |
4509 |
+@@ -538,7 +538,7 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst |
4510 |
break; |
4511 |
return -EIO; |
4512 |
} |
4513 |
@@ -83664,7 +83629,7 @@ index dd562e9..74fc16d 100644 |
4514 |
return -EFAULT; |
4515 |
copied += retval; |
4516 |
src += retval; |
4517 |
-@@ -805,7 +805,7 @@ int ptrace_request(struct task_struct *child, long request, |
4518 |
+@@ -806,7 +806,7 @@ int ptrace_request(struct task_struct *child, long request, |
4519 |
bool seized = child->ptrace & PT_SEIZED; |
4520 |
int ret = -EIO; |
4521 |
siginfo_t siginfo, *si; |
4522 |
@@ -83673,7 +83638,7 @@ index dd562e9..74fc16d 100644 |
4523 |
unsigned long __user *datalp = datavp; |
4524 |
unsigned long flags; |
4525 |
|
4526 |
-@@ -1051,14 +1051,21 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr, |
4527 |
+@@ -1052,14 +1052,21 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, unsigned long, addr, |
4528 |
goto out; |
4529 |
} |
4530 |
|
4531 |
@@ -83696,7 +83661,7 @@ index dd562e9..74fc16d 100644 |
4532 |
goto out_put_task_struct; |
4533 |
} |
4534 |
|
4535 |
-@@ -1086,7 +1093,7 @@ int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr, |
4536 |
+@@ -1087,7 +1094,7 @@ int generic_ptrace_peekdata(struct task_struct *tsk, unsigned long addr, |
4537 |
copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0); |
4538 |
if (copied != sizeof(tmp)) |
4539 |
return -EIO; |
4540 |
@@ -83705,7 +83670,7 @@ index dd562e9..74fc16d 100644 |
4541 |
} |
4542 |
|
4543 |
int generic_ptrace_pokedata(struct task_struct *tsk, unsigned long addr, |
4544 |
-@@ -1180,7 +1187,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request, |
4545 |
+@@ -1181,7 +1188,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request, |
4546 |
} |
4547 |
|
4548 |
asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, |
4549 |
@@ -83714,7 +83679,7 @@ index dd562e9..74fc16d 100644 |
4550 |
{ |
4551 |
struct task_struct *child; |
4552 |
long ret; |
4553 |
-@@ -1196,14 +1203,21 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, |
4554 |
+@@ -1197,14 +1204,21 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, |
4555 |
goto out; |
4556 |
} |
4557 |
|
4558 |
@@ -91107,7 +91072,7 @@ index 4bf8809..98a6914 100644 |
4559 |
EXPORT_SYMBOL(kmem_cache_free); |
4560 |
|
4561 |
diff --git a/mm/slub.c b/mm/slub.c |
4562 |
-index c3eb3d3..022c9fa 100644 |
4563 |
+index 96f2169..9111a59 100644 |
4564 |
--- a/mm/slub.c |
4565 |
+++ b/mm/slub.c |
4566 |
@@ -207,7 +207,7 @@ struct track { |
4567 |
@@ -97002,80 +96967,10 @@ index 09fb638..2e6a5c5 100644 |
4568 |
/* make a copy for the caller */ |
4569 |
*handle = ctxh; |
4570 |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c |
4571 |
-index 7747960..36d1518 100644 |
4572 |
+index 941d19f..c85ff07 100644 |
4573 |
--- a/net/sunrpc/clnt.c |
4574 |
+++ b/net/sunrpc/clnt.c |
4575 |
-@@ -656,14 +656,16 @@ EXPORT_SYMBOL_GPL(rpc_shutdown_client); |
4576 |
- /* |
4577 |
- * Free an RPC client |
4578 |
- */ |
4579 |
--static void |
4580 |
-+static struct rpc_clnt * |
4581 |
- rpc_free_client(struct rpc_clnt *clnt) |
4582 |
- { |
4583 |
-+ struct rpc_clnt *parent = NULL; |
4584 |
-+ |
4585 |
- dprintk_rcu("RPC: destroying %s client for %s\n", |
4586 |
- clnt->cl_program->name, |
4587 |
- rcu_dereference(clnt->cl_xprt)->servername); |
4588 |
- if (clnt->cl_parent != clnt) |
4589 |
-- rpc_release_client(clnt->cl_parent); |
4590 |
-+ parent = clnt->cl_parent; |
4591 |
- rpc_clnt_remove_pipedir(clnt); |
4592 |
- rpc_unregister_client(clnt); |
4593 |
- rpc_free_iostats(clnt->cl_metrics); |
4594 |
-@@ -672,18 +674,17 @@ rpc_free_client(struct rpc_clnt *clnt) |
4595 |
- rpciod_down(); |
4596 |
- rpc_free_clid(clnt); |
4597 |
- kfree(clnt); |
4598 |
-+ return parent; |
4599 |
- } |
4600 |
- |
4601 |
- /* |
4602 |
- * Free an RPC client |
4603 |
- */ |
4604 |
--static void |
4605 |
-+static struct rpc_clnt * |
4606 |
- rpc_free_auth(struct rpc_clnt *clnt) |
4607 |
- { |
4608 |
-- if (clnt->cl_auth == NULL) { |
4609 |
-- rpc_free_client(clnt); |
4610 |
-- return; |
4611 |
-- } |
4612 |
-+ if (clnt->cl_auth == NULL) |
4613 |
-+ return rpc_free_client(clnt); |
4614 |
- |
4615 |
- /* |
4616 |
- * Note: RPCSEC_GSS may need to send NULL RPC calls in order to |
4617 |
-@@ -694,7 +695,8 @@ rpc_free_auth(struct rpc_clnt *clnt) |
4618 |
- rpcauth_release(clnt->cl_auth); |
4619 |
- clnt->cl_auth = NULL; |
4620 |
- if (atomic_dec_and_test(&clnt->cl_count)) |
4621 |
-- rpc_free_client(clnt); |
4622 |
-+ return rpc_free_client(clnt); |
4623 |
-+ return NULL; |
4624 |
- } |
4625 |
- |
4626 |
- /* |
4627 |
-@@ -705,10 +707,13 @@ rpc_release_client(struct rpc_clnt *clnt) |
4628 |
- { |
4629 |
- dprintk("RPC: rpc_release_client(%p)\n", clnt); |
4630 |
- |
4631 |
-- if (list_empty(&clnt->cl_tasks)) |
4632 |
-- wake_up(&destroy_wait); |
4633 |
-- if (atomic_dec_and_test(&clnt->cl_count)) |
4634 |
-- rpc_free_auth(clnt); |
4635 |
-+ do { |
4636 |
-+ if (list_empty(&clnt->cl_tasks)) |
4637 |
-+ wake_up(&destroy_wait); |
4638 |
-+ if (!atomic_dec_and_test(&clnt->cl_count)) |
4639 |
-+ break; |
4640 |
-+ clnt = rpc_free_auth(clnt); |
4641 |
-+ } while (clnt != NULL); |
4642 |
- } |
4643 |
- EXPORT_SYMBOL_GPL(rpc_release_client); |
4644 |
- |
4645 |
-@@ -1314,7 +1319,9 @@ call_start(struct rpc_task *task) |
4646 |
+@@ -1319,7 +1319,9 @@ call_start(struct rpc_task *task) |
4647 |
(RPC_IS_ASYNC(task) ? "async" : "sync")); |
4648 |
|
4649 |
/* Increment call count */ |
4650 |
@@ -97343,110 +97238,6 @@ index 62e4f9b..dd3f2d7 100644 |
4651 |
|
4652 |
/* See if we can opportunistically reap SQ WR to make room */ |
4653 |
sq_cq_reap(xprt); |
4654 |
-diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c |
4655 |
-index ee03d35..b752e1d 100644 |
4656 |
---- a/net/sunrpc/xprtsock.c |
4657 |
-+++ b/net/sunrpc/xprtsock.c |
4658 |
-@@ -393,8 +393,10 @@ static int xs_send_kvec(struct socket *sock, struct sockaddr *addr, int addrlen, |
4659 |
- return kernel_sendmsg(sock, &msg, NULL, 0, 0); |
4660 |
- } |
4661 |
- |
4662 |
--static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned int base, int more) |
4663 |
-+static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned int base, int more, bool zerocopy) |
4664 |
- { |
4665 |
-+ ssize_t (*do_sendpage)(struct socket *sock, struct page *page, |
4666 |
-+ int offset, size_t size, int flags); |
4667 |
- struct page **ppage; |
4668 |
- unsigned int remainder; |
4669 |
- int err, sent = 0; |
4670 |
-@@ -403,6 +405,9 @@ static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned i |
4671 |
- base += xdr->page_base; |
4672 |
- ppage = xdr->pages + (base >> PAGE_SHIFT); |
4673 |
- base &= ~PAGE_MASK; |
4674 |
-+ do_sendpage = sock->ops->sendpage; |
4675 |
-+ if (!zerocopy) |
4676 |
-+ do_sendpage = sock_no_sendpage; |
4677 |
- for(;;) { |
4678 |
- unsigned int len = min_t(unsigned int, PAGE_SIZE - base, remainder); |
4679 |
- int flags = XS_SENDMSG_FLAGS; |
4680 |
-@@ -410,7 +415,7 @@ static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned i |
4681 |
- remainder -= len; |
4682 |
- if (remainder != 0 || more) |
4683 |
- flags |= MSG_MORE; |
4684 |
-- err = sock->ops->sendpage(sock, *ppage, base, len, flags); |
4685 |
-+ err = do_sendpage(sock, *ppage, base, len, flags); |
4686 |
- if (remainder == 0 || err != len) |
4687 |
- break; |
4688 |
- sent += err; |
4689 |
-@@ -431,9 +436,10 @@ static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned i |
4690 |
- * @addrlen: UDP only -- length of destination address |
4691 |
- * @xdr: buffer containing this request |
4692 |
- * @base: starting position in the buffer |
4693 |
-+ * @zerocopy: true if it is safe to use sendpage() |
4694 |
- * |
4695 |
- */ |
4696 |
--static int xs_sendpages(struct socket *sock, struct sockaddr *addr, int addrlen, struct xdr_buf *xdr, unsigned int base) |
4697 |
-+static int xs_sendpages(struct socket *sock, struct sockaddr *addr, int addrlen, struct xdr_buf *xdr, unsigned int base, bool zerocopy) |
4698 |
- { |
4699 |
- unsigned int remainder = xdr->len - base; |
4700 |
- int err, sent = 0; |
4701 |
-@@ -461,7 +467,7 @@ static int xs_sendpages(struct socket *sock, struct sockaddr *addr, int addrlen, |
4702 |
- if (base < xdr->page_len) { |
4703 |
- unsigned int len = xdr->page_len - base; |
4704 |
- remainder -= len; |
4705 |
-- err = xs_send_pagedata(sock, xdr, base, remainder != 0); |
4706 |
-+ err = xs_send_pagedata(sock, xdr, base, remainder != 0, zerocopy); |
4707 |
- if (remainder == 0 || err != len) |
4708 |
- goto out; |
4709 |
- sent += err; |
4710 |
-@@ -564,7 +570,7 @@ static int xs_local_send_request(struct rpc_task *task) |
4711 |
- req->rq_svec->iov_base, req->rq_svec->iov_len); |
4712 |
- |
4713 |
- status = xs_sendpages(transport->sock, NULL, 0, |
4714 |
-- xdr, req->rq_bytes_sent); |
4715 |
-+ xdr, req->rq_bytes_sent, true); |
4716 |
- dprintk("RPC: %s(%u) = %d\n", |
4717 |
- __func__, xdr->len - req->rq_bytes_sent, status); |
4718 |
- if (likely(status >= 0)) { |
4719 |
-@@ -620,7 +626,7 @@ static int xs_udp_send_request(struct rpc_task *task) |
4720 |
- status = xs_sendpages(transport->sock, |
4721 |
- xs_addr(xprt), |
4722 |
- xprt->addrlen, xdr, |
4723 |
-- req->rq_bytes_sent); |
4724 |
-+ req->rq_bytes_sent, true); |
4725 |
- |
4726 |
- dprintk("RPC: xs_udp_send_request(%u) = %d\n", |
4727 |
- xdr->len - req->rq_bytes_sent, status); |
4728 |
-@@ -693,6 +699,7 @@ static int xs_tcp_send_request(struct rpc_task *task) |
4729 |
- struct rpc_xprt *xprt = req->rq_xprt; |
4730 |
- struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); |
4731 |
- struct xdr_buf *xdr = &req->rq_snd_buf; |
4732 |
-+ bool zerocopy = true; |
4733 |
- int status; |
4734 |
- |
4735 |
- xs_encode_stream_record_marker(&req->rq_snd_buf); |
4736 |
-@@ -700,13 +707,20 @@ static int xs_tcp_send_request(struct rpc_task *task) |
4737 |
- xs_pktdump("packet data:", |
4738 |
- req->rq_svec->iov_base, |
4739 |
- req->rq_svec->iov_len); |
4740 |
-+ /* Don't use zero copy if this is a resend. If the RPC call |
4741 |
-+ * completes while the socket holds a reference to the pages, |
4742 |
-+ * then we may end up resending corrupted data. |
4743 |
-+ */ |
4744 |
-+ if (task->tk_flags & RPC_TASK_SENT) |
4745 |
-+ zerocopy = false; |
4746 |
- |
4747 |
- /* Continue transmitting the packet/record. We must be careful |
4748 |
- * to cope with writespace callbacks arriving _after_ we have |
4749 |
- * called sendmsg(). */ |
4750 |
- while (1) { |
4751 |
- status = xs_sendpages(transport->sock, |
4752 |
-- NULL, 0, xdr, req->rq_bytes_sent); |
4753 |
-+ NULL, 0, xdr, req->rq_bytes_sent, |
4754 |
-+ zerocopy); |
4755 |
- |
4756 |
- dprintk("RPC: xs_tcp_send_request(%u) = %d\n", |
4757 |
- xdr->len - req->rq_bytes_sent, status); |
4758 |
diff --git a/net/sysctl_net.c b/net/sysctl_net.c |
4759 |
index e7000be..e3b0ba7 100644 |
4760 |
--- a/net/sysctl_net.c |
4761 |
@@ -100255,7 +100046,7 @@ index 7d8803a..559f8d0 100644 |
4762 |
list_add(&s->list, &cs4297a_devs); |
4763 |
|
4764 |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c |
4765 |
-index 748c6a9..a27725a 100644 |
4766 |
+index e938a68..2a728ad 100644 |
4767 |
--- a/sound/pci/hda/hda_codec.c |
4768 |
+++ b/sound/pci/hda/hda_codec.c |
4769 |
@@ -976,14 +976,10 @@ find_codec_preset(struct hda_codec *codec) |
4770 |
|
4771 |
diff --git a/3.12.1/4425_grsec_remove_EI_PAX.patch b/3.12.2/4425_grsec_remove_EI_PAX.patch |
4772 |
similarity index 100% |
4773 |
rename from 3.12.1/4425_grsec_remove_EI_PAX.patch |
4774 |
rename to 3.12.2/4425_grsec_remove_EI_PAX.patch |
4775 |
|
4776 |
diff --git a/3.12.1/4427_force_XATTR_PAX_tmpfs.patch b/3.12.2/4427_force_XATTR_PAX_tmpfs.patch |
4777 |
similarity index 100% |
4778 |
rename from 3.12.1/4427_force_XATTR_PAX_tmpfs.patch |
4779 |
rename to 3.12.2/4427_force_XATTR_PAX_tmpfs.patch |
4780 |
|
4781 |
diff --git a/3.12.1/4430_grsec-remove-localversion-grsec.patch b/3.12.2/4430_grsec-remove-localversion-grsec.patch |
4782 |
similarity index 100% |
4783 |
rename from 3.12.1/4430_grsec-remove-localversion-grsec.patch |
4784 |
rename to 3.12.2/4430_grsec-remove-localversion-grsec.patch |
4785 |
|
4786 |
diff --git a/3.12.1/4435_grsec-mute-warnings.patch b/3.12.2/4435_grsec-mute-warnings.patch |
4787 |
similarity index 100% |
4788 |
rename from 3.12.1/4435_grsec-mute-warnings.patch |
4789 |
rename to 3.12.2/4435_grsec-mute-warnings.patch |
4790 |
|
4791 |
diff --git a/3.12.1/4440_grsec-remove-protected-paths.patch b/3.12.2/4440_grsec-remove-protected-paths.patch |
4792 |
similarity index 100% |
4793 |
rename from 3.12.1/4440_grsec-remove-protected-paths.patch |
4794 |
rename to 3.12.2/4440_grsec-remove-protected-paths.patch |
4795 |
|
4796 |
diff --git a/3.12.1/4450_grsec-kconfig-default-gids.patch b/3.12.2/4450_grsec-kconfig-default-gids.patch |
4797 |
similarity index 100% |
4798 |
rename from 3.12.1/4450_grsec-kconfig-default-gids.patch |
4799 |
rename to 3.12.2/4450_grsec-kconfig-default-gids.patch |
4800 |
|
4801 |
diff --git a/3.12.1/4465_selinux-avc_audit-log-curr_ip.patch b/3.12.2/4465_selinux-avc_audit-log-curr_ip.patch |
4802 |
similarity index 100% |
4803 |
rename from 3.12.1/4465_selinux-avc_audit-log-curr_ip.patch |
4804 |
rename to 3.12.2/4465_selinux-avc_audit-log-curr_ip.patch |
4805 |
|
4806 |
diff --git a/3.12.1/4470_disable-compat_vdso.patch b/3.12.2/4470_disable-compat_vdso.patch |
4807 |
similarity index 100% |
4808 |
rename from 3.12.1/4470_disable-compat_vdso.patch |
4809 |
rename to 3.12.2/4470_disable-compat_vdso.patch |
4810 |
|
4811 |
diff --git a/3.12.1/4475_emutramp_default_on.patch b/3.12.2/4475_emutramp_default_on.patch |
4812 |
similarity index 100% |
4813 |
rename from 3.12.1/4475_emutramp_default_on.patch |
4814 |
rename to 3.12.2/4475_emutramp_default_on.patch |
4815 |
|
4816 |
diff --git a/3.2.52/0000_README b/3.2.53/0000_README |
4817 |
similarity index 93% |
4818 |
rename from 3.2.52/0000_README |
4819 |
rename to 3.2.53/0000_README |
4820 |
index 0137c2a..8426af2 100644 |
4821 |
--- a/3.2.52/0000_README |
4822 |
+++ b/3.2.53/0000_README |
4823 |
@@ -62,19 +62,19 @@ Patch: 1035_linux-3.2.36.patch |
4824 |
From: http://www.kernel.org |
4825 |
Desc: Linux 3.2.36 |
4826 |
|
4827 |
-Patch: 1036_linux-3.2.37.patch |
4828 |
+Patch: 1036_linux-3.2.37.patch |
4829 |
From: http://www.kernel.org |
4830 |
Desc: Linux 3.2.37 |
4831 |
|
4832 |
-Patch: 1037_linux-3.2.38.patch |
4833 |
+Patch: 1037_linux-3.2.38.patch |
4834 |
From: http://www.kernel.org |
4835 |
Desc: Linux 3.2.38 |
4836 |
|
4837 |
-Patch: 1038_linux-3.2.39.patch |
4838 |
+Patch: 1038_linux-3.2.39.patch |
4839 |
From: http://www.kernel.org |
4840 |
Desc: Linux 3.2.39 |
4841 |
|
4842 |
-Patch: 1039_linux-3.2.40.patch |
4843 |
+Patch: 1039_linux-3.2.40.patch |
4844 |
From: http://www.kernel.org |
4845 |
Desc: Linux 3.2.40 |
4846 |
|
4847 |
@@ -126,7 +126,11 @@ Patch: 1051_linux-3.2.52.patch |
4848 |
From: http://www.kernel.org |
4849 |
Desc: Linux 3.2.52 |
4850 |
|
4851 |
-Patch: 4420_grsecurity-3.0-3.2.52-201311261520.patch |
4852 |
+Patch: 1052_linux-3.2.53.patch |
4853 |
+From: http://www.kernel.org |
4854 |
+Desc: Linux 3.2.53 |
4855 |
+ |
4856 |
+Patch: 4420_grsecurity-3.0-3.2.53-201312011108.patch |
4857 |
From: http://www.grsecurity.net |
4858 |
Desc: hardened-sources base patch from upstream grsecurity |
4859 |
|
4860 |
|
4861 |
diff --git a/3.2.52/1021_linux-3.2.22.patch b/3.2.53/1021_linux-3.2.22.patch |
4862 |
similarity index 100% |
4863 |
rename from 3.2.52/1021_linux-3.2.22.patch |
4864 |
rename to 3.2.53/1021_linux-3.2.22.patch |
4865 |
|
4866 |
diff --git a/3.2.52/1022_linux-3.2.23.patch b/3.2.53/1022_linux-3.2.23.patch |
4867 |
similarity index 100% |
4868 |
rename from 3.2.52/1022_linux-3.2.23.patch |
4869 |
rename to 3.2.53/1022_linux-3.2.23.patch |
4870 |
|
4871 |
diff --git a/3.2.52/1023_linux-3.2.24.patch b/3.2.53/1023_linux-3.2.24.patch |
4872 |
similarity index 100% |
4873 |
rename from 3.2.52/1023_linux-3.2.24.patch |
4874 |
rename to 3.2.53/1023_linux-3.2.24.patch |
4875 |
|
4876 |
diff --git a/3.2.52/1024_linux-3.2.25.patch b/3.2.53/1024_linux-3.2.25.patch |
4877 |
similarity index 100% |
4878 |
rename from 3.2.52/1024_linux-3.2.25.patch |
4879 |
rename to 3.2.53/1024_linux-3.2.25.patch |
4880 |
|
4881 |
diff --git a/3.2.52/1025_linux-3.2.26.patch b/3.2.53/1025_linux-3.2.26.patch |
4882 |
similarity index 100% |
4883 |
rename from 3.2.52/1025_linux-3.2.26.patch |
4884 |
rename to 3.2.53/1025_linux-3.2.26.patch |
4885 |
|
4886 |
diff --git a/3.2.52/1026_linux-3.2.27.patch b/3.2.53/1026_linux-3.2.27.patch |
4887 |
similarity index 100% |
4888 |
rename from 3.2.52/1026_linux-3.2.27.patch |
4889 |
rename to 3.2.53/1026_linux-3.2.27.patch |
4890 |
|
4891 |
diff --git a/3.2.52/1027_linux-3.2.28.patch b/3.2.53/1027_linux-3.2.28.patch |
4892 |
similarity index 100% |
4893 |
rename from 3.2.52/1027_linux-3.2.28.patch |
4894 |
rename to 3.2.53/1027_linux-3.2.28.patch |
4895 |
|
4896 |
diff --git a/3.2.52/1028_linux-3.2.29.patch b/3.2.53/1028_linux-3.2.29.patch |
4897 |
similarity index 100% |
4898 |
rename from 3.2.52/1028_linux-3.2.29.patch |
4899 |
rename to 3.2.53/1028_linux-3.2.29.patch |
4900 |
|
4901 |
diff --git a/3.2.52/1029_linux-3.2.30.patch b/3.2.53/1029_linux-3.2.30.patch |
4902 |
similarity index 100% |
4903 |
rename from 3.2.52/1029_linux-3.2.30.patch |
4904 |
rename to 3.2.53/1029_linux-3.2.30.patch |
4905 |
|
4906 |
diff --git a/3.2.52/1030_linux-3.2.31.patch b/3.2.53/1030_linux-3.2.31.patch |
4907 |
similarity index 100% |
4908 |
rename from 3.2.52/1030_linux-3.2.31.patch |
4909 |
rename to 3.2.53/1030_linux-3.2.31.patch |
4910 |
|
4911 |
diff --git a/3.2.52/1031_linux-3.2.32.patch b/3.2.53/1031_linux-3.2.32.patch |
4912 |
similarity index 100% |
4913 |
rename from 3.2.52/1031_linux-3.2.32.patch |
4914 |
rename to 3.2.53/1031_linux-3.2.32.patch |
4915 |
|
4916 |
diff --git a/3.2.52/1032_linux-3.2.33.patch b/3.2.53/1032_linux-3.2.33.patch |
4917 |
similarity index 100% |
4918 |
rename from 3.2.52/1032_linux-3.2.33.patch |
4919 |
rename to 3.2.53/1032_linux-3.2.33.patch |
4920 |
|
4921 |
diff --git a/3.2.52/1033_linux-3.2.34.patch b/3.2.53/1033_linux-3.2.34.patch |
4922 |
similarity index 100% |
4923 |
rename from 3.2.52/1033_linux-3.2.34.patch |
4924 |
rename to 3.2.53/1033_linux-3.2.34.patch |
4925 |
|
4926 |
diff --git a/3.2.52/1034_linux-3.2.35.patch b/3.2.53/1034_linux-3.2.35.patch |
4927 |
similarity index 100% |
4928 |
rename from 3.2.52/1034_linux-3.2.35.patch |
4929 |
rename to 3.2.53/1034_linux-3.2.35.patch |
4930 |
|
4931 |
diff --git a/3.2.52/1035_linux-3.2.36.patch b/3.2.53/1035_linux-3.2.36.patch |
4932 |
similarity index 100% |
4933 |
rename from 3.2.52/1035_linux-3.2.36.patch |
4934 |
rename to 3.2.53/1035_linux-3.2.36.patch |
4935 |
|
4936 |
diff --git a/3.2.52/1036_linux-3.2.37.patch b/3.2.53/1036_linux-3.2.37.patch |
4937 |
similarity index 100% |
4938 |
rename from 3.2.52/1036_linux-3.2.37.patch |
4939 |
rename to 3.2.53/1036_linux-3.2.37.patch |
4940 |
|
4941 |
diff --git a/3.2.52/1037_linux-3.2.38.patch b/3.2.53/1037_linux-3.2.38.patch |
4942 |
similarity index 100% |
4943 |
rename from 3.2.52/1037_linux-3.2.38.patch |
4944 |
rename to 3.2.53/1037_linux-3.2.38.patch |
4945 |
|
4946 |
diff --git a/3.2.52/1038_linux-3.2.39.patch b/3.2.53/1038_linux-3.2.39.patch |
4947 |
similarity index 100% |
4948 |
rename from 3.2.52/1038_linux-3.2.39.patch |
4949 |
rename to 3.2.53/1038_linux-3.2.39.patch |
4950 |
|
4951 |
diff --git a/3.2.52/1039_linux-3.2.40.patch b/3.2.53/1039_linux-3.2.40.patch |
4952 |
similarity index 100% |
4953 |
rename from 3.2.52/1039_linux-3.2.40.patch |
4954 |
rename to 3.2.53/1039_linux-3.2.40.patch |
4955 |
|
4956 |
diff --git a/3.2.52/1040_linux-3.2.41.patch b/3.2.53/1040_linux-3.2.41.patch |
4957 |
similarity index 100% |
4958 |
rename from 3.2.52/1040_linux-3.2.41.patch |
4959 |
rename to 3.2.53/1040_linux-3.2.41.patch |
4960 |
|
4961 |
diff --git a/3.2.52/1041_linux-3.2.42.patch b/3.2.53/1041_linux-3.2.42.patch |
4962 |
similarity index 100% |
4963 |
rename from 3.2.52/1041_linux-3.2.42.patch |
4964 |
rename to 3.2.53/1041_linux-3.2.42.patch |
4965 |
|
4966 |
diff --git a/3.2.52/1042_linux-3.2.43.patch b/3.2.53/1042_linux-3.2.43.patch |
4967 |
similarity index 100% |
4968 |
rename from 3.2.52/1042_linux-3.2.43.patch |
4969 |
rename to 3.2.53/1042_linux-3.2.43.patch |
4970 |
|
4971 |
diff --git a/3.2.52/1043_linux-3.2.44.patch b/3.2.53/1043_linux-3.2.44.patch |
4972 |
similarity index 100% |
4973 |
rename from 3.2.52/1043_linux-3.2.44.patch |
4974 |
rename to 3.2.53/1043_linux-3.2.44.patch |
4975 |
|
4976 |
diff --git a/3.2.52/1044_linux-3.2.45.patch b/3.2.53/1044_linux-3.2.45.patch |
4977 |
similarity index 100% |
4978 |
rename from 3.2.52/1044_linux-3.2.45.patch |
4979 |
rename to 3.2.53/1044_linux-3.2.45.patch |
4980 |
|
4981 |
diff --git a/3.2.52/1045_linux-3.2.46.patch b/3.2.53/1045_linux-3.2.46.patch |
4982 |
similarity index 100% |
4983 |
rename from 3.2.52/1045_linux-3.2.46.patch |
4984 |
rename to 3.2.53/1045_linux-3.2.46.patch |
4985 |
|
4986 |
diff --git a/3.2.52/1046_linux-3.2.47.patch b/3.2.53/1046_linux-3.2.47.patch |
4987 |
similarity index 100% |
4988 |
rename from 3.2.52/1046_linux-3.2.47.patch |
4989 |
rename to 3.2.53/1046_linux-3.2.47.patch |
4990 |
|
4991 |
diff --git a/3.2.52/1047_linux-3.2.48.patch b/3.2.53/1047_linux-3.2.48.patch |
4992 |
similarity index 100% |
4993 |
rename from 3.2.52/1047_linux-3.2.48.patch |
4994 |
rename to 3.2.53/1047_linux-3.2.48.patch |
4995 |
|
4996 |
diff --git a/3.2.52/1048_linux-3.2.49.patch b/3.2.53/1048_linux-3.2.49.patch |
4997 |
similarity index 100% |
4998 |
rename from 3.2.52/1048_linux-3.2.49.patch |
4999 |
rename to 3.2.53/1048_linux-3.2.49.patch |
5000 |
|
5001 |
diff --git a/3.2.52/1049_linux-3.2.50.patch b/3.2.53/1049_linux-3.2.50.patch |
5002 |
similarity index 100% |
5003 |
rename from 3.2.52/1049_linux-3.2.50.patch |
5004 |
rename to 3.2.53/1049_linux-3.2.50.patch |
5005 |
|
5006 |
diff --git a/3.2.52/1050_linux-3.2.51.patch b/3.2.53/1050_linux-3.2.51.patch |
5007 |
similarity index 100% |
5008 |
rename from 3.2.52/1050_linux-3.2.51.patch |
5009 |
rename to 3.2.53/1050_linux-3.2.51.patch |
5010 |
|
5011 |
diff --git a/3.2.52/1051_linux-3.2.52.patch b/3.2.53/1051_linux-3.2.52.patch |
5012 |
similarity index 100% |
5013 |
rename from 3.2.52/1051_linux-3.2.52.patch |
5014 |
rename to 3.2.53/1051_linux-3.2.52.patch |
5015 |
|
5016 |
diff --git a/3.2.53/1052_linux-3.2.53.patch b/3.2.53/1052_linux-3.2.53.patch |
5017 |
new file mode 100644 |
5018 |
index 0000000..986d714 |
5019 |
--- /dev/null |
5020 |
+++ b/3.2.53/1052_linux-3.2.53.patch |
5021 |
@@ -0,0 +1,3357 @@ |
5022 |
+diff --git a/Makefile b/Makefile |
5023 |
+index 1dd2c09..90f57dc 100644 |
5024 |
+--- a/Makefile |
5025 |
++++ b/Makefile |
5026 |
+@@ -1,6 +1,6 @@ |
5027 |
+ VERSION = 3 |
5028 |
+ PATCHLEVEL = 2 |
5029 |
+-SUBLEVEL = 52 |
5030 |
++SUBLEVEL = 53 |
5031 |
+ EXTRAVERSION = |
5032 |
+ NAME = Saber-toothed Squirrel |
5033 |
+ |
5034 |
+diff --git a/arch/mips/include/asm/jump_label.h b/arch/mips/include/asm/jump_label.h |
5035 |
+index 1881b31..b19559c 100644 |
5036 |
+--- a/arch/mips/include/asm/jump_label.h |
5037 |
++++ b/arch/mips/include/asm/jump_label.h |
5038 |
+@@ -22,7 +22,7 @@ |
5039 |
+ |
5040 |
+ static __always_inline bool arch_static_branch(struct jump_label_key *key) |
5041 |
+ { |
5042 |
+- asm goto("1:\tnop\n\t" |
5043 |
++ asm_volatile_goto("1:\tnop\n\t" |
5044 |
+ "nop\n\t" |
5045 |
+ ".pushsection __jump_table, \"aw\"\n\t" |
5046 |
+ WORD_INSN " 1b, %l[l_yes], %0\n\t" |
5047 |
+diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S |
5048 |
+index 37aabd7..d2d5825 100644 |
5049 |
+--- a/arch/parisc/kernel/head.S |
5050 |
++++ b/arch/parisc/kernel/head.S |
5051 |
+@@ -195,6 +195,8 @@ common_stext: |
5052 |
+ ldw MEM_PDC_HI(%r0),%r6 |
5053 |
+ depd %r6, 31, 32, %r3 /* move to upper word */ |
5054 |
+ |
5055 |
++ mfctl %cr30,%r6 /* PCX-W2 firmware bug */ |
5056 |
++ |
5057 |
+ ldo PDC_PSW(%r0),%arg0 /* 21 */ |
5058 |
+ ldo PDC_PSW_SET_DEFAULTS(%r0),%arg1 /* 2 */ |
5059 |
+ ldo PDC_PSW_WIDE_BIT(%r0),%arg2 /* 2 */ |
5060 |
+@@ -203,6 +205,8 @@ common_stext: |
5061 |
+ copy %r0,%arg3 |
5062 |
+ |
5063 |
+ stext_pdc_ret: |
5064 |
++ mtctl %r6,%cr30 /* restore task thread info */ |
5065 |
++ |
5066 |
+ /* restore rfi target address*/ |
5067 |
+ ldd TI_TASK-THREAD_SZ_ALGN(%sp), %r10 |
5068 |
+ tophys_r1 %r10 |
5069 |
+diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c |
5070 |
+index f19e660..cd8b02f 100644 |
5071 |
+--- a/arch/parisc/kernel/traps.c |
5072 |
++++ b/arch/parisc/kernel/traps.c |
5073 |
+@@ -811,14 +811,14 @@ void notrace handle_interruption(int code, struct pt_regs *regs) |
5074 |
+ else { |
5075 |
+ |
5076 |
+ /* |
5077 |
+- * The kernel should never fault on its own address space. |
5078 |
++ * The kernel should never fault on its own address space, |
5079 |
++ * unless pagefault_disable() was called before. |
5080 |
+ */ |
5081 |
+ |
5082 |
+- if (fault_space == 0) |
5083 |
++ if (fault_space == 0 && !in_atomic()) |
5084 |
+ { |
5085 |
+ pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC); |
5086 |
+ parisc_terminate("Kernel Fault", regs, code, fault_address); |
5087 |
+- |
5088 |
+ } |
5089 |
+ } |
5090 |
+ |
5091 |
+diff --git a/arch/powerpc/include/asm/jump_label.h b/arch/powerpc/include/asm/jump_label.h |
5092 |
+index 938986e..ee33888 100644 |
5093 |
+--- a/arch/powerpc/include/asm/jump_label.h |
5094 |
++++ b/arch/powerpc/include/asm/jump_label.h |
5095 |
+@@ -19,7 +19,7 @@ |
5096 |
+ |
5097 |
+ static __always_inline bool arch_static_branch(struct jump_label_key *key) |
5098 |
+ { |
5099 |
+- asm goto("1:\n\t" |
5100 |
++ asm_volatile_goto("1:\n\t" |
5101 |
+ "nop\n\t" |
5102 |
+ ".pushsection __jump_table, \"aw\"\n\t" |
5103 |
+ JUMP_ENTRY_TYPE "1b, %l[l_yes], %c0\n\t" |
5104 |
+diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S |
5105 |
+index 5e8dc08..e3b3cf9 100644 |
5106 |
+--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S |
5107 |
++++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S |
5108 |
+@@ -922,7 +922,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206) |
5109 |
+ BEGIN_FTR_SECTION |
5110 |
+ mfspr r8, SPRN_DSCR |
5111 |
+ ld r7, HSTATE_DSCR(r13) |
5112 |
+- std r8, VCPU_DSCR(r7) |
5113 |
++ std r8, VCPU_DSCR(r9) |
5114 |
+ mtspr SPRN_DSCR, r7 |
5115 |
+ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206) |
5116 |
+ |
5117 |
+diff --git a/arch/s390/include/asm/jump_label.h b/arch/s390/include/asm/jump_label.h |
5118 |
+index 95a6cf2..8512d0a 100644 |
5119 |
+--- a/arch/s390/include/asm/jump_label.h |
5120 |
++++ b/arch/s390/include/asm/jump_label.h |
5121 |
+@@ -15,7 +15,7 @@ |
5122 |
+ |
5123 |
+ static __always_inline bool arch_static_branch(struct jump_label_key *key) |
5124 |
+ { |
5125 |
+- asm goto("0: brcl 0,0\n" |
5126 |
++ asm_volatile_goto("0: brcl 0,0\n" |
5127 |
+ ".pushsection __jump_table, \"aw\"\n" |
5128 |
+ ASM_ALIGN "\n" |
5129 |
+ ASM_PTR " 0b, %l[label], %0\n" |
5130 |
+diff --git a/arch/sparc/include/asm/jump_label.h b/arch/sparc/include/asm/jump_label.h |
5131 |
+index fc73a82..e17b65b 100644 |
5132 |
+--- a/arch/sparc/include/asm/jump_label.h |
5133 |
++++ b/arch/sparc/include/asm/jump_label.h |
5134 |
+@@ -9,7 +9,7 @@ |
5135 |
+ |
5136 |
+ static __always_inline bool arch_static_branch(struct jump_label_key *key) |
5137 |
+ { |
5138 |
+- asm goto("1:\n\t" |
5139 |
++ asm_volatile_goto("1:\n\t" |
5140 |
+ "nop\n\t" |
5141 |
+ "nop\n\t" |
5142 |
+ ".pushsection __jump_table, \"aw\"\n\t" |
5143 |
+diff --git a/arch/tile/include/asm/percpu.h b/arch/tile/include/asm/percpu.h |
5144 |
+index 63294f5..4f7ae39 100644 |
5145 |
+--- a/arch/tile/include/asm/percpu.h |
5146 |
++++ b/arch/tile/include/asm/percpu.h |
5147 |
+@@ -15,9 +15,37 @@ |
5148 |
+ #ifndef _ASM_TILE_PERCPU_H |
5149 |
+ #define _ASM_TILE_PERCPU_H |
5150 |
+ |
5151 |
+-register unsigned long __my_cpu_offset __asm__("tp"); |
5152 |
+-#define __my_cpu_offset __my_cpu_offset |
5153 |
+-#define set_my_cpu_offset(tp) (__my_cpu_offset = (tp)) |
5154 |
++register unsigned long my_cpu_offset_reg asm("tp"); |
5155 |
++ |
5156 |
++#ifdef CONFIG_PREEMPT |
5157 |
++/* |
5158 |
++ * For full preemption, we can't just use the register variable |
5159 |
++ * directly, since we need barrier() to hazard against it, causing the |
5160 |
++ * compiler to reload anything computed from a previous "tp" value. |
5161 |
++ * But we also don't want to use volatile asm, since we'd like the |
5162 |
++ * compiler to be able to cache the value across multiple percpu reads. |
5163 |
++ * So we use a fake stack read as a hazard against barrier(). |
5164 |
++ * The 'U' constraint is like 'm' but disallows postincrement. |
5165 |
++ */ |
5166 |
++static inline unsigned long __my_cpu_offset(void) |
5167 |
++{ |
5168 |
++ unsigned long tp; |
5169 |
++ register unsigned long *sp asm("sp"); |
5170 |
++ asm("move %0, tp" : "=r" (tp) : "U" (*sp)); |
5171 |
++ return tp; |
5172 |
++} |
5173 |
++#define __my_cpu_offset __my_cpu_offset() |
5174 |
++#else |
5175 |
++/* |
5176 |
++ * We don't need to hazard against barrier() since "tp" doesn't ever |
5177 |
++ * change with PREEMPT_NONE, and with PREEMPT_VOLUNTARY it only |
5178 |
++ * changes at function call points, at which we are already re-reading |
5179 |
++ * the value of "tp" due to "my_cpu_offset_reg" being a global variable. |
5180 |
++ */ |
5181 |
++#define __my_cpu_offset my_cpu_offset_reg |
5182 |
++#endif |
5183 |
++ |
5184 |
++#define set_my_cpu_offset(tp) (my_cpu_offset_reg = (tp)) |
5185 |
+ |
5186 |
+ #include <asm-generic/percpu.h> |
5187 |
+ |
5188 |
+diff --git a/arch/um/kernel/exitcode.c b/arch/um/kernel/exitcode.c |
5189 |
+index 829df49..41ebbfe 100644 |
5190 |
+--- a/arch/um/kernel/exitcode.c |
5191 |
++++ b/arch/um/kernel/exitcode.c |
5192 |
+@@ -40,9 +40,11 @@ static ssize_t exitcode_proc_write(struct file *file, |
5193 |
+ const char __user *buffer, size_t count, loff_t *pos) |
5194 |
+ { |
5195 |
+ char *end, buf[sizeof("nnnnn\0")]; |
5196 |
++ size_t size; |
5197 |
+ int tmp; |
5198 |
+ |
5199 |
+- if (copy_from_user(buf, buffer, count)) |
5200 |
++ size = min(count, sizeof(buf)); |
5201 |
++ if (copy_from_user(buf, buffer, size)) |
5202 |
+ return -EFAULT; |
5203 |
+ |
5204 |
+ tmp = simple_strtol(buf, &end, 0); |
5205 |
+diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h |
5206 |
+index 0c3b775..a315f1c 100644 |
5207 |
+--- a/arch/x86/include/asm/cpufeature.h |
5208 |
++++ b/arch/x86/include/asm/cpufeature.h |
5209 |
+@@ -334,7 +334,7 @@ extern const char * const x86_power_flags[32]; |
5210 |
+ static __always_inline __pure bool __static_cpu_has(u16 bit) |
5211 |
+ { |
5212 |
+ #if __GNUC__ > 4 || __GNUC_MINOR__ >= 5 |
5213 |
+- asm goto("1: jmp %l[t_no]\n" |
5214 |
++ asm_volatile_goto("1: jmp %l[t_no]\n" |
5215 |
+ "2:\n" |
5216 |
+ ".section .altinstructions,\"a\"\n" |
5217 |
+ " .long 1b - .\n" |
5218 |
+diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h |
5219 |
+index a32b18c..e12c1bc 100644 |
5220 |
+--- a/arch/x86/include/asm/jump_label.h |
5221 |
++++ b/arch/x86/include/asm/jump_label.h |
5222 |
+@@ -13,7 +13,7 @@ |
5223 |
+ |
5224 |
+ static __always_inline bool arch_static_branch(struct jump_label_key *key) |
5225 |
+ { |
5226 |
+- asm goto("1:" |
5227 |
++ asm_volatile_goto("1:" |
5228 |
+ JUMP_LABEL_INITIAL_NOP |
5229 |
+ ".pushsection __jump_table, \"aw\" \n\t" |
5230 |
+ _ASM_ALIGN "\n\t" |
5231 |
+diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c |
5232 |
+index f2220b5..cf3e9cb 100644 |
5233 |
+--- a/arch/xtensa/kernel/signal.c |
5234 |
++++ b/arch/xtensa/kernel/signal.c |
5235 |
+@@ -346,7 +346,7 @@ static void setup_frame(int sig, struct k_sigaction *ka, siginfo_t *info, |
5236 |
+ |
5237 |
+ sp = regs->areg[1]; |
5238 |
+ |
5239 |
+- if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp)) { |
5240 |
++ if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && sas_ss_flags(sp) == 0) { |
5241 |
+ sp = current->sas_ss_sp + current->sas_ss_size; |
5242 |
+ } |
5243 |
+ |
5244 |
+diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c |
5245 |
+index aea627e..7d1a478 100644 |
5246 |
+--- a/drivers/ata/libata-eh.c |
5247 |
++++ b/drivers/ata/libata-eh.c |
5248 |
+@@ -1286,14 +1286,14 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc) |
5249 |
+ * should be retried. To be used from EH. |
5250 |
+ * |
5251 |
+ * SCSI midlayer limits the number of retries to scmd->allowed. |
5252 |
+- * scmd->retries is decremented for commands which get retried |
5253 |
++ * scmd->allowed is incremented for commands which get retried |
5254 |
+ * due to unrelated failures (qc->err_mask is zero). |
5255 |
+ */ |
5256 |
+ void ata_eh_qc_retry(struct ata_queued_cmd *qc) |
5257 |
+ { |
5258 |
+ struct scsi_cmnd *scmd = qc->scsicmd; |
5259 |
+- if (!qc->err_mask && scmd->retries) |
5260 |
+- scmd->retries--; |
5261 |
++ if (!qc->err_mask) |
5262 |
++ scmd->allowed++; |
5263 |
+ __ata_eh_qc_complete(qc); |
5264 |
+ } |
5265 |
+ |
5266 |
+diff --git a/drivers/char/random.c b/drivers/char/random.c |
5267 |
+index b651733..c244f0e 100644 |
5268 |
+--- a/drivers/char/random.c |
5269 |
++++ b/drivers/char/random.c |
5270 |
+@@ -668,7 +668,7 @@ static void set_timer_rand_state(unsigned int irq, |
5271 |
+ */ |
5272 |
+ void add_device_randomness(const void *buf, unsigned int size) |
5273 |
+ { |
5274 |
+- unsigned long time = get_cycles() ^ jiffies; |
5275 |
++ unsigned long time = random_get_entropy() ^ jiffies; |
5276 |
+ |
5277 |
+ mix_pool_bytes(&input_pool, buf, size, NULL); |
5278 |
+ mix_pool_bytes(&input_pool, &time, sizeof(time), NULL); |
5279 |
+@@ -705,7 +705,7 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num) |
5280 |
+ goto out; |
5281 |
+ |
5282 |
+ sample.jiffies = jiffies; |
5283 |
+- sample.cycles = get_cycles(); |
5284 |
++ sample.cycles = random_get_entropy(); |
5285 |
+ sample.num = num; |
5286 |
+ mix_pool_bytes(&input_pool, &sample, sizeof(sample), NULL); |
5287 |
+ |
5288 |
+@@ -772,7 +772,7 @@ void add_interrupt_randomness(int irq, int irq_flags) |
5289 |
+ struct fast_pool *fast_pool = &__get_cpu_var(irq_randomness); |
5290 |
+ struct pt_regs *regs = get_irq_regs(); |
5291 |
+ unsigned long now = jiffies; |
5292 |
+- __u32 input[4], cycles = get_cycles(); |
5293 |
++ __u32 input[4], cycles = random_get_entropy(); |
5294 |
+ |
5295 |
+ input[0] = cycles ^ jiffies; |
5296 |
+ input[1] = irq; |
5297 |
+@@ -1480,12 +1480,11 @@ ctl_table random_table[] = { |
5298 |
+ |
5299 |
+ static u32 random_int_secret[MD5_MESSAGE_BYTES / 4] ____cacheline_aligned; |
5300 |
+ |
5301 |
+-static int __init random_int_secret_init(void) |
5302 |
++int random_int_secret_init(void) |
5303 |
+ { |
5304 |
+ get_random_bytes(random_int_secret, sizeof(random_int_secret)); |
5305 |
+ return 0; |
5306 |
+ } |
5307 |
+-late_initcall(random_int_secret_init); |
5308 |
+ |
5309 |
+ /* |
5310 |
+ * Get a random word for internal kernel use only. Similar to urandom but |
5311 |
+@@ -1504,7 +1503,7 @@ unsigned int get_random_int(void) |
5312 |
+ |
5313 |
+ hash = get_cpu_var(get_random_int_hash); |
5314 |
+ |
5315 |
+- hash[0] += current->pid + jiffies + get_cycles(); |
5316 |
++ hash[0] += current->pid + jiffies + random_get_entropy(); |
5317 |
+ md5_transform(hash, random_int_secret); |
5318 |
+ ret = hash[0]; |
5319 |
+ put_cpu_var(get_random_int_hash); |
5320 |
+diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c |
5321 |
+index 46bbf43..66d5384 100644 |
5322 |
+--- a/drivers/connector/cn_proc.c |
5323 |
++++ b/drivers/connector/cn_proc.c |
5324 |
+@@ -64,6 +64,7 @@ void proc_fork_connector(struct task_struct *task) |
5325 |
+ |
5326 |
+ msg = (struct cn_msg*)buffer; |
5327 |
+ ev = (struct proc_event*)msg->data; |
5328 |
++ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
5329 |
+ get_seq(&msg->seq, &ev->cpu); |
5330 |
+ ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
5331 |
+ put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
5332 |
+@@ -79,6 +80,7 @@ void proc_fork_connector(struct task_struct *task) |
5333 |
+ memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
5334 |
+ msg->ack = 0; /* not used */ |
5335 |
+ msg->len = sizeof(*ev); |
5336 |
++ msg->flags = 0; /* not used */ |
5337 |
+ /* If cn_netlink_send() failed, the data is not sent */ |
5338 |
+ cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
5339 |
+ } |
5340 |
+@@ -95,6 +97,7 @@ void proc_exec_connector(struct task_struct *task) |
5341 |
+ |
5342 |
+ msg = (struct cn_msg*)buffer; |
5343 |
+ ev = (struct proc_event*)msg->data; |
5344 |
++ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
5345 |
+ get_seq(&msg->seq, &ev->cpu); |
5346 |
+ ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
5347 |
+ put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
5348 |
+@@ -105,6 +108,7 @@ void proc_exec_connector(struct task_struct *task) |
5349 |
+ memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
5350 |
+ msg->ack = 0; /* not used */ |
5351 |
+ msg->len = sizeof(*ev); |
5352 |
++ msg->flags = 0; /* not used */ |
5353 |
+ cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
5354 |
+ } |
5355 |
+ |
5356 |
+@@ -121,6 +125,7 @@ void proc_id_connector(struct task_struct *task, int which_id) |
5357 |
+ |
5358 |
+ msg = (struct cn_msg*)buffer; |
5359 |
+ ev = (struct proc_event*)msg->data; |
5360 |
++ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
5361 |
+ ev->what = which_id; |
5362 |
+ ev->event_data.id.process_pid = task->pid; |
5363 |
+ ev->event_data.id.process_tgid = task->tgid; |
5364 |
+@@ -144,6 +149,7 @@ void proc_id_connector(struct task_struct *task, int which_id) |
5365 |
+ memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
5366 |
+ msg->ack = 0; /* not used */ |
5367 |
+ msg->len = sizeof(*ev); |
5368 |
++ msg->flags = 0; /* not used */ |
5369 |
+ cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
5370 |
+ } |
5371 |
+ |
5372 |
+@@ -159,6 +165,7 @@ void proc_sid_connector(struct task_struct *task) |
5373 |
+ |
5374 |
+ msg = (struct cn_msg *)buffer; |
5375 |
+ ev = (struct proc_event *)msg->data; |
5376 |
++ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
5377 |
+ get_seq(&msg->seq, &ev->cpu); |
5378 |
+ ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
5379 |
+ put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
5380 |
+@@ -169,6 +176,7 @@ void proc_sid_connector(struct task_struct *task) |
5381 |
+ memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
5382 |
+ msg->ack = 0; /* not used */ |
5383 |
+ msg->len = sizeof(*ev); |
5384 |
++ msg->flags = 0; /* not used */ |
5385 |
+ cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
5386 |
+ } |
5387 |
+ |
5388 |
+@@ -184,6 +192,7 @@ void proc_ptrace_connector(struct task_struct *task, int ptrace_id) |
5389 |
+ |
5390 |
+ msg = (struct cn_msg *)buffer; |
5391 |
+ ev = (struct proc_event *)msg->data; |
5392 |
++ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
5393 |
+ get_seq(&msg->seq, &ev->cpu); |
5394 |
+ ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
5395 |
+ put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
5396 |
+@@ -202,6 +211,7 @@ void proc_ptrace_connector(struct task_struct *task, int ptrace_id) |
5397 |
+ memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
5398 |
+ msg->ack = 0; /* not used */ |
5399 |
+ msg->len = sizeof(*ev); |
5400 |
++ msg->flags = 0; /* not used */ |
5401 |
+ cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
5402 |
+ } |
5403 |
+ |
5404 |
+@@ -217,6 +227,7 @@ void proc_comm_connector(struct task_struct *task) |
5405 |
+ |
5406 |
+ msg = (struct cn_msg *)buffer; |
5407 |
+ ev = (struct proc_event *)msg->data; |
5408 |
++ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
5409 |
+ get_seq(&msg->seq, &ev->cpu); |
5410 |
+ ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
5411 |
+ put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
5412 |
+@@ -228,6 +239,7 @@ void proc_comm_connector(struct task_struct *task) |
5413 |
+ memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
5414 |
+ msg->ack = 0; /* not used */ |
5415 |
+ msg->len = sizeof(*ev); |
5416 |
++ msg->flags = 0; /* not used */ |
5417 |
+ cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
5418 |
+ } |
5419 |
+ |
5420 |
+@@ -243,6 +255,7 @@ void proc_exit_connector(struct task_struct *task) |
5421 |
+ |
5422 |
+ msg = (struct cn_msg*)buffer; |
5423 |
+ ev = (struct proc_event*)msg->data; |
5424 |
++ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
5425 |
+ get_seq(&msg->seq, &ev->cpu); |
5426 |
+ ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
5427 |
+ put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
5428 |
+@@ -255,6 +268,7 @@ void proc_exit_connector(struct task_struct *task) |
5429 |
+ memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
5430 |
+ msg->ack = 0; /* not used */ |
5431 |
+ msg->len = sizeof(*ev); |
5432 |
++ msg->flags = 0; /* not used */ |
5433 |
+ cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
5434 |
+ } |
5435 |
+ |
5436 |
+@@ -278,6 +292,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack) |
5437 |
+ |
5438 |
+ msg = (struct cn_msg*)buffer; |
5439 |
+ ev = (struct proc_event*)msg->data; |
5440 |
++ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
5441 |
+ msg->seq = rcvd_seq; |
5442 |
+ ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
5443 |
+ put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
5444 |
+@@ -287,6 +302,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack) |
5445 |
+ memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
5446 |
+ msg->ack = rcvd_ack + 1; |
5447 |
+ msg->len = sizeof(*ev); |
5448 |
++ msg->flags = 0; /* not used */ |
5449 |
+ cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
5450 |
+ } |
5451 |
+ |
5452 |
+diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c |
5453 |
+index dde6a0f..ea6efe8 100644 |
5454 |
+--- a/drivers/connector/connector.c |
5455 |
++++ b/drivers/connector/connector.c |
5456 |
+@@ -157,17 +157,18 @@ static int cn_call_callback(struct sk_buff *skb) |
5457 |
+ static void cn_rx_skb(struct sk_buff *__skb) |
5458 |
+ { |
5459 |
+ struct nlmsghdr *nlh; |
5460 |
+- int err; |
5461 |
+ struct sk_buff *skb; |
5462 |
++ int len, err; |
5463 |
+ |
5464 |
+ skb = skb_get(__skb); |
5465 |
+ |
5466 |
+ if (skb->len >= NLMSG_SPACE(0)) { |
5467 |
+ nlh = nlmsg_hdr(skb); |
5468 |
++ len = nlmsg_len(nlh); |
5469 |
+ |
5470 |
+- if (nlh->nlmsg_len < sizeof(struct cn_msg) || |
5471 |
++ if (len < (int)sizeof(struct cn_msg) || |
5472 |
+ skb->len < nlh->nlmsg_len || |
5473 |
+- nlh->nlmsg_len > CONNECTOR_MAX_MSG_SIZE) { |
5474 |
++ len > CONNECTOR_MAX_MSG_SIZE) { |
5475 |
+ kfree_skb(skb); |
5476 |
+ return; |
5477 |
+ } |
5478 |
+diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c |
5479 |
+index 40c187c..acfe567 100644 |
5480 |
+--- a/drivers/gpu/drm/drm_drv.c |
5481 |
++++ b/drivers/gpu/drm/drm_drv.c |
5482 |
+@@ -408,9 +408,16 @@ long drm_ioctl(struct file *filp, |
5483 |
+ asize = drv_size; |
5484 |
+ } |
5485 |
+ else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE)) { |
5486 |
++ u32 drv_size; |
5487 |
++ |
5488 |
+ ioctl = &drm_ioctls[nr]; |
5489 |
+- cmd = ioctl->cmd; |
5490 |
++ |
5491 |
++ drv_size = _IOC_SIZE(ioctl->cmd); |
5492 |
+ usize = asize = _IOC_SIZE(cmd); |
5493 |
++ if (drv_size > asize) |
5494 |
++ asize = drv_size; |
5495 |
++ |
5496 |
++ cmd = ioctl->cmd; |
5497 |
+ } else |
5498 |
+ goto err_i1; |
5499 |
+ |
5500 |
+diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c |
5501 |
+index 3171294..475a275 100644 |
5502 |
+--- a/drivers/gpu/drm/radeon/atombios_encoders.c |
5503 |
++++ b/drivers/gpu/drm/radeon/atombios_encoders.c |
5504 |
+@@ -1390,7 +1390,7 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode) |
5505 |
+ * does the same thing and more. |
5506 |
+ */ |
5507 |
+ if ((rdev->family != CHIP_RV710) && (rdev->family != CHIP_RV730) && |
5508 |
+- (rdev->family != CHIP_RS880)) |
5509 |
++ (rdev->family != CHIP_RS780) && (rdev->family != CHIP_RS880)) |
5510 |
+ atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0); |
5511 |
+ } |
5512 |
+ if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) { |
5513 |
+diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c |
5514 |
+index a68057a..5efba47 100644 |
5515 |
+--- a/drivers/gpu/drm/radeon/evergreen.c |
5516 |
++++ b/drivers/gpu/drm/radeon/evergreen.c |
5517 |
+@@ -1797,7 +1797,7 @@ static void evergreen_gpu_init(struct radeon_device *rdev) |
5518 |
+ rdev->config.evergreen.sx_max_export_size = 256; |
5519 |
+ rdev->config.evergreen.sx_max_export_pos_size = 64; |
5520 |
+ rdev->config.evergreen.sx_max_export_smx_size = 192; |
5521 |
+- rdev->config.evergreen.max_hw_contexts = 8; |
5522 |
++ rdev->config.evergreen.max_hw_contexts = 4; |
5523 |
+ rdev->config.evergreen.sq_num_cf_insts = 2; |
5524 |
+ |
5525 |
+ rdev->config.evergreen.sc_prim_fifo_size = 0x40; |
5526 |
+diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c |
5527 |
+index 30cac58..0b86d47 100644 |
5528 |
+--- a/drivers/hwmon/applesmc.c |
5529 |
++++ b/drivers/hwmon/applesmc.c |
5530 |
+@@ -212,6 +212,7 @@ static int send_argument(const char *key) |
5531 |
+ |
5532 |
+ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len) |
5533 |
+ { |
5534 |
++ u8 status, data = 0; |
5535 |
+ int i; |
5536 |
+ |
5537 |
+ if (send_command(cmd) || send_argument(key)) { |
5538 |
+@@ -219,6 +220,7 @@ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len) |
5539 |
+ return -EIO; |
5540 |
+ } |
5541 |
+ |
5542 |
++ /* This has no effect on newer (2012) SMCs */ |
5543 |
+ outb(len, APPLESMC_DATA_PORT); |
5544 |
+ |
5545 |
+ for (i = 0; i < len; i++) { |
5546 |
+@@ -229,6 +231,17 @@ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len) |
5547 |
+ buffer[i] = inb(APPLESMC_DATA_PORT); |
5548 |
+ } |
5549 |
+ |
5550 |
++ /* Read the data port until bit0 is cleared */ |
5551 |
++ for (i = 0; i < 16; i++) { |
5552 |
++ udelay(APPLESMC_MIN_WAIT); |
5553 |
++ status = inb(APPLESMC_CMD_PORT); |
5554 |
++ if (!(status & 0x01)) |
5555 |
++ break; |
5556 |
++ data = inb(APPLESMC_DATA_PORT); |
5557 |
++ } |
5558 |
++ if (i) |
5559 |
++ pr_warn("flushed %d bytes, last value is: %d\n", i, data); |
5560 |
++ |
5561 |
+ return 0; |
5562 |
+ } |
5563 |
+ |
5564 |
+diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c |
5565 |
+index 3ac4156..75c182b 100644 |
5566 |
+--- a/drivers/md/dm-snap-persistent.c |
5567 |
++++ b/drivers/md/dm-snap-persistent.c |
5568 |
+@@ -269,6 +269,14 @@ static chunk_t area_location(struct pstore *ps, chunk_t area) |
5569 |
+ return NUM_SNAPSHOT_HDR_CHUNKS + ((ps->exceptions_per_area + 1) * area); |
5570 |
+ } |
5571 |
+ |
5572 |
++static void skip_metadata(struct pstore *ps) |
5573 |
++{ |
5574 |
++ uint32_t stride = ps->exceptions_per_area + 1; |
5575 |
++ chunk_t next_free = ps->next_free; |
5576 |
++ if (sector_div(next_free, stride) == NUM_SNAPSHOT_HDR_CHUNKS) |
5577 |
++ ps->next_free++; |
5578 |
++} |
5579 |
++ |
5580 |
+ /* |
5581 |
+ * Read or write a metadata area. Remembering to skip the first |
5582 |
+ * chunk which holds the header. |
5583 |
+@@ -502,6 +510,8 @@ static int read_exceptions(struct pstore *ps, |
5584 |
+ |
5585 |
+ ps->current_area--; |
5586 |
+ |
5587 |
++ skip_metadata(ps); |
5588 |
++ |
5589 |
+ return 0; |
5590 |
+ } |
5591 |
+ |
5592 |
+@@ -616,8 +626,6 @@ static int persistent_prepare_exception(struct dm_exception_store *store, |
5593 |
+ struct dm_exception *e) |
5594 |
+ { |
5595 |
+ struct pstore *ps = get_info(store); |
5596 |
+- uint32_t stride; |
5597 |
+- chunk_t next_free; |
5598 |
+ sector_t size = get_dev_size(dm_snap_cow(store->snap)->bdev); |
5599 |
+ |
5600 |
+ /* Is there enough room ? */ |
5601 |
+@@ -630,10 +638,8 @@ static int persistent_prepare_exception(struct dm_exception_store *store, |
5602 |
+ * Move onto the next free pending, making sure to take |
5603 |
+ * into account the location of the metadata chunks. |
5604 |
+ */ |
5605 |
+- stride = (ps->exceptions_per_area + 1); |
5606 |
+- next_free = ++ps->next_free; |
5607 |
+- if (sector_div(next_free, stride) == 1) |
5608 |
+- ps->next_free++; |
5609 |
++ ps->next_free++; |
5610 |
++ skip_metadata(ps); |
5611 |
+ |
5612 |
+ atomic_inc(&ps->pending_count); |
5613 |
+ return 0; |
5614 |
+diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c |
5615 |
+index a319057..de87f82 100644 |
5616 |
+--- a/drivers/net/can/dev.c |
5617 |
++++ b/drivers/net/can/dev.c |
5618 |
+@@ -658,14 +658,14 @@ static size_t can_get_size(const struct net_device *dev) |
5619 |
+ size_t size; |
5620 |
+ |
5621 |
+ size = nla_total_size(sizeof(u32)); /* IFLA_CAN_STATE */ |
5622 |
+- size += sizeof(struct can_ctrlmode); /* IFLA_CAN_CTRLMODE */ |
5623 |
++ size += nla_total_size(sizeof(struct can_ctrlmode)); /* IFLA_CAN_CTRLMODE */ |
5624 |
+ size += nla_total_size(sizeof(u32)); /* IFLA_CAN_RESTART_MS */ |
5625 |
+- size += sizeof(struct can_bittiming); /* IFLA_CAN_BITTIMING */ |
5626 |
+- size += sizeof(struct can_clock); /* IFLA_CAN_CLOCK */ |
5627 |
++ size += nla_total_size(sizeof(struct can_bittiming)); /* IFLA_CAN_BITTIMING */ |
5628 |
++ size += nla_total_size(sizeof(struct can_clock)); /* IFLA_CAN_CLOCK */ |
5629 |
+ if (priv->do_get_berr_counter) /* IFLA_CAN_BERR_COUNTER */ |
5630 |
+- size += sizeof(struct can_berr_counter); |
5631 |
++ size += nla_total_size(sizeof(struct can_berr_counter)); |
5632 |
+ if (priv->bittiming_const) /* IFLA_CAN_BITTIMING_CONST */ |
5633 |
+- size += sizeof(struct can_bittiming_const); |
5634 |
++ size += nla_total_size(sizeof(struct can_bittiming_const)); |
5635 |
+ |
5636 |
+ return size; |
5637 |
+ } |
5638 |
+diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |
5639 |
+index 4c50ac0..bbb6692 100644 |
5640 |
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |
5641 |
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |
5642 |
+@@ -516,6 +516,7 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, |
5643 |
+ if (!bnx2x_fill_frag_skb(bp, fp, queue, skb, cqe, cqe_idx)) { |
5644 |
+ if (tpa_info->parsing_flags & PARSING_FLAGS_VLAN) |
5645 |
+ __vlan_hwaccel_put_tag(skb, tpa_info->vlan_tag); |
5646 |
++ skb_record_rx_queue(skb, fp->index); |
5647 |
+ napi_gro_receive(&fp->napi, skb); |
5648 |
+ } else { |
5649 |
+ DP(NETIF_MSG_RX_STATUS, "Failed to allocate new pages" |
5650 |
+diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c |
5651 |
+index 4236b82..4aa830f 100644 |
5652 |
+--- a/drivers/net/ethernet/realtek/8139cp.c |
5653 |
++++ b/drivers/net/ethernet/realtek/8139cp.c |
5654 |
+@@ -1234,6 +1234,7 @@ static void cp_tx_timeout(struct net_device *dev) |
5655 |
+ cp_clean_rings(cp); |
5656 |
+ rc = cp_init_rings(cp); |
5657 |
+ cp_start_hw(cp); |
5658 |
++ cp_enable_irq(cp); |
5659 |
+ |
5660 |
+ netif_wake_queue(dev); |
5661 |
+ |
5662 |
+diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c |
5663 |
+index fd8115e..10668eb 100644 |
5664 |
+--- a/drivers/net/ethernet/ti/davinci_emac.c |
5665 |
++++ b/drivers/net/ethernet/ti/davinci_emac.c |
5666 |
+@@ -873,8 +873,7 @@ static void emac_dev_mcast_set(struct net_device *ndev) |
5667 |
+ netdev_mc_count(ndev) > EMAC_DEF_MAX_MULTICAST_ADDRESSES) { |
5668 |
+ mbp_enable = (mbp_enable | EMAC_MBP_RXMCAST); |
5669 |
+ emac_add_mcast(priv, EMAC_ALL_MULTI_SET, NULL); |
5670 |
+- } |
5671 |
+- if (!netdev_mc_empty(ndev)) { |
5672 |
++ } else if (!netdev_mc_empty(ndev)) { |
5673 |
+ struct netdev_hw_addr *ha; |
5674 |
+ |
5675 |
+ mbp_enable = (mbp_enable | EMAC_MBP_RXMCAST); |
5676 |
+diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c |
5677 |
+index ebb9f24..7a4c491 100644 |
5678 |
+--- a/drivers/net/wan/farsync.c |
5679 |
++++ b/drivers/net/wan/farsync.c |
5680 |
+@@ -1972,6 +1972,7 @@ fst_get_iface(struct fst_card_info *card, struct fst_port_info *port, |
5681 |
+ } |
5682 |
+ |
5683 |
+ i = port->index; |
5684 |
++ memset(&sync, 0, sizeof(sync)); |
5685 |
+ sync.clock_rate = FST_RDL(card, portConfig[i].lineSpeed); |
5686 |
+ /* Lucky card and linux use same encoding here */ |
5687 |
+ sync.clock_type = FST_RDB(card, portConfig[i].internalClock) == |
5688 |
+diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c |
5689 |
+index 44b7071..c643d77 100644 |
5690 |
+--- a/drivers/net/wan/wanxl.c |
5691 |
++++ b/drivers/net/wan/wanxl.c |
5692 |
+@@ -355,6 +355,7 @@ static int wanxl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) |
5693 |
+ ifr->ifr_settings.size = size; /* data size wanted */ |
5694 |
+ return -ENOBUFS; |
5695 |
+ } |
5696 |
++ memset(&line, 0, sizeof(line)); |
5697 |
+ line.clock_type = get_status(port)->clocking; |
5698 |
+ line.clock_rate = 0; |
5699 |
+ line.loopback = 0; |
5700 |
+diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c |
5701 |
+index a97a52a..408477d 100644 |
5702 |
+--- a/drivers/net/wireless/iwlwifi/iwl-2000.c |
5703 |
++++ b/drivers/net/wireless/iwlwifi/iwl-2000.c |
5704 |
+@@ -270,11 +270,6 @@ struct iwl_cfg iwl2000_2bgn_cfg = { |
5705 |
+ .ht_params = &iwl2000_ht_params, |
5706 |
+ }; |
5707 |
+ |
5708 |
+-struct iwl_cfg iwl2000_2bg_cfg = { |
5709 |
+- .name = "2000 Series 2x2 BG", |
5710 |
+- IWL_DEVICE_2000, |
5711 |
+-}; |
5712 |
+- |
5713 |
+ struct iwl_cfg iwl2000_2bgn_d_cfg = { |
5714 |
+ .name = "2000D Series 2x2 BGN", |
5715 |
+ IWL_DEVICE_2000, |
5716 |
+@@ -304,11 +299,6 @@ struct iwl_cfg iwl2030_2bgn_cfg = { |
5717 |
+ .ht_params = &iwl2000_ht_params, |
5718 |
+ }; |
5719 |
+ |
5720 |
+-struct iwl_cfg iwl2030_2bg_cfg = { |
5721 |
+- .name = "2000 Series 2x2 BG/BT", |
5722 |
+- IWL_DEVICE_2030, |
5723 |
+-}; |
5724 |
+- |
5725 |
+ #define IWL_DEVICE_105 \ |
5726 |
+ .fw_name_pre = IWL105_FW_PRE, \ |
5727 |
+ .ucode_api_max = IWL105_UCODE_API_MAX, \ |
5728 |
+@@ -326,11 +316,6 @@ struct iwl_cfg iwl2030_2bg_cfg = { |
5729 |
+ .rx_with_siso_diversity = true, \ |
5730 |
+ .iq_invert = true \ |
5731 |
+ |
5732 |
+-struct iwl_cfg iwl105_bg_cfg = { |
5733 |
+- .name = "105 Series 1x1 BG", |
5734 |
+- IWL_DEVICE_105, |
5735 |
+-}; |
5736 |
+- |
5737 |
+ struct iwl_cfg iwl105_bgn_cfg = { |
5738 |
+ .name = "105 Series 1x1 BGN", |
5739 |
+ IWL_DEVICE_105, |
5740 |
+@@ -361,11 +346,6 @@ struct iwl_cfg iwl105_bgn_d_cfg = { |
5741 |
+ .rx_with_siso_diversity = true, \ |
5742 |
+ .iq_invert = true \ |
5743 |
+ |
5744 |
+-struct iwl_cfg iwl135_bg_cfg = { |
5745 |
+- .name = "135 Series 1x1 BG/BT", |
5746 |
+- IWL_DEVICE_135, |
5747 |
+-}; |
5748 |
+- |
5749 |
+ struct iwl_cfg iwl135_bgn_cfg = { |
5750 |
+ .name = "135 Series 1x1 BGN/BT", |
5751 |
+ IWL_DEVICE_135, |
5752 |
+diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c |
5753 |
+index 4ac4ef0..e1a43c4 100644 |
5754 |
+--- a/drivers/net/wireless/iwlwifi/iwl-6000.c |
5755 |
++++ b/drivers/net/wireless/iwlwifi/iwl-6000.c |
5756 |
+@@ -411,6 +411,17 @@ struct iwl_cfg iwl6005_2agn_d_cfg = { |
5757 |
+ .ht_params = &iwl6000_ht_params, |
5758 |
+ }; |
5759 |
+ |
5760 |
++struct iwl_cfg iwl6005_2agn_mow1_cfg = { |
5761 |
++ .name = "Intel(R) Centrino(R) Advanced-N 6206 AGN", |
5762 |
++ IWL_DEVICE_6005, |
5763 |
++ .ht_params = &iwl6000_ht_params, |
5764 |
++}; |
5765 |
++struct iwl_cfg iwl6005_2agn_mow2_cfg = { |
5766 |
++ .name = "Intel(R) Centrino(R) Advanced-N 6207 AGN", |
5767 |
++ IWL_DEVICE_6005, |
5768 |
++ .ht_params = &iwl6000_ht_params, |
5769 |
++}; |
5770 |
++ |
5771 |
+ #define IWL_DEVICE_6030 \ |
5772 |
+ .fw_name_pre = IWL6030_FW_PRE, \ |
5773 |
+ .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ |
5774 |
+@@ -469,14 +480,10 @@ struct iwl_cfg iwl6035_2agn_cfg = { |
5775 |
+ .ht_params = &iwl6000_ht_params, |
5776 |
+ }; |
5777 |
+ |
5778 |
+-struct iwl_cfg iwl6035_2abg_cfg = { |
5779 |
+- .name = "6035 Series 2x2 ABG/BT", |
5780 |
+- IWL_DEVICE_6030, |
5781 |
+-}; |
5782 |
+- |
5783 |
+-struct iwl_cfg iwl6035_2bg_cfg = { |
5784 |
+- .name = "6035 Series 2x2 BG/BT", |
5785 |
+- IWL_DEVICE_6030, |
5786 |
++struct iwl_cfg iwl6035_2agn_sff_cfg = { |
5787 |
++ .name = "Intel(R) Centrino(R) Ultimate-N 6235 AGN", |
5788 |
++ IWL_DEVICE_6035, |
5789 |
++ .ht_params = &iwl6000_ht_params, |
5790 |
+ }; |
5791 |
+ |
5792 |
+ struct iwl_cfg iwl1030_bgn_cfg = { |
5793 |
+diff --git a/drivers/net/wireless/iwlwifi/iwl-cfg.h b/drivers/net/wireless/iwlwifi/iwl-cfg.h |
5794 |
+index 2a2dc45..e786497 100644 |
5795 |
+--- a/drivers/net/wireless/iwlwifi/iwl-cfg.h |
5796 |
++++ b/drivers/net/wireless/iwlwifi/iwl-cfg.h |
5797 |
+@@ -80,6 +80,8 @@ extern struct iwl_cfg iwl6005_2abg_cfg; |
5798 |
+ extern struct iwl_cfg iwl6005_2bg_cfg; |
5799 |
+ extern struct iwl_cfg iwl6005_2agn_sff_cfg; |
5800 |
+ extern struct iwl_cfg iwl6005_2agn_d_cfg; |
5801 |
++extern struct iwl_cfg iwl6005_2agn_mow1_cfg; |
5802 |
++extern struct iwl_cfg iwl6005_2agn_mow2_cfg; |
5803 |
+ extern struct iwl_cfg iwl1030_bgn_cfg; |
5804 |
+ extern struct iwl_cfg iwl1030_bg_cfg; |
5805 |
+ extern struct iwl_cfg iwl6030_2agn_cfg; |
5806 |
+@@ -101,17 +103,12 @@ extern struct iwl_cfg iwl100_bg_cfg; |
5807 |
+ extern struct iwl_cfg iwl130_bgn_cfg; |
5808 |
+ extern struct iwl_cfg iwl130_bg_cfg; |
5809 |
+ extern struct iwl_cfg iwl2000_2bgn_cfg; |
5810 |
+-extern struct iwl_cfg iwl2000_2bg_cfg; |
5811 |
+ extern struct iwl_cfg iwl2000_2bgn_d_cfg; |
5812 |
+ extern struct iwl_cfg iwl2030_2bgn_cfg; |
5813 |
+-extern struct iwl_cfg iwl2030_2bg_cfg; |
5814 |
+ extern struct iwl_cfg iwl6035_2agn_cfg; |
5815 |
+-extern struct iwl_cfg iwl6035_2abg_cfg; |
5816 |
+-extern struct iwl_cfg iwl6035_2bg_cfg; |
5817 |
+-extern struct iwl_cfg iwl105_bg_cfg; |
5818 |
++extern struct iwl_cfg iwl6035_2agn_sff_cfg; |
5819 |
+ extern struct iwl_cfg iwl105_bgn_cfg; |
5820 |
+ extern struct iwl_cfg iwl105_bgn_d_cfg; |
5821 |
+-extern struct iwl_cfg iwl135_bg_cfg; |
5822 |
+ extern struct iwl_cfg iwl135_bgn_cfg; |
5823 |
+ |
5824 |
+ #endif /* __iwl_pci_h__ */ |
5825 |
+diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c |
5826 |
+index 346dc9b..62a0f81 100644 |
5827 |
+--- a/drivers/net/wireless/iwlwifi/iwl-pci.c |
5828 |
++++ b/drivers/net/wireless/iwlwifi/iwl-pci.c |
5829 |
+@@ -236,13 +236,16 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { |
5830 |
+ |
5831 |
+ /* 6x00 Series */ |
5832 |
+ {IWL_PCI_DEVICE(0x422B, 0x1101, iwl6000_3agn_cfg)}, |
5833 |
++ {IWL_PCI_DEVICE(0x422B, 0x1108, iwl6000_3agn_cfg)}, |
5834 |
+ {IWL_PCI_DEVICE(0x422B, 0x1121, iwl6000_3agn_cfg)}, |
5835 |
++ {IWL_PCI_DEVICE(0x422B, 0x1128, iwl6000_3agn_cfg)}, |
5836 |
+ {IWL_PCI_DEVICE(0x422C, 0x1301, iwl6000i_2agn_cfg)}, |
5837 |
+ {IWL_PCI_DEVICE(0x422C, 0x1306, iwl6000i_2abg_cfg)}, |
5838 |
+ {IWL_PCI_DEVICE(0x422C, 0x1307, iwl6000i_2bg_cfg)}, |
5839 |
+ {IWL_PCI_DEVICE(0x422C, 0x1321, iwl6000i_2agn_cfg)}, |
5840 |
+ {IWL_PCI_DEVICE(0x422C, 0x1326, iwl6000i_2abg_cfg)}, |
5841 |
+ {IWL_PCI_DEVICE(0x4238, 0x1111, iwl6000_3agn_cfg)}, |
5842 |
++ {IWL_PCI_DEVICE(0x4238, 0x1118, iwl6000_3agn_cfg)}, |
5843 |
+ {IWL_PCI_DEVICE(0x4239, 0x1311, iwl6000i_2agn_cfg)}, |
5844 |
+ {IWL_PCI_DEVICE(0x4239, 0x1316, iwl6000i_2abg_cfg)}, |
5845 |
+ |
5846 |
+@@ -250,13 +253,19 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { |
5847 |
+ {IWL_PCI_DEVICE(0x0082, 0x1301, iwl6005_2agn_cfg)}, |
5848 |
+ {IWL_PCI_DEVICE(0x0082, 0x1306, iwl6005_2abg_cfg)}, |
5849 |
+ {IWL_PCI_DEVICE(0x0082, 0x1307, iwl6005_2bg_cfg)}, |
5850 |
++ {IWL_PCI_DEVICE(0x0082, 0x1308, iwl6005_2agn_cfg)}, |
5851 |
+ {IWL_PCI_DEVICE(0x0082, 0x1321, iwl6005_2agn_cfg)}, |
5852 |
+ {IWL_PCI_DEVICE(0x0082, 0x1326, iwl6005_2abg_cfg)}, |
5853 |
++ {IWL_PCI_DEVICE(0x0082, 0x1328, iwl6005_2agn_cfg)}, |
5854 |
+ {IWL_PCI_DEVICE(0x0085, 0x1311, iwl6005_2agn_cfg)}, |
5855 |
++ {IWL_PCI_DEVICE(0x0085, 0x1318, iwl6005_2agn_cfg)}, |
5856 |
+ {IWL_PCI_DEVICE(0x0085, 0x1316, iwl6005_2abg_cfg)}, |
5857 |
+ {IWL_PCI_DEVICE(0x0082, 0xC020, iwl6005_2agn_sff_cfg)}, |
5858 |
+ {IWL_PCI_DEVICE(0x0085, 0xC220, iwl6005_2agn_sff_cfg)}, |
5859 |
+- {IWL_PCI_DEVICE(0x0082, 0x1341, iwl6005_2agn_d_cfg)}, |
5860 |
++ {IWL_PCI_DEVICE(0x0085, 0xC228, iwl6005_2agn_sff_cfg)}, |
5861 |
++ {IWL_PCI_DEVICE(0x0082, 0x4820, iwl6005_2agn_d_cfg)}, |
5862 |
++ {IWL_PCI_DEVICE(0x0082, 0x1304, iwl6005_2agn_mow1_cfg)},/* low 5GHz active */ |
5863 |
++ {IWL_PCI_DEVICE(0x0082, 0x1305, iwl6005_2agn_mow2_cfg)},/* high 5GHz active */ |
5864 |
+ |
5865 |
+ /* 6x30 Series */ |
5866 |
+ {IWL_PCI_DEVICE(0x008A, 0x5305, iwl1030_bgn_cfg)}, |
5867 |
+@@ -326,46 +335,33 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { |
5868 |
+ {IWL_PCI_DEVICE(0x0890, 0x4022, iwl2000_2bgn_cfg)}, |
5869 |
+ {IWL_PCI_DEVICE(0x0891, 0x4222, iwl2000_2bgn_cfg)}, |
5870 |
+ {IWL_PCI_DEVICE(0x0890, 0x4422, iwl2000_2bgn_cfg)}, |
5871 |
+- {IWL_PCI_DEVICE(0x0890, 0x4026, iwl2000_2bg_cfg)}, |
5872 |
+- {IWL_PCI_DEVICE(0x0891, 0x4226, iwl2000_2bg_cfg)}, |
5873 |
+- {IWL_PCI_DEVICE(0x0890, 0x4426, iwl2000_2bg_cfg)}, |
5874 |
+ {IWL_PCI_DEVICE(0x0890, 0x4822, iwl2000_2bgn_d_cfg)}, |
5875 |
+ |
5876 |
+ /* 2x30 Series */ |
5877 |
+ {IWL_PCI_DEVICE(0x0887, 0x4062, iwl2030_2bgn_cfg)}, |
5878 |
+ {IWL_PCI_DEVICE(0x0888, 0x4262, iwl2030_2bgn_cfg)}, |
5879 |
+ {IWL_PCI_DEVICE(0x0887, 0x4462, iwl2030_2bgn_cfg)}, |
5880 |
+- {IWL_PCI_DEVICE(0x0887, 0x4066, iwl2030_2bg_cfg)}, |
5881 |
+- {IWL_PCI_DEVICE(0x0888, 0x4266, iwl2030_2bg_cfg)}, |
5882 |
+- {IWL_PCI_DEVICE(0x0887, 0x4466, iwl2030_2bg_cfg)}, |
5883 |
+ |
5884 |
+ /* 6x35 Series */ |
5885 |
+ {IWL_PCI_DEVICE(0x088E, 0x4060, iwl6035_2agn_cfg)}, |
5886 |
++ {IWL_PCI_DEVICE(0x088E, 0x406A, iwl6035_2agn_sff_cfg)}, |
5887 |
+ {IWL_PCI_DEVICE(0x088F, 0x4260, iwl6035_2agn_cfg)}, |
5888 |
++ {IWL_PCI_DEVICE(0x088F, 0x426A, iwl6035_2agn_sff_cfg)}, |
5889 |
+ {IWL_PCI_DEVICE(0x088E, 0x4460, iwl6035_2agn_cfg)}, |
5890 |
+- {IWL_PCI_DEVICE(0x088E, 0x4064, iwl6035_2abg_cfg)}, |
5891 |
+- {IWL_PCI_DEVICE(0x088F, 0x4264, iwl6035_2abg_cfg)}, |
5892 |
+- {IWL_PCI_DEVICE(0x088E, 0x4464, iwl6035_2abg_cfg)}, |
5893 |
+- {IWL_PCI_DEVICE(0x088E, 0x4066, iwl6035_2bg_cfg)}, |
5894 |
+- {IWL_PCI_DEVICE(0x088F, 0x4266, iwl6035_2bg_cfg)}, |
5895 |
+- {IWL_PCI_DEVICE(0x088E, 0x4466, iwl6035_2bg_cfg)}, |
5896 |
++ {IWL_PCI_DEVICE(0x088E, 0x446A, iwl6035_2agn_sff_cfg)}, |
5897 |
++ {IWL_PCI_DEVICE(0x088E, 0x4860, iwl6035_2agn_cfg)}, |
5898 |
++ {IWL_PCI_DEVICE(0x088F, 0x5260, iwl6035_2agn_cfg)}, |
5899 |
+ |
5900 |
+ /* 105 Series */ |
5901 |
+ {IWL_PCI_DEVICE(0x0894, 0x0022, iwl105_bgn_cfg)}, |
5902 |
+ {IWL_PCI_DEVICE(0x0895, 0x0222, iwl105_bgn_cfg)}, |
5903 |
+ {IWL_PCI_DEVICE(0x0894, 0x0422, iwl105_bgn_cfg)}, |
5904 |
+- {IWL_PCI_DEVICE(0x0894, 0x0026, iwl105_bg_cfg)}, |
5905 |
+- {IWL_PCI_DEVICE(0x0895, 0x0226, iwl105_bg_cfg)}, |
5906 |
+- {IWL_PCI_DEVICE(0x0894, 0x0426, iwl105_bg_cfg)}, |
5907 |
+ {IWL_PCI_DEVICE(0x0894, 0x0822, iwl105_bgn_d_cfg)}, |
5908 |
+ |
5909 |
+ /* 135 Series */ |
5910 |
+ {IWL_PCI_DEVICE(0x0892, 0x0062, iwl135_bgn_cfg)}, |
5911 |
+ {IWL_PCI_DEVICE(0x0893, 0x0262, iwl135_bgn_cfg)}, |
5912 |
+ {IWL_PCI_DEVICE(0x0892, 0x0462, iwl135_bgn_cfg)}, |
5913 |
+- {IWL_PCI_DEVICE(0x0892, 0x0066, iwl135_bg_cfg)}, |
5914 |
+- {IWL_PCI_DEVICE(0x0893, 0x0266, iwl135_bg_cfg)}, |
5915 |
+- {IWL_PCI_DEVICE(0x0892, 0x0466, iwl135_bg_cfg)}, |
5916 |
+ |
5917 |
+ {0} |
5918 |
+ }; |
5919 |
+diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c |
5920 |
+index bc33b14..a7e1a2c 100644 |
5921 |
+--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c |
5922 |
++++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c |
5923 |
+@@ -343,7 +343,8 @@ bool rtl92cu_rx_query_desc(struct ieee80211_hw *hw, |
5924 |
+ (bool)GET_RX_DESC_PAGGR(pdesc)); |
5925 |
+ rx_status->mactime = GET_RX_DESC_TSFL(pdesc); |
5926 |
+ if (phystatus) { |
5927 |
+- p_drvinfo = (struct rx_fwinfo_92c *)(pdesc + RTL_RX_DESC_SIZE); |
5928 |
++ p_drvinfo = (struct rx_fwinfo_92c *)(skb->data + |
5929 |
++ stats->rx_bufshift); |
5930 |
+ rtl92c_translate_rx_signal_stuff(hw, skb, stats, pdesc, |
5931 |
+ p_drvinfo); |
5932 |
+ } |
5933 |
+diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h |
5934 |
+index 9d7f172..093bf0a 100644 |
5935 |
+--- a/drivers/net/xen-netback/common.h |
5936 |
++++ b/drivers/net/xen-netback/common.h |
5937 |
+@@ -88,6 +88,7 @@ struct xenvif { |
5938 |
+ unsigned long credit_usec; |
5939 |
+ unsigned long remaining_credit; |
5940 |
+ struct timer_list credit_timeout; |
5941 |
++ u64 credit_window_start; |
5942 |
+ |
5943 |
+ /* Statistics */ |
5944 |
+ unsigned long rx_gso_checksum_fixup; |
5945 |
+diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c |
5946 |
+index 8eaf0e2..2cb9c92 100644 |
5947 |
+--- a/drivers/net/xen-netback/interface.c |
5948 |
++++ b/drivers/net/xen-netback/interface.c |
5949 |
+@@ -272,8 +272,7 @@ struct xenvif *xenvif_alloc(struct device *parent, domid_t domid, |
5950 |
+ vif->credit_bytes = vif->remaining_credit = ~0UL; |
5951 |
+ vif->credit_usec = 0UL; |
5952 |
+ init_timer(&vif->credit_timeout); |
5953 |
+- /* Initialize 'expires' now: it's used to track the credit window. */ |
5954 |
+- vif->credit_timeout.expires = jiffies; |
5955 |
++ vif->credit_window_start = get_jiffies_64(); |
5956 |
+ |
5957 |
+ dev->netdev_ops = &xenvif_netdev_ops; |
5958 |
+ dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO; |
5959 |
+diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c |
5960 |
+index fd2b92d..9a4626c 100644 |
5961 |
+--- a/drivers/net/xen-netback/netback.c |
5962 |
++++ b/drivers/net/xen-netback/netback.c |
5963 |
+@@ -1365,9 +1365,8 @@ out: |
5964 |
+ |
5965 |
+ static bool tx_credit_exceeded(struct xenvif *vif, unsigned size) |
5966 |
+ { |
5967 |
+- unsigned long now = jiffies; |
5968 |
+- unsigned long next_credit = |
5969 |
+- vif->credit_timeout.expires + |
5970 |
++ u64 now = get_jiffies_64(); |
5971 |
++ u64 next_credit = vif->credit_window_start + |
5972 |
+ msecs_to_jiffies(vif->credit_usec / 1000); |
5973 |
+ |
5974 |
+ /* Timer could already be pending in rare cases. */ |
5975 |
+@@ -1375,8 +1374,8 @@ static bool tx_credit_exceeded(struct xenvif *vif, unsigned size) |
5976 |
+ return true; |
5977 |
+ |
5978 |
+ /* Passed the point where we can replenish credit? */ |
5979 |
+- if (time_after_eq(now, next_credit)) { |
5980 |
+- vif->credit_timeout.expires = now; |
5981 |
++ if (time_after_eq64(now, next_credit)) { |
5982 |
++ vif->credit_window_start = now; |
5983 |
+ tx_add_credit(vif); |
5984 |
+ } |
5985 |
+ |
5986 |
+@@ -1388,6 +1387,7 @@ static bool tx_credit_exceeded(struct xenvif *vif, unsigned size) |
5987 |
+ tx_credit_callback; |
5988 |
+ mod_timer(&vif->credit_timeout, |
5989 |
+ next_credit); |
5990 |
++ vif->credit_window_start = next_credit; |
5991 |
+ |
5992 |
+ return true; |
5993 |
+ } |
5994 |
+diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c |
5995 |
+index 8b25f9c..41f08e5 100644 |
5996 |
+--- a/drivers/pci/setup-res.c |
5997 |
++++ b/drivers/pci/setup-res.c |
5998 |
+@@ -188,7 +188,8 @@ static int pci_revert_fw_address(struct resource *res, struct pci_dev *dev, |
5999 |
+ return ret; |
6000 |
+ } |
6001 |
+ |
6002 |
+-static int _pci_assign_resource(struct pci_dev *dev, int resno, int size, resource_size_t min_align) |
6003 |
++static int _pci_assign_resource(struct pci_dev *dev, int resno, |
6004 |
++ resource_size_t size, resource_size_t min_align) |
6005 |
+ { |
6006 |
+ struct resource *res = dev->resource + resno; |
6007 |
+ struct pci_bus *bus; |
6008 |
+diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c |
6009 |
+index 705e13e..2e658d2 100644 |
6010 |
+--- a/drivers/scsi/aacraid/linit.c |
6011 |
++++ b/drivers/scsi/aacraid/linit.c |
6012 |
+@@ -771,6 +771,8 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long |
6013 |
+ static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) |
6014 |
+ { |
6015 |
+ struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata; |
6016 |
++ if (!capable(CAP_SYS_RAWIO)) |
6017 |
++ return -EPERM; |
6018 |
+ return aac_compat_do_ioctl(dev, cmd, (unsigned long)arg); |
6019 |
+ } |
6020 |
+ |
6021 |
+diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c |
6022 |
+index 2fa658e..391b768 100644 |
6023 |
+--- a/drivers/staging/bcm/Bcmchar.c |
6024 |
++++ b/drivers/staging/bcm/Bcmchar.c |
6025 |
+@@ -1932,6 +1932,7 @@ cntrlEnd: |
6026 |
+ |
6027 |
+ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Called IOCTL_BCM_GET_DEVICE_DRIVER_INFO\n"); |
6028 |
+ |
6029 |
++ memset(&DevInfo, 0, sizeof(DevInfo)); |
6030 |
+ DevInfo.MaxRDMBufferSize = BUFFER_4K; |
6031 |
+ DevInfo.u32DSDStartOffset = EEPROM_CALPARAM_START; |
6032 |
+ DevInfo.u32RxAlignmentCorrection = 0; |
6033 |
+diff --git a/drivers/staging/wlags49_h2/wl_priv.c b/drivers/staging/wlags49_h2/wl_priv.c |
6034 |
+index 260d4f0..b3d2e17 100644 |
6035 |
+--- a/drivers/staging/wlags49_h2/wl_priv.c |
6036 |
++++ b/drivers/staging/wlags49_h2/wl_priv.c |
6037 |
+@@ -570,6 +570,7 @@ int wvlan_uil_put_info( struct uilreq *urq, struct wl_private *lp ) |
6038 |
+ ltv_t *pLtv; |
6039 |
+ bool_t ltvAllocated = FALSE; |
6040 |
+ ENCSTRCT sEncryption; |
6041 |
++ size_t len; |
6042 |
+ |
6043 |
+ #ifdef USE_WDS |
6044 |
+ hcf_16 hcfPort = HCF_PORT_0; |
6045 |
+@@ -686,7 +687,8 @@ int wvlan_uil_put_info( struct uilreq *urq, struct wl_private *lp ) |
6046 |
+ break; |
6047 |
+ case CFG_CNF_OWN_NAME: |
6048 |
+ memset( lp->StationName, 0, sizeof( lp->StationName )); |
6049 |
+- memcpy( (void *)lp->StationName, (void *)&pLtv->u.u8[2], (size_t)pLtv->u.u16[0]); |
6050 |
++ len = min_t(size_t, pLtv->u.u16[0], sizeof(lp->StationName)); |
6051 |
++ strlcpy(lp->StationName, &pLtv->u.u8[2], len); |
6052 |
+ pLtv->u.u16[0] = CNV_INT_TO_LITTLE( pLtv->u.u16[0] ); |
6053 |
+ break; |
6054 |
+ case CFG_CNF_LOAD_BALANCING: |
6055 |
+@@ -1800,6 +1802,7 @@ int wvlan_set_station_nickname(struct net_device *dev, |
6056 |
+ { |
6057 |
+ struct wl_private *lp = wl_priv(dev); |
6058 |
+ unsigned long flags; |
6059 |
++ size_t len; |
6060 |
+ int ret = 0; |
6061 |
+ /*------------------------------------------------------------------------*/ |
6062 |
+ |
6063 |
+@@ -1810,8 +1813,8 @@ int wvlan_set_station_nickname(struct net_device *dev, |
6064 |
+ wl_lock(lp, &flags); |
6065 |
+ |
6066 |
+ memset( lp->StationName, 0, sizeof( lp->StationName )); |
6067 |
+- |
6068 |
+- memcpy( lp->StationName, extra, wrqu->data.length); |
6069 |
++ len = min_t(size_t, wrqu->data.length, sizeof(lp->StationName)); |
6070 |
++ strlcpy(lp->StationName, extra, len); |
6071 |
+ |
6072 |
+ /* Commit the adapter parameters */ |
6073 |
+ wl_apply( lp ); |
6074 |
+diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c |
6075 |
+index d197b3e..e1a4994 100644 |
6076 |
+--- a/drivers/staging/zram/zram_drv.c |
6077 |
++++ b/drivers/staging/zram/zram_drv.c |
6078 |
+@@ -553,7 +553,7 @@ static inline int valid_io_request(struct zram *zram, struct bio *bio) |
6079 |
+ end = start + (bio->bi_size >> SECTOR_SHIFT); |
6080 |
+ bound = zram->disksize >> SECTOR_SHIFT; |
6081 |
+ /* out of range range */ |
6082 |
+- if (unlikely(start >= bound || end >= bound || start > end)) |
6083 |
++ if (unlikely(start >= bound || end > bound || start > end)) |
6084 |
+ return 0; |
6085 |
+ |
6086 |
+ /* I/O request is valid */ |
6087 |
+diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c |
6088 |
+index 5c12137..e813227 100644 |
6089 |
+--- a/drivers/target/target_core_pscsi.c |
6090 |
++++ b/drivers/target/target_core_pscsi.c |
6091 |
+@@ -129,10 +129,10 @@ static int pscsi_pmode_enable_hba(struct se_hba *hba, unsigned long mode_flag) |
6092 |
+ * pSCSI Host ID and enable for phba mode |
6093 |
+ */ |
6094 |
+ sh = scsi_host_lookup(phv->phv_host_id); |
6095 |
+- if (IS_ERR(sh)) { |
6096 |
++ if (!sh) { |
6097 |
+ pr_err("pSCSI: Unable to locate SCSI Host for" |
6098 |
+ " phv_host_id: %d\n", phv->phv_host_id); |
6099 |
+- return PTR_ERR(sh); |
6100 |
++ return -EINVAL; |
6101 |
+ } |
6102 |
+ |
6103 |
+ phv->phv_lld_host = sh; |
6104 |
+@@ -564,10 +564,10 @@ static struct se_device *pscsi_create_virtdevice( |
6105 |
+ sh = phv->phv_lld_host; |
6106 |
+ } else { |
6107 |
+ sh = scsi_host_lookup(pdv->pdv_host_id); |
6108 |
+- if (IS_ERR(sh)) { |
6109 |
++ if (!sh) { |
6110 |
+ pr_err("pSCSI: Unable to locate" |
6111 |
+ " pdv_host_id: %d\n", pdv->pdv_host_id); |
6112 |
+- return ERR_CAST(sh); |
6113 |
++ return ERR_PTR(-EINVAL); |
6114 |
+ } |
6115 |
+ } |
6116 |
+ } else { |
6117 |
+diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c |
6118 |
+index a783d53..af57648 100644 |
6119 |
+--- a/drivers/uio/uio.c |
6120 |
++++ b/drivers/uio/uio.c |
6121 |
+@@ -650,16 +650,28 @@ static int uio_mmap_physical(struct vm_area_struct *vma) |
6122 |
+ { |
6123 |
+ struct uio_device *idev = vma->vm_private_data; |
6124 |
+ int mi = uio_find_mem_index(vma); |
6125 |
++ struct uio_mem *mem; |
6126 |
+ if (mi < 0) |
6127 |
+ return -EINVAL; |
6128 |
++ mem = idev->info->mem + mi; |
6129 |
+ |
6130 |
+- vma->vm_flags |= VM_IO | VM_RESERVED; |
6131 |
++ if (vma->vm_end - vma->vm_start > mem->size) |
6132 |
++ return -EINVAL; |
6133 |
+ |
6134 |
+ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
6135 |
+ |
6136 |
++ /* |
6137 |
++ * We cannot use the vm_iomap_memory() helper here, |
6138 |
++ * because vma->vm_pgoff is the map index we looked |
6139 |
++ * up above in uio_find_mem_index(), rather than an |
6140 |
++ * actual page offset into the mmap. |
6141 |
++ * |
6142 |
++ * So we just do the physical mmap without a page |
6143 |
++ * offset. |
6144 |
++ */ |
6145 |
+ return remap_pfn_range(vma, |
6146 |
+ vma->vm_start, |
6147 |
+- idev->info->mem[mi].addr >> PAGE_SHIFT, |
6148 |
++ mem->addr >> PAGE_SHIFT, |
6149 |
+ vma->vm_end - vma->vm_start, |
6150 |
+ vma->vm_page_prot); |
6151 |
+ } |
6152 |
+diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c |
6153 |
+index f52182d..bcde6f6 100644 |
6154 |
+--- a/drivers/usb/core/quirks.c |
6155 |
++++ b/drivers/usb/core/quirks.c |
6156 |
+@@ -97,6 +97,9 @@ static const struct usb_device_id usb_quirk_list[] = { |
6157 |
+ /* Alcor Micro Corp. Hub */ |
6158 |
+ { USB_DEVICE(0x058f, 0x9254), .driver_info = USB_QUIRK_RESET_RESUME }, |
6159 |
+ |
6160 |
++ /* MicroTouch Systems touchscreen */ |
6161 |
++ { USB_DEVICE(0x0596, 0x051e), .driver_info = USB_QUIRK_RESET_RESUME }, |
6162 |
++ |
6163 |
+ /* appletouch */ |
6164 |
+ { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME }, |
6165 |
+ |
6166 |
+@@ -130,6 +133,9 @@ static const struct usb_device_id usb_quirk_list[] = { |
6167 |
+ /* Broadcom BCM92035DGROM BT dongle */ |
6168 |
+ { USB_DEVICE(0x0a5c, 0x2021), .driver_info = USB_QUIRK_RESET_RESUME }, |
6169 |
+ |
6170 |
++ /* MAYA44USB sound device */ |
6171 |
++ { USB_DEVICE(0x0a92, 0x0091), .driver_info = USB_QUIRK_RESET_RESUME }, |
6172 |
++ |
6173 |
+ /* Action Semiconductor flash disk */ |
6174 |
+ { USB_DEVICE(0x10d6, 0x2200), .driver_info = |
6175 |
+ USB_QUIRK_STRING_FETCH_255 }, |
6176 |
+diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c |
6177 |
+index 24107a7..107e6b4 100644 |
6178 |
+--- a/drivers/usb/host/xhci-hub.c |
6179 |
++++ b/drivers/usb/host/xhci-hub.c |
6180 |
+@@ -1007,20 +1007,6 @@ int xhci_bus_suspend(struct usb_hcd *hcd) |
6181 |
+ t1 = xhci_port_state_to_neutral(t1); |
6182 |
+ if (t1 != t2) |
6183 |
+ xhci_writel(xhci, t2, port_array[port_index]); |
6184 |
+- |
6185 |
+- if (hcd->speed != HCD_USB3) { |
6186 |
+- /* enable remote wake up for USB 2.0 */ |
6187 |
+- __le32 __iomem *addr; |
6188 |
+- u32 tmp; |
6189 |
+- |
6190 |
+- /* Add one to the port status register address to get |
6191 |
+- * the port power control register address. |
6192 |
+- */ |
6193 |
+- addr = port_array[port_index] + 1; |
6194 |
+- tmp = xhci_readl(xhci, addr); |
6195 |
+- tmp |= PORT_RWE; |
6196 |
+- xhci_writel(xhci, tmp, addr); |
6197 |
+- } |
6198 |
+ } |
6199 |
+ hcd->state = HC_STATE_SUSPENDED; |
6200 |
+ bus_state->next_statechange = jiffies + msecs_to_jiffies(10); |
6201 |
+@@ -1099,20 +1085,6 @@ int xhci_bus_resume(struct usb_hcd *hcd) |
6202 |
+ xhci_ring_device(xhci, slot_id); |
6203 |
+ } else |
6204 |
+ xhci_writel(xhci, temp, port_array[port_index]); |
6205 |
+- |
6206 |
+- if (hcd->speed != HCD_USB3) { |
6207 |
+- /* disable remote wake up for USB 2.0 */ |
6208 |
+- __le32 __iomem *addr; |
6209 |
+- u32 tmp; |
6210 |
+- |
6211 |
+- /* Add one to the port status register address to get |
6212 |
+- * the port power control register address. |
6213 |
+- */ |
6214 |
+- addr = port_array[port_index] + 1; |
6215 |
+- tmp = xhci_readl(xhci, addr); |
6216 |
+- tmp &= ~PORT_RWE; |
6217 |
+- xhci_writel(xhci, tmp, addr); |
6218 |
+- } |
6219 |
+ } |
6220 |
+ |
6221 |
+ (void) xhci_readl(xhci, &xhci->op_regs->command); |
6222 |
+diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c |
6223 |
+index 61b0668..827f933 100644 |
6224 |
+--- a/drivers/usb/host/xhci-pci.c |
6225 |
++++ b/drivers/usb/host/xhci-pci.c |
6226 |
+@@ -34,6 +34,9 @@ |
6227 |
+ #define PCI_VENDOR_ID_ETRON 0x1b6f |
6228 |
+ #define PCI_DEVICE_ID_ASROCK_P67 0x7023 |
6229 |
+ |
6230 |
++#define PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI 0x8c31 |
6231 |
++#define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI 0x9c31 |
6232 |
++ |
6233 |
+ static const char hcd_name[] = "xhci_hcd"; |
6234 |
+ |
6235 |
+ /* called after powerup, by probe or system-pm "wakeup" */ |
6236 |
+@@ -67,6 +70,14 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) |
6237 |
+ xhci_dbg(xhci, "QUIRK: Fresco Logic xHC needs configure" |
6238 |
+ " endpoint cmd after reset endpoint\n"); |
6239 |
+ } |
6240 |
++ if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK && |
6241 |
++ pdev->revision == 0x4) { |
6242 |
++ xhci->quirks |= XHCI_SLOW_SUSPEND; |
6243 |
++ xhci_dbg(xhci, |
6244 |
++ "QUIRK: Fresco Logic xHC revision %u" |
6245 |
++ "must be suspended extra slowly", |
6246 |
++ pdev->revision); |
6247 |
++ } |
6248 |
+ /* Fresco Logic confirms: all revisions of this chip do not |
6249 |
+ * support MSI, even though some of them claim to in their PCI |
6250 |
+ * capabilities. |
6251 |
+@@ -103,6 +114,15 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) |
6252 |
+ xhci->quirks |= XHCI_SPURIOUS_REBOOT; |
6253 |
+ xhci->quirks |= XHCI_AVOID_BEI; |
6254 |
+ } |
6255 |
++ if (pdev->vendor == PCI_VENDOR_ID_INTEL && |
6256 |
++ (pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI || |
6257 |
++ pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI)) { |
6258 |
++ /* Workaround for occasional spurious wakeups from S5 (or |
6259 |
++ * any other sleep) on Haswell machines with LPT and LPT-LP |
6260 |
++ * with the new Intel BIOS |
6261 |
++ */ |
6262 |
++ xhci->quirks |= XHCI_SPURIOUS_WAKEUP; |
6263 |
++ } |
6264 |
+ if (pdev->vendor == PCI_VENDOR_ID_ETRON && |
6265 |
+ pdev->device == PCI_DEVICE_ID_ASROCK_P67) { |
6266 |
+ xhci->quirks |= XHCI_RESET_ON_RESUME; |
6267 |
+@@ -202,6 +222,11 @@ static void xhci_pci_remove(struct pci_dev *dev) |
6268 |
+ usb_put_hcd(xhci->shared_hcd); |
6269 |
+ } |
6270 |
+ usb_hcd_pci_remove(dev); |
6271 |
++ |
6272 |
++ /* Workaround for spurious wakeups at shutdown with HSW */ |
6273 |
++ if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) |
6274 |
++ pci_set_power_state(dev, PCI_D3hot); |
6275 |
++ |
6276 |
+ kfree(xhci); |
6277 |
+ } |
6278 |
+ |
6279 |
+diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c |
6280 |
+index 629aa74..03c35da 100644 |
6281 |
+--- a/drivers/usb/host/xhci.c |
6282 |
++++ b/drivers/usb/host/xhci.c |
6283 |
+@@ -763,12 +763,19 @@ void xhci_shutdown(struct usb_hcd *hcd) |
6284 |
+ |
6285 |
+ spin_lock_irq(&xhci->lock); |
6286 |
+ xhci_halt(xhci); |
6287 |
++ /* Workaround for spurious wakeups at shutdown with HSW */ |
6288 |
++ if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) |
6289 |
++ xhci_reset(xhci); |
6290 |
+ spin_unlock_irq(&xhci->lock); |
6291 |
+ |
6292 |
+ xhci_cleanup_msix(xhci); |
6293 |
+ |
6294 |
+ xhci_dbg(xhci, "xhci_shutdown completed - status = %x\n", |
6295 |
+ xhci_readl(xhci, &xhci->op_regs->status)); |
6296 |
++ |
6297 |
++ /* Yet another workaround for spurious wakeups at shutdown with HSW */ |
6298 |
++ if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) |
6299 |
++ pci_set_power_state(to_pci_dev(hcd->self.controller), PCI_D3hot); |
6300 |
+ } |
6301 |
+ |
6302 |
+ #ifdef CONFIG_PM |
6303 |
+@@ -869,6 +876,7 @@ static void xhci_clear_command_ring(struct xhci_hcd *xhci) |
6304 |
+ int xhci_suspend(struct xhci_hcd *xhci) |
6305 |
+ { |
6306 |
+ int rc = 0; |
6307 |
++ unsigned int delay = XHCI_MAX_HALT_USEC; |
6308 |
+ struct usb_hcd *hcd = xhci_to_hcd(xhci); |
6309 |
+ u32 command; |
6310 |
+ |
6311 |
+@@ -887,8 +895,12 @@ int xhci_suspend(struct xhci_hcd *xhci) |
6312 |
+ command = xhci_readl(xhci, &xhci->op_regs->command); |
6313 |
+ command &= ~CMD_RUN; |
6314 |
+ xhci_writel(xhci, command, &xhci->op_regs->command); |
6315 |
++ |
6316 |
++ /* Some chips from Fresco Logic need an extraordinary delay */ |
6317 |
++ delay *= (xhci->quirks & XHCI_SLOW_SUSPEND) ? 10 : 1; |
6318 |
++ |
6319 |
+ if (handshake(xhci, &xhci->op_regs->status, |
6320 |
+- STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC)) { |
6321 |
++ STS_HALT, STS_HALT, delay)) { |
6322 |
+ xhci_warn(xhci, "WARN: xHC CMD_RUN timeout\n"); |
6323 |
+ spin_unlock_irq(&xhci->lock); |
6324 |
+ return -ETIMEDOUT; |
6325 |
+diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h |
6326 |
+index 8b4cce45..cf4fd24 100644 |
6327 |
+--- a/drivers/usb/host/xhci.h |
6328 |
++++ b/drivers/usb/host/xhci.h |
6329 |
+@@ -1493,6 +1493,8 @@ struct xhci_hcd { |
6330 |
+ #define XHCI_SPURIOUS_REBOOT (1 << 13) |
6331 |
+ #define XHCI_COMP_MODE_QUIRK (1 << 14) |
6332 |
+ #define XHCI_AVOID_BEI (1 << 15) |
6333 |
++#define XHCI_SLOW_SUSPEND (1 << 17) |
6334 |
++#define XHCI_SPURIOUS_WAKEUP (1 << 18) |
6335 |
+ unsigned int num_active_eps; |
6336 |
+ unsigned int limit_active_eps; |
6337 |
+ /* There are two roothubs to keep track of bus suspend info for */ |
6338 |
+diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
6339 |
+index 536c4ad..d8ace82 100644 |
6340 |
+--- a/drivers/usb/serial/option.c |
6341 |
++++ b/drivers/usb/serial/option.c |
6342 |
+@@ -457,6 +457,10 @@ static void option_instat_callback(struct urb *urb); |
6343 |
+ #define CHANGHONG_VENDOR_ID 0x2077 |
6344 |
+ #define CHANGHONG_PRODUCT_CH690 0x7001 |
6345 |
+ |
6346 |
++/* Inovia */ |
6347 |
++#define INOVIA_VENDOR_ID 0x20a6 |
6348 |
++#define INOVIA_SEW858 0x1105 |
6349 |
++ |
6350 |
+ /* some devices interfaces need special handling due to a number of reasons */ |
6351 |
+ enum option_blacklist_reason { |
6352 |
+ OPTION_BLACKLIST_NONE = 0, |
6353 |
+@@ -703,6 +707,222 @@ static const struct usb_device_id option_ids[] = { |
6354 |
+ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7A) }, |
6355 |
+ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7B) }, |
6356 |
+ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7C) }, |
6357 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x01) }, |
6358 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x02) }, |
6359 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x03) }, |
6360 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x04) }, |
6361 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x05) }, |
6362 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x06) }, |
6363 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0A) }, |
6364 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0B) }, |
6365 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0D) }, |
6366 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0E) }, |
6367 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x0F) }, |
6368 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x10) }, |
6369 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x12) }, |
6370 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x13) }, |
6371 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x14) }, |
6372 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x15) }, |
6373 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x17) }, |
6374 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x18) }, |
6375 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x19) }, |
6376 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x1A) }, |
6377 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x1B) }, |
6378 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x1C) }, |
6379 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x31) }, |
6380 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x32) }, |
6381 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x33) }, |
6382 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x34) }, |
6383 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x35) }, |
6384 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x36) }, |
6385 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3A) }, |
6386 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3B) }, |
6387 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3D) }, |
6388 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3E) }, |
6389 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x3F) }, |
6390 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x48) }, |
6391 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x49) }, |
6392 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x4A) }, |
6393 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x4B) }, |
6394 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x4C) }, |
6395 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x61) }, |
6396 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x62) }, |
6397 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x63) }, |
6398 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x64) }, |
6399 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x65) }, |
6400 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x66) }, |
6401 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6A) }, |
6402 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6B) }, |
6403 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6D) }, |
6404 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6E) }, |
6405 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x6F) }, |
6406 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x78) }, |
6407 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x79) }, |
6408 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x7A) }, |
6409 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x7B) }, |
6410 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x03, 0x7C) }, |
6411 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x01) }, |
6412 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x02) }, |
6413 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x03) }, |
6414 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x04) }, |
6415 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x05) }, |
6416 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x06) }, |
6417 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0A) }, |
6418 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0B) }, |
6419 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0D) }, |
6420 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0E) }, |
6421 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x0F) }, |
6422 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x10) }, |
6423 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x12) }, |
6424 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x13) }, |
6425 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x14) }, |
6426 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x15) }, |
6427 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x17) }, |
6428 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x18) }, |
6429 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x19) }, |
6430 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x1A) }, |
6431 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x1B) }, |
6432 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x1C) }, |
6433 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x31) }, |
6434 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x32) }, |
6435 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x33) }, |
6436 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x34) }, |
6437 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x35) }, |
6438 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x36) }, |
6439 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3A) }, |
6440 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3B) }, |
6441 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3D) }, |
6442 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3E) }, |
6443 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x3F) }, |
6444 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x48) }, |
6445 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x49) }, |
6446 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x4A) }, |
6447 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x4B) }, |
6448 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x4C) }, |
6449 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x61) }, |
6450 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x62) }, |
6451 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x63) }, |
6452 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x64) }, |
6453 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x65) }, |
6454 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x66) }, |
6455 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6A) }, |
6456 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6B) }, |
6457 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6D) }, |
6458 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6E) }, |
6459 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x6F) }, |
6460 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x78) }, |
6461 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x79) }, |
6462 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x7A) }, |
6463 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x7B) }, |
6464 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x04, 0x7C) }, |
6465 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x01) }, |
6466 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x02) }, |
6467 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x03) }, |
6468 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x04) }, |
6469 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x05) }, |
6470 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x06) }, |
6471 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0A) }, |
6472 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0B) }, |
6473 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0D) }, |
6474 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0E) }, |
6475 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x0F) }, |
6476 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x10) }, |
6477 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x12) }, |
6478 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x13) }, |
6479 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x14) }, |
6480 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x15) }, |
6481 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x17) }, |
6482 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x18) }, |
6483 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x19) }, |
6484 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x1A) }, |
6485 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x1B) }, |
6486 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x1C) }, |
6487 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x31) }, |
6488 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x32) }, |
6489 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x33) }, |
6490 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x34) }, |
6491 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x35) }, |
6492 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x36) }, |
6493 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3A) }, |
6494 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3B) }, |
6495 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3D) }, |
6496 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3E) }, |
6497 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x3F) }, |
6498 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x48) }, |
6499 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x49) }, |
6500 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x4A) }, |
6501 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x4B) }, |
6502 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x4C) }, |
6503 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x61) }, |
6504 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x62) }, |
6505 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x63) }, |
6506 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x64) }, |
6507 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x65) }, |
6508 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x66) }, |
6509 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6A) }, |
6510 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6B) }, |
6511 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6D) }, |
6512 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6E) }, |
6513 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x6F) }, |
6514 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x78) }, |
6515 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x79) }, |
6516 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x7A) }, |
6517 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x7B) }, |
6518 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x05, 0x7C) }, |
6519 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x01) }, |
6520 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x02) }, |
6521 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x03) }, |
6522 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x04) }, |
6523 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x05) }, |
6524 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x06) }, |
6525 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0A) }, |
6526 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0B) }, |
6527 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0D) }, |
6528 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0E) }, |
6529 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x0F) }, |
6530 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x10) }, |
6531 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x12) }, |
6532 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x13) }, |
6533 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x14) }, |
6534 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x15) }, |
6535 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x17) }, |
6536 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x18) }, |
6537 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x19) }, |
6538 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x1A) }, |
6539 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x1B) }, |
6540 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x1C) }, |
6541 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x31) }, |
6542 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x32) }, |
6543 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x33) }, |
6544 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x34) }, |
6545 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x35) }, |
6546 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x36) }, |
6547 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3A) }, |
6548 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3B) }, |
6549 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3D) }, |
6550 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3E) }, |
6551 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x3F) }, |
6552 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x48) }, |
6553 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x49) }, |
6554 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x4A) }, |
6555 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x4B) }, |
6556 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x4C) }, |
6557 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x61) }, |
6558 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x62) }, |
6559 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x63) }, |
6560 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x64) }, |
6561 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x65) }, |
6562 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x66) }, |
6563 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6A) }, |
6564 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6B) }, |
6565 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6D) }, |
6566 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6E) }, |
6567 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x6F) }, |
6568 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x78) }, |
6569 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x79) }, |
6570 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7A) }, |
6571 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7B) }, |
6572 |
++ { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x06, 0x7C) }, |
6573 |
+ |
6574 |
+ |
6575 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, |
6576 |
+@@ -1279,7 +1499,9 @@ static const struct usb_device_id option_ids[] = { |
6577 |
+ |
6578 |
+ { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, |
6579 |
+ { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) }, |
6580 |
+- { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200) }, |
6581 |
++ { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200), |
6582 |
++ .driver_info = (kernel_ulong_t)&net_intf6_blacklist |
6583 |
++ }, |
6584 |
+ { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ |
6585 |
+ { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/ |
6586 |
+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) }, |
6587 |
+@@ -1367,6 +1589,7 @@ static const struct usb_device_id option_ids[] = { |
6588 |
+ { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, |
6589 |
+ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ |
6590 |
+ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ |
6591 |
++ { USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) }, |
6592 |
+ { } /* Terminating entry */ |
6593 |
+ }; |
6594 |
+ MODULE_DEVICE_TABLE(usb, option_ids); |
6595 |
+diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c |
6596 |
+index 649cb35..1be8b5d 100644 |
6597 |
+--- a/drivers/video/au1100fb.c |
6598 |
++++ b/drivers/video/au1100fb.c |
6599 |
+@@ -387,39 +387,13 @@ void au1100fb_fb_rotate(struct fb_info *fbi, int angle) |
6600 |
+ int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) |
6601 |
+ { |
6602 |
+ struct au1100fb_device *fbdev; |
6603 |
+- unsigned int len; |
6604 |
+- unsigned long start=0, off; |
6605 |
+ |
6606 |
+ fbdev = to_au1100fb_device(fbi); |
6607 |
+ |
6608 |
+- if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) { |
6609 |
+- return -EINVAL; |
6610 |
+- } |
6611 |
+- |
6612 |
+- start = fbdev->fb_phys & PAGE_MASK; |
6613 |
+- len = PAGE_ALIGN((start & ~PAGE_MASK) + fbdev->fb_len); |
6614 |
+- |
6615 |
+- off = vma->vm_pgoff << PAGE_SHIFT; |
6616 |
+- |
6617 |
+- if ((vma->vm_end - vma->vm_start + off) > len) { |
6618 |
+- return -EINVAL; |
6619 |
+- } |
6620 |
+- |
6621 |
+- off += start; |
6622 |
+- vma->vm_pgoff = off >> PAGE_SHIFT; |
6623 |
+- |
6624 |
+ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
6625 |
+ pgprot_val(vma->vm_page_prot) |= (6 << 9); //CCA=6 |
6626 |
+ |
6627 |
+- vma->vm_flags |= VM_IO; |
6628 |
+- |
6629 |
+- if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, |
6630 |
+- vma->vm_end - vma->vm_start, |
6631 |
+- vma->vm_page_prot)) { |
6632 |
+- return -EAGAIN; |
6633 |
+- } |
6634 |
+- |
6635 |
+- return 0; |
6636 |
++ return vm_iomap_memory(vma, fbdev->fb_phys, fbdev->fb_len); |
6637 |
+ } |
6638 |
+ |
6639 |
+ static struct fb_ops au1100fb_ops = |
6640 |
+diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c |
6641 |
+index 7200559..5bd7d88 100644 |
6642 |
+--- a/drivers/video/au1200fb.c |
6643 |
++++ b/drivers/video/au1200fb.c |
6644 |
+@@ -1216,38 +1216,13 @@ static int au1200fb_fb_blank(int blank_mode, struct fb_info *fbi) |
6645 |
+ * method mainly to allow the use of the TLB streaming flag (CCA=6) |
6646 |
+ */ |
6647 |
+ static int au1200fb_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) |
6648 |
+- |
6649 |
+ { |
6650 |
+- unsigned int len; |
6651 |
+- unsigned long start=0, off; |
6652 |
+ struct au1200fb_device *fbdev = info->par; |
6653 |
+ |
6654 |
+- if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) { |
6655 |
+- return -EINVAL; |
6656 |
+- } |
6657 |
+- |
6658 |
+- start = fbdev->fb_phys & PAGE_MASK; |
6659 |
+- len = PAGE_ALIGN((start & ~PAGE_MASK) + fbdev->fb_len); |
6660 |
+- |
6661 |
+- off = vma->vm_pgoff << PAGE_SHIFT; |
6662 |
+- |
6663 |
+- if ((vma->vm_end - vma->vm_start + off) > len) { |
6664 |
+- return -EINVAL; |
6665 |
+- } |
6666 |
+- |
6667 |
+- off += start; |
6668 |
+- vma->vm_pgoff = off >> PAGE_SHIFT; |
6669 |
+- |
6670 |
+ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
6671 |
+ pgprot_val(vma->vm_page_prot) |= _CACHE_MASK; /* CCA=7 */ |
6672 |
+ |
6673 |
+- vma->vm_flags |= VM_IO; |
6674 |
+- |
6675 |
+- return io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, |
6676 |
+- vma->vm_end - vma->vm_start, |
6677 |
+- vma->vm_page_prot); |
6678 |
+- |
6679 |
+- return 0; |
6680 |
++ return vm_iomap_memory(vma, fbdev->fb_phys, fbdev->fb_len); |
6681 |
+ } |
6682 |
+ |
6683 |
+ static void set_global(u_int cmd, struct au1200_lcd_global_regs_t *pdata) |
6684 |
+diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c |
6685 |
+index ac1ad48..5ce56e7 100644 |
6686 |
+--- a/fs/ecryptfs/keystore.c |
6687 |
++++ b/fs/ecryptfs/keystore.c |
6688 |
+@@ -1151,7 +1151,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, |
6689 |
+ struct ecryptfs_msg_ctx *msg_ctx; |
6690 |
+ struct ecryptfs_message *msg = NULL; |
6691 |
+ char *auth_tok_sig; |
6692 |
+- char *payload; |
6693 |
++ char *payload = NULL; |
6694 |
+ size_t payload_len; |
6695 |
+ int rc; |
6696 |
+ |
6697 |
+@@ -1206,6 +1206,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, |
6698 |
+ out: |
6699 |
+ if (msg) |
6700 |
+ kfree(msg); |
6701 |
++ kfree(payload); |
6702 |
+ return rc; |
6703 |
+ } |
6704 |
+ |
6705 |
+diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c |
6706 |
+index 34f0a07..3268697 100644 |
6707 |
+--- a/fs/ext3/dir.c |
6708 |
++++ b/fs/ext3/dir.c |
6709 |
+@@ -25,6 +25,7 @@ |
6710 |
+ #include <linux/jbd.h> |
6711 |
+ #include <linux/ext3_fs.h> |
6712 |
+ #include <linux/buffer_head.h> |
6713 |
++#include <linux/compat.h> |
6714 |
+ #include <linux/slab.h> |
6715 |
+ #include <linux/rbtree.h> |
6716 |
+ |
6717 |
+@@ -32,24 +33,8 @@ static unsigned char ext3_filetype_table[] = { |
6718 |
+ DT_UNKNOWN, DT_REG, DT_DIR, DT_CHR, DT_BLK, DT_FIFO, DT_SOCK, DT_LNK |
6719 |
+ }; |
6720 |
+ |
6721 |
+-static int ext3_readdir(struct file *, void *, filldir_t); |
6722 |
+ static int ext3_dx_readdir(struct file * filp, |
6723 |
+ void * dirent, filldir_t filldir); |
6724 |
+-static int ext3_release_dir (struct inode * inode, |
6725 |
+- struct file * filp); |
6726 |
+- |
6727 |
+-const struct file_operations ext3_dir_operations = { |
6728 |
+- .llseek = generic_file_llseek, |
6729 |
+- .read = generic_read_dir, |
6730 |
+- .readdir = ext3_readdir, /* we take BKL. needed?*/ |
6731 |
+- .unlocked_ioctl = ext3_ioctl, |
6732 |
+-#ifdef CONFIG_COMPAT |
6733 |
+- .compat_ioctl = ext3_compat_ioctl, |
6734 |
+-#endif |
6735 |
+- .fsync = ext3_sync_file, /* BKL held */ |
6736 |
+- .release = ext3_release_dir, |
6737 |
+-}; |
6738 |
+- |
6739 |
+ |
6740 |
+ static unsigned char get_dtype(struct super_block *sb, int filetype) |
6741 |
+ { |
6742 |
+@@ -60,6 +45,25 @@ static unsigned char get_dtype(struct super_block *sb, int filetype) |
6743 |
+ return (ext3_filetype_table[filetype]); |
6744 |
+ } |
6745 |
+ |
6746 |
++/** |
6747 |
++ * Check if the given dir-inode refers to an htree-indexed directory |
6748 |
++ * (or a directory which chould potentially get coverted to use htree |
6749 |
++ * indexing). |
6750 |
++ * |
6751 |
++ * Return 1 if it is a dx dir, 0 if not |
6752 |
++ */ |
6753 |
++static int is_dx_dir(struct inode *inode) |
6754 |
++{ |
6755 |
++ struct super_block *sb = inode->i_sb; |
6756 |
++ |
6757 |
++ if (EXT3_HAS_COMPAT_FEATURE(inode->i_sb, |
6758 |
++ EXT3_FEATURE_COMPAT_DIR_INDEX) && |
6759 |
++ ((EXT3_I(inode)->i_flags & EXT3_INDEX_FL) || |
6760 |
++ ((inode->i_size >> sb->s_blocksize_bits) == 1))) |
6761 |
++ return 1; |
6762 |
++ |
6763 |
++ return 0; |
6764 |
++} |
6765 |
+ |
6766 |
+ int ext3_check_dir_entry (const char * function, struct inode * dir, |
6767 |
+ struct ext3_dir_entry_2 * de, |
6768 |
+@@ -99,18 +103,13 @@ static int ext3_readdir(struct file * filp, |
6769 |
+ unsigned long offset; |
6770 |
+ int i, stored; |
6771 |
+ struct ext3_dir_entry_2 *de; |
6772 |
+- struct super_block *sb; |
6773 |
+ int err; |
6774 |
+ struct inode *inode = filp->f_path.dentry->d_inode; |
6775 |
++ struct super_block *sb = inode->i_sb; |
6776 |
+ int ret = 0; |
6777 |
+ int dir_has_error = 0; |
6778 |
+ |
6779 |
+- sb = inode->i_sb; |
6780 |
+- |
6781 |
+- if (EXT3_HAS_COMPAT_FEATURE(inode->i_sb, |
6782 |
+- EXT3_FEATURE_COMPAT_DIR_INDEX) && |
6783 |
+- ((EXT3_I(inode)->i_flags & EXT3_INDEX_FL) || |
6784 |
+- ((inode->i_size >> sb->s_blocksize_bits) == 1))) { |
6785 |
++ if (is_dx_dir(inode)) { |
6786 |
+ err = ext3_dx_readdir(filp, dirent, filldir); |
6787 |
+ if (err != ERR_BAD_DX_DIR) { |
6788 |
+ ret = err; |
6789 |
+@@ -232,22 +231,87 @@ out: |
6790 |
+ return ret; |
6791 |
+ } |
6792 |
+ |
6793 |
++static inline int is_32bit_api(void) |
6794 |
++{ |
6795 |
++#ifdef CONFIG_COMPAT |
6796 |
++ return is_compat_task(); |
6797 |
++#else |
6798 |
++ return (BITS_PER_LONG == 32); |
6799 |
++#endif |
6800 |
++} |
6801 |
++ |
6802 |
+ /* |
6803 |
+ * These functions convert from the major/minor hash to an f_pos |
6804 |
+- * value. |
6805 |
++ * value for dx directories |
6806 |
+ * |
6807 |
+- * Currently we only use major hash numer. This is unfortunate, but |
6808 |
+- * on 32-bit machines, the same VFS interface is used for lseek and |
6809 |
+- * llseek, so if we use the 64 bit offset, then the 32-bit versions of |
6810 |
+- * lseek/telldir/seekdir will blow out spectacularly, and from within |
6811 |
+- * the ext2 low-level routine, we don't know if we're being called by |
6812 |
+- * a 64-bit version of the system call or the 32-bit version of the |
6813 |
+- * system call. Worse yet, NFSv2 only allows for a 32-bit readdir |
6814 |
+- * cookie. Sigh. |
6815 |
++ * Upper layer (for example NFS) should specify FMODE_32BITHASH or |
6816 |
++ * FMODE_64BITHASH explicitly. On the other hand, we allow ext3 to be mounted |
6817 |
++ * directly on both 32-bit and 64-bit nodes, under such case, neither |
6818 |
++ * FMODE_32BITHASH nor FMODE_64BITHASH is specified. |
6819 |
+ */ |
6820 |
+-#define hash2pos(major, minor) (major >> 1) |
6821 |
+-#define pos2maj_hash(pos) ((pos << 1) & 0xffffffff) |
6822 |
+-#define pos2min_hash(pos) (0) |
6823 |
++static inline loff_t hash2pos(struct file *filp, __u32 major, __u32 minor) |
6824 |
++{ |
6825 |
++ if ((filp->f_mode & FMODE_32BITHASH) || |
6826 |
++ (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) |
6827 |
++ return major >> 1; |
6828 |
++ else |
6829 |
++ return ((__u64)(major >> 1) << 32) | (__u64)minor; |
6830 |
++} |
6831 |
++ |
6832 |
++static inline __u32 pos2maj_hash(struct file *filp, loff_t pos) |
6833 |
++{ |
6834 |
++ if ((filp->f_mode & FMODE_32BITHASH) || |
6835 |
++ (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) |
6836 |
++ return (pos << 1) & 0xffffffff; |
6837 |
++ else |
6838 |
++ return ((pos >> 32) << 1) & 0xffffffff; |
6839 |
++} |
6840 |
++ |
6841 |
++static inline __u32 pos2min_hash(struct file *filp, loff_t pos) |
6842 |
++{ |
6843 |
++ if ((filp->f_mode & FMODE_32BITHASH) || |
6844 |
++ (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) |
6845 |
++ return 0; |
6846 |
++ else |
6847 |
++ return pos & 0xffffffff; |
6848 |
++} |
6849 |
++ |
6850 |
++/* |
6851 |
++ * Return 32- or 64-bit end-of-file for dx directories |
6852 |
++ */ |
6853 |
++static inline loff_t ext3_get_htree_eof(struct file *filp) |
6854 |
++{ |
6855 |
++ if ((filp->f_mode & FMODE_32BITHASH) || |
6856 |
++ (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) |
6857 |
++ return EXT3_HTREE_EOF_32BIT; |
6858 |
++ else |
6859 |
++ return EXT3_HTREE_EOF_64BIT; |
6860 |
++} |
6861 |
++ |
6862 |
++ |
6863 |
++/* |
6864 |
++ * ext3_dir_llseek() calls generic_file_llseek[_size]() to handle both |
6865 |
++ * non-htree and htree directories, where the "offset" is in terms |
6866 |
++ * of the filename hash value instead of the byte offset. |
6867 |
++ * |
6868 |
++ * Because we may return a 64-bit hash that is well beyond s_maxbytes, |
6869 |
++ * we need to pass the max hash as the maximum allowable offset in |
6870 |
++ * the htree directory case. |
6871 |
++ * |
6872 |
++ * NOTE: offsets obtained *before* ext3_set_inode_flag(dir, EXT3_INODE_INDEX) |
6873 |
++ * will be invalid once the directory was converted into a dx directory |
6874 |
++ */ |
6875 |
++loff_t ext3_dir_llseek(struct file *file, loff_t offset, int origin) |
6876 |
++{ |
6877 |
++ struct inode *inode = file->f_mapping->host; |
6878 |
++ int dx_dir = is_dx_dir(inode); |
6879 |
++ |
6880 |
++ if (likely(dx_dir)) |
6881 |
++ return generic_file_llseek_size(file, offset, origin, |
6882 |
++ ext3_get_htree_eof(file)); |
6883 |
++ else |
6884 |
++ return generic_file_llseek(file, offset, origin); |
6885 |
++} |
6886 |
+ |
6887 |
+ /* |
6888 |
+ * This structure holds the nodes of the red-black tree used to store |
6889 |
+@@ -308,15 +372,16 @@ static void free_rb_tree_fname(struct rb_root *root) |
6890 |
+ } |
6891 |
+ |
6892 |
+ |
6893 |
+-static struct dir_private_info *ext3_htree_create_dir_info(loff_t pos) |
6894 |
++static struct dir_private_info *ext3_htree_create_dir_info(struct file *filp, |
6895 |
++ loff_t pos) |
6896 |
+ { |
6897 |
+ struct dir_private_info *p; |
6898 |
+ |
6899 |
+ p = kzalloc(sizeof(struct dir_private_info), GFP_KERNEL); |
6900 |
+ if (!p) |
6901 |
+ return NULL; |
6902 |
+- p->curr_hash = pos2maj_hash(pos); |
6903 |
+- p->curr_minor_hash = pos2min_hash(pos); |
6904 |
++ p->curr_hash = pos2maj_hash(filp, pos); |
6905 |
++ p->curr_minor_hash = pos2min_hash(filp, pos); |
6906 |
+ return p; |
6907 |
+ } |
6908 |
+ |
6909 |
+@@ -406,7 +471,7 @@ static int call_filldir(struct file * filp, void * dirent, |
6910 |
+ printk("call_filldir: called with null fname?!?\n"); |
6911 |
+ return 0; |
6912 |
+ } |
6913 |
+- curr_pos = hash2pos(fname->hash, fname->minor_hash); |
6914 |
++ curr_pos = hash2pos(filp, fname->hash, fname->minor_hash); |
6915 |
+ while (fname) { |
6916 |
+ error = filldir(dirent, fname->name, |
6917 |
+ fname->name_len, curr_pos, |
6918 |
+@@ -431,13 +496,13 @@ static int ext3_dx_readdir(struct file * filp, |
6919 |
+ int ret; |
6920 |
+ |
6921 |
+ if (!info) { |
6922 |
+- info = ext3_htree_create_dir_info(filp->f_pos); |
6923 |
++ info = ext3_htree_create_dir_info(filp, filp->f_pos); |
6924 |
+ if (!info) |
6925 |
+ return -ENOMEM; |
6926 |
+ filp->private_data = info; |
6927 |
+ } |
6928 |
+ |
6929 |
+- if (filp->f_pos == EXT3_HTREE_EOF) |
6930 |
++ if (filp->f_pos == ext3_get_htree_eof(filp)) |
6931 |
+ return 0; /* EOF */ |
6932 |
+ |
6933 |
+ /* Some one has messed with f_pos; reset the world */ |
6934 |
+@@ -445,8 +510,8 @@ static int ext3_dx_readdir(struct file * filp, |
6935 |
+ free_rb_tree_fname(&info->root); |
6936 |
+ info->curr_node = NULL; |
6937 |
+ info->extra_fname = NULL; |
6938 |
+- info->curr_hash = pos2maj_hash(filp->f_pos); |
6939 |
+- info->curr_minor_hash = pos2min_hash(filp->f_pos); |
6940 |
++ info->curr_hash = pos2maj_hash(filp, filp->f_pos); |
6941 |
++ info->curr_minor_hash = pos2min_hash(filp, filp->f_pos); |
6942 |
+ } |
6943 |
+ |
6944 |
+ /* |
6945 |
+@@ -478,7 +543,7 @@ static int ext3_dx_readdir(struct file * filp, |
6946 |
+ if (ret < 0) |
6947 |
+ return ret; |
6948 |
+ if (ret == 0) { |
6949 |
+- filp->f_pos = EXT3_HTREE_EOF; |
6950 |
++ filp->f_pos = ext3_get_htree_eof(filp); |
6951 |
+ break; |
6952 |
+ } |
6953 |
+ info->curr_node = rb_first(&info->root); |
6954 |
+@@ -498,7 +563,7 @@ static int ext3_dx_readdir(struct file * filp, |
6955 |
+ info->curr_minor_hash = fname->minor_hash; |
6956 |
+ } else { |
6957 |
+ if (info->next_hash == ~0) { |
6958 |
+- filp->f_pos = EXT3_HTREE_EOF; |
6959 |
++ filp->f_pos = ext3_get_htree_eof(filp); |
6960 |
+ break; |
6961 |
+ } |
6962 |
+ info->curr_hash = info->next_hash; |
6963 |
+@@ -517,3 +582,15 @@ static int ext3_release_dir (struct inode * inode, struct file * filp) |
6964 |
+ |
6965 |
+ return 0; |
6966 |
+ } |
6967 |
++ |
6968 |
++const struct file_operations ext3_dir_operations = { |
6969 |
++ .llseek = ext3_dir_llseek, |
6970 |
++ .read = generic_read_dir, |
6971 |
++ .readdir = ext3_readdir, |
6972 |
++ .unlocked_ioctl = ext3_ioctl, |
6973 |
++#ifdef CONFIG_COMPAT |
6974 |
++ .compat_ioctl = ext3_compat_ioctl, |
6975 |
++#endif |
6976 |
++ .fsync = ext3_sync_file, |
6977 |
++ .release = ext3_release_dir, |
6978 |
++}; |
6979 |
+diff --git a/fs/ext3/hash.c b/fs/ext3/hash.c |
6980 |
+index 7d215b4..d4d3ade 100644 |
6981 |
+--- a/fs/ext3/hash.c |
6982 |
++++ b/fs/ext3/hash.c |
6983 |
+@@ -200,8 +200,8 @@ int ext3fs_dirhash(const char *name, int len, struct dx_hash_info *hinfo) |
6984 |
+ return -1; |
6985 |
+ } |
6986 |
+ hash = hash & ~1; |
6987 |
+- if (hash == (EXT3_HTREE_EOF << 1)) |
6988 |
+- hash = (EXT3_HTREE_EOF-1) << 1; |
6989 |
++ if (hash == (EXT3_HTREE_EOF_32BIT << 1)) |
6990 |
++ hash = (EXT3_HTREE_EOF_32BIT - 1) << 1; |
6991 |
+ hinfo->hash = hash; |
6992 |
+ hinfo->minor_hash = minor_hash; |
6993 |
+ return 0; |
6994 |
+diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c |
6995 |
+index 164c560..689d1b1 100644 |
6996 |
+--- a/fs/ext4/dir.c |
6997 |
++++ b/fs/ext4/dir.c |
6998 |
+@@ -32,24 +32,8 @@ static unsigned char ext4_filetype_table[] = { |
6999 |
+ DT_UNKNOWN, DT_REG, DT_DIR, DT_CHR, DT_BLK, DT_FIFO, DT_SOCK, DT_LNK |
7000 |
+ }; |
7001 |
+ |
7002 |
+-static int ext4_readdir(struct file *, void *, filldir_t); |
7003 |
+ static int ext4_dx_readdir(struct file *filp, |
7004 |
+ void *dirent, filldir_t filldir); |
7005 |
+-static int ext4_release_dir(struct inode *inode, |
7006 |
+- struct file *filp); |
7007 |
+- |
7008 |
+-const struct file_operations ext4_dir_operations = { |
7009 |
+- .llseek = ext4_llseek, |
7010 |
+- .read = generic_read_dir, |
7011 |
+- .readdir = ext4_readdir, /* we take BKL. needed?*/ |
7012 |
+- .unlocked_ioctl = ext4_ioctl, |
7013 |
+-#ifdef CONFIG_COMPAT |
7014 |
+- .compat_ioctl = ext4_compat_ioctl, |
7015 |
+-#endif |
7016 |
+- .fsync = ext4_sync_file, |
7017 |
+- .release = ext4_release_dir, |
7018 |
+-}; |
7019 |
+- |
7020 |
+ |
7021 |
+ static unsigned char get_dtype(struct super_block *sb, int filetype) |
7022 |
+ { |
7023 |
+@@ -60,6 +44,26 @@ static unsigned char get_dtype(struct super_block *sb, int filetype) |
7024 |
+ return (ext4_filetype_table[filetype]); |
7025 |
+ } |
7026 |
+ |
7027 |
++/** |
7028 |
++ * Check if the given dir-inode refers to an htree-indexed directory |
7029 |
++ * (or a directory which chould potentially get coverted to use htree |
7030 |
++ * indexing). |
7031 |
++ * |
7032 |
++ * Return 1 if it is a dx dir, 0 if not |
7033 |
++ */ |
7034 |
++static int is_dx_dir(struct inode *inode) |
7035 |
++{ |
7036 |
++ struct super_block *sb = inode->i_sb; |
7037 |
++ |
7038 |
++ if (EXT4_HAS_COMPAT_FEATURE(inode->i_sb, |
7039 |
++ EXT4_FEATURE_COMPAT_DIR_INDEX) && |
7040 |
++ ((ext4_test_inode_flag(inode, EXT4_INODE_INDEX)) || |
7041 |
++ ((inode->i_size >> sb->s_blocksize_bits) == 1))) |
7042 |
++ return 1; |
7043 |
++ |
7044 |
++ return 0; |
7045 |
++} |
7046 |
++ |
7047 |
+ /* |
7048 |
+ * Return 0 if the directory entry is OK, and 1 if there is a problem |
7049 |
+ * |
7050 |
+@@ -115,18 +119,13 @@ static int ext4_readdir(struct file *filp, |
7051 |
+ unsigned int offset; |
7052 |
+ int i, stored; |
7053 |
+ struct ext4_dir_entry_2 *de; |
7054 |
+- struct super_block *sb; |
7055 |
+ int err; |
7056 |
+ struct inode *inode = filp->f_path.dentry->d_inode; |
7057 |
++ struct super_block *sb = inode->i_sb; |
7058 |
+ int ret = 0; |
7059 |
+ int dir_has_error = 0; |
7060 |
+ |
7061 |
+- sb = inode->i_sb; |
7062 |
+- |
7063 |
+- if (EXT4_HAS_COMPAT_FEATURE(inode->i_sb, |
7064 |
+- EXT4_FEATURE_COMPAT_DIR_INDEX) && |
7065 |
+- ((ext4_test_inode_flag(inode, EXT4_INODE_INDEX)) || |
7066 |
+- ((inode->i_size >> sb->s_blocksize_bits) == 1))) { |
7067 |
++ if (is_dx_dir(inode)) { |
7068 |
+ err = ext4_dx_readdir(filp, dirent, filldir); |
7069 |
+ if (err != ERR_BAD_DX_DIR) { |
7070 |
+ ret = err; |
7071 |
+@@ -254,22 +253,134 @@ out: |
7072 |
+ return ret; |
7073 |
+ } |
7074 |
+ |
7075 |
++static inline int is_32bit_api(void) |
7076 |
++{ |
7077 |
++#ifdef CONFIG_COMPAT |
7078 |
++ return is_compat_task(); |
7079 |
++#else |
7080 |
++ return (BITS_PER_LONG == 32); |
7081 |
++#endif |
7082 |
++} |
7083 |
++ |
7084 |
+ /* |
7085 |
+ * These functions convert from the major/minor hash to an f_pos |
7086 |
+- * value. |
7087 |
++ * value for dx directories |
7088 |
++ * |
7089 |
++ * Upper layer (for example NFS) should specify FMODE_32BITHASH or |
7090 |
++ * FMODE_64BITHASH explicitly. On the other hand, we allow ext4 to be mounted |
7091 |
++ * directly on both 32-bit and 64-bit nodes, under such case, neither |
7092 |
++ * FMODE_32BITHASH nor FMODE_64BITHASH is specified. |
7093 |
++ */ |
7094 |
++static inline loff_t hash2pos(struct file *filp, __u32 major, __u32 minor) |
7095 |
++{ |
7096 |
++ if ((filp->f_mode & FMODE_32BITHASH) || |
7097 |
++ (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) |
7098 |
++ return major >> 1; |
7099 |
++ else |
7100 |
++ return ((__u64)(major >> 1) << 32) | (__u64)minor; |
7101 |
++} |
7102 |
++ |
7103 |
++static inline __u32 pos2maj_hash(struct file *filp, loff_t pos) |
7104 |
++{ |
7105 |
++ if ((filp->f_mode & FMODE_32BITHASH) || |
7106 |
++ (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) |
7107 |
++ return (pos << 1) & 0xffffffff; |
7108 |
++ else |
7109 |
++ return ((pos >> 32) << 1) & 0xffffffff; |
7110 |
++} |
7111 |
++ |
7112 |
++static inline __u32 pos2min_hash(struct file *filp, loff_t pos) |
7113 |
++{ |
7114 |
++ if ((filp->f_mode & FMODE_32BITHASH) || |
7115 |
++ (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) |
7116 |
++ return 0; |
7117 |
++ else |
7118 |
++ return pos & 0xffffffff; |
7119 |
++} |
7120 |
++ |
7121 |
++/* |
7122 |
++ * Return 32- or 64-bit end-of-file for dx directories |
7123 |
++ */ |
7124 |
++static inline loff_t ext4_get_htree_eof(struct file *filp) |
7125 |
++{ |
7126 |
++ if ((filp->f_mode & FMODE_32BITHASH) || |
7127 |
++ (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) |
7128 |
++ return EXT4_HTREE_EOF_32BIT; |
7129 |
++ else |
7130 |
++ return EXT4_HTREE_EOF_64BIT; |
7131 |
++} |
7132 |
++ |
7133 |
++ |
7134 |
++/* |
7135 |
++ * ext4_dir_llseek() based on generic_file_llseek() to handle both |
7136 |
++ * non-htree and htree directories, where the "offset" is in terms |
7137 |
++ * of the filename hash value instead of the byte offset. |
7138 |
+ * |
7139 |
+- * Currently we only use major hash numer. This is unfortunate, but |
7140 |
+- * on 32-bit machines, the same VFS interface is used for lseek and |
7141 |
+- * llseek, so if we use the 64 bit offset, then the 32-bit versions of |
7142 |
+- * lseek/telldir/seekdir will blow out spectacularly, and from within |
7143 |
+- * the ext2 low-level routine, we don't know if we're being called by |
7144 |
+- * a 64-bit version of the system call or the 32-bit version of the |
7145 |
+- * system call. Worse yet, NFSv2 only allows for a 32-bit readdir |
7146 |
+- * cookie. Sigh. |
7147 |
++ * NOTE: offsets obtained *before* ext4_set_inode_flag(dir, EXT4_INODE_INDEX) |
7148 |
++ * will be invalid once the directory was converted into a dx directory |
7149 |
+ */ |
7150 |
+-#define hash2pos(major, minor) (major >> 1) |
7151 |
+-#define pos2maj_hash(pos) ((pos << 1) & 0xffffffff) |
7152 |
+-#define pos2min_hash(pos) (0) |
7153 |
++loff_t ext4_dir_llseek(struct file *file, loff_t offset, int origin) |
7154 |
++{ |
7155 |
++ struct inode *inode = file->f_mapping->host; |
7156 |
++ loff_t ret = -EINVAL; |
7157 |
++ int dx_dir = is_dx_dir(inode); |
7158 |
++ |
7159 |
++ mutex_lock(&inode->i_mutex); |
7160 |
++ |
7161 |
++ /* NOTE: relative offsets with dx directories might not work |
7162 |
++ * as expected, as it is difficult to figure out the |
7163 |
++ * correct offset between dx hashes */ |
7164 |
++ |
7165 |
++ switch (origin) { |
7166 |
++ case SEEK_END: |
7167 |
++ if (unlikely(offset > 0)) |
7168 |
++ goto out_err; /* not supported for directories */ |
7169 |
++ |
7170 |
++ /* so only negative offsets are left, does that have a |
7171 |
++ * meaning for directories at all? */ |
7172 |
++ if (dx_dir) |
7173 |
++ offset += ext4_get_htree_eof(file); |
7174 |
++ else |
7175 |
++ offset += inode->i_size; |
7176 |
++ break; |
7177 |
++ case SEEK_CUR: |
7178 |
++ /* |
7179 |
++ * Here we special-case the lseek(fd, 0, SEEK_CUR) |
7180 |
++ * position-querying operation. Avoid rewriting the "same" |
7181 |
++ * f_pos value back to the file because a concurrent read(), |
7182 |
++ * write() or lseek() might have altered it |
7183 |
++ */ |
7184 |
++ if (offset == 0) { |
7185 |
++ offset = file->f_pos; |
7186 |
++ goto out_ok; |
7187 |
++ } |
7188 |
++ |
7189 |
++ offset += file->f_pos; |
7190 |
++ break; |
7191 |
++ } |
7192 |
++ |
7193 |
++ if (unlikely(offset < 0)) |
7194 |
++ goto out_err; |
7195 |
++ |
7196 |
++ if (!dx_dir) { |
7197 |
++ if (offset > inode->i_sb->s_maxbytes) |
7198 |
++ goto out_err; |
7199 |
++ } else if (offset > ext4_get_htree_eof(file)) |
7200 |
++ goto out_err; |
7201 |
++ |
7202 |
++ /* Special lock needed here? */ |
7203 |
++ if (offset != file->f_pos) { |
7204 |
++ file->f_pos = offset; |
7205 |
++ file->f_version = 0; |
7206 |
++ } |
7207 |
++ |
7208 |
++out_ok: |
7209 |
++ ret = offset; |
7210 |
++out_err: |
7211 |
++ mutex_unlock(&inode->i_mutex); |
7212 |
++ |
7213 |
++ return ret; |
7214 |
++} |
7215 |
+ |
7216 |
+ /* |
7217 |
+ * This structure holds the nodes of the red-black tree used to store |
7218 |
+@@ -330,15 +441,16 @@ static void free_rb_tree_fname(struct rb_root *root) |
7219 |
+ } |
7220 |
+ |
7221 |
+ |
7222 |
+-static struct dir_private_info *ext4_htree_create_dir_info(loff_t pos) |
7223 |
++static struct dir_private_info *ext4_htree_create_dir_info(struct file *filp, |
7224 |
++ loff_t pos) |
7225 |
+ { |
7226 |
+ struct dir_private_info *p; |
7227 |
+ |
7228 |
+ p = kzalloc(sizeof(struct dir_private_info), GFP_KERNEL); |
7229 |
+ if (!p) |
7230 |
+ return NULL; |
7231 |
+- p->curr_hash = pos2maj_hash(pos); |
7232 |
+- p->curr_minor_hash = pos2min_hash(pos); |
7233 |
++ p->curr_hash = pos2maj_hash(filp, pos); |
7234 |
++ p->curr_minor_hash = pos2min_hash(filp, pos); |
7235 |
+ return p; |
7236 |
+ } |
7237 |
+ |
7238 |
+@@ -429,7 +541,7 @@ static int call_filldir(struct file *filp, void *dirent, |
7239 |
+ "null fname?!?\n"); |
7240 |
+ return 0; |
7241 |
+ } |
7242 |
+- curr_pos = hash2pos(fname->hash, fname->minor_hash); |
7243 |
++ curr_pos = hash2pos(filp, fname->hash, fname->minor_hash); |
7244 |
+ while (fname) { |
7245 |
+ error = filldir(dirent, fname->name, |
7246 |
+ fname->name_len, curr_pos, |
7247 |
+@@ -454,13 +566,13 @@ static int ext4_dx_readdir(struct file *filp, |
7248 |
+ int ret; |
7249 |
+ |
7250 |
+ if (!info) { |
7251 |
+- info = ext4_htree_create_dir_info(filp->f_pos); |
7252 |
++ info = ext4_htree_create_dir_info(filp, filp->f_pos); |
7253 |
+ if (!info) |
7254 |
+ return -ENOMEM; |
7255 |
+ filp->private_data = info; |
7256 |
+ } |
7257 |
+ |
7258 |
+- if (filp->f_pos == EXT4_HTREE_EOF) |
7259 |
++ if (filp->f_pos == ext4_get_htree_eof(filp)) |
7260 |
+ return 0; /* EOF */ |
7261 |
+ |
7262 |
+ /* Some one has messed with f_pos; reset the world */ |
7263 |
+@@ -468,8 +580,8 @@ static int ext4_dx_readdir(struct file *filp, |
7264 |
+ free_rb_tree_fname(&info->root); |
7265 |
+ info->curr_node = NULL; |
7266 |
+ info->extra_fname = NULL; |
7267 |
+- info->curr_hash = pos2maj_hash(filp->f_pos); |
7268 |
+- info->curr_minor_hash = pos2min_hash(filp->f_pos); |
7269 |
++ info->curr_hash = pos2maj_hash(filp, filp->f_pos); |
7270 |
++ info->curr_minor_hash = pos2min_hash(filp, filp->f_pos); |
7271 |
+ } |
7272 |
+ |
7273 |
+ /* |
7274 |
+@@ -501,7 +613,7 @@ static int ext4_dx_readdir(struct file *filp, |
7275 |
+ if (ret < 0) |
7276 |
+ return ret; |
7277 |
+ if (ret == 0) { |
7278 |
+- filp->f_pos = EXT4_HTREE_EOF; |
7279 |
++ filp->f_pos = ext4_get_htree_eof(filp); |
7280 |
+ break; |
7281 |
+ } |
7282 |
+ info->curr_node = rb_first(&info->root); |
7283 |
+@@ -521,7 +633,7 @@ static int ext4_dx_readdir(struct file *filp, |
7284 |
+ info->curr_minor_hash = fname->minor_hash; |
7285 |
+ } else { |
7286 |
+ if (info->next_hash == ~0) { |
7287 |
+- filp->f_pos = EXT4_HTREE_EOF; |
7288 |
++ filp->f_pos = ext4_get_htree_eof(filp); |
7289 |
+ break; |
7290 |
+ } |
7291 |
+ info->curr_hash = info->next_hash; |
7292 |
+@@ -540,3 +652,15 @@ static int ext4_release_dir(struct inode *inode, struct file *filp) |
7293 |
+ |
7294 |
+ return 0; |
7295 |
+ } |
7296 |
++ |
7297 |
++const struct file_operations ext4_dir_operations = { |
7298 |
++ .llseek = ext4_dir_llseek, |
7299 |
++ .read = generic_read_dir, |
7300 |
++ .readdir = ext4_readdir, |
7301 |
++ .unlocked_ioctl = ext4_ioctl, |
7302 |
++#ifdef CONFIG_COMPAT |
7303 |
++ .compat_ioctl = ext4_compat_ioctl, |
7304 |
++#endif |
7305 |
++ .fsync = ext4_sync_file, |
7306 |
++ .release = ext4_release_dir, |
7307 |
++}; |
7308 |
+diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h |
7309 |
+index 60b6ca5..22c71b9 100644 |
7310 |
+--- a/fs/ext4/ext4.h |
7311 |
++++ b/fs/ext4/ext4.h |
7312 |
+@@ -1597,7 +1597,11 @@ struct dx_hash_info |
7313 |
+ u32 *seed; |
7314 |
+ }; |
7315 |
+ |
7316 |
+-#define EXT4_HTREE_EOF 0x7fffffff |
7317 |
++ |
7318 |
++/* 32 and 64 bit signed EOF for dx directories */ |
7319 |
++#define EXT4_HTREE_EOF_32BIT ((1UL << (32 - 1)) - 1) |
7320 |
++#define EXT4_HTREE_EOF_64BIT ((1ULL << (64 - 1)) - 1) |
7321 |
++ |
7322 |
+ |
7323 |
+ /* |
7324 |
+ * Control parameters used by ext4_htree_next_block |
7325 |
+diff --git a/fs/ext4/hash.c b/fs/ext4/hash.c |
7326 |
+index ac8f168..fa8e491 100644 |
7327 |
+--- a/fs/ext4/hash.c |
7328 |
++++ b/fs/ext4/hash.c |
7329 |
+@@ -200,8 +200,8 @@ int ext4fs_dirhash(const char *name, int len, struct dx_hash_info *hinfo) |
7330 |
+ return -1; |
7331 |
+ } |
7332 |
+ hash = hash & ~1; |
7333 |
+- if (hash == (EXT4_HTREE_EOF << 1)) |
7334 |
+- hash = (EXT4_HTREE_EOF-1) << 1; |
7335 |
++ if (hash == (EXT4_HTREE_EOF_32BIT << 1)) |
7336 |
++ hash = (EXT4_HTREE_EOF_32BIT - 1) << 1; |
7337 |
+ hinfo->hash = hash; |
7338 |
+ hinfo->minor_hash = minor_hash; |
7339 |
+ return 0; |
7340 |
+diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c |
7341 |
+index d5498b2..b4e9f3f 100644 |
7342 |
+--- a/fs/ext4/xattr.c |
7343 |
++++ b/fs/ext4/xattr.c |
7344 |
+@@ -1269,6 +1269,8 @@ retry: |
7345 |
+ s_min_extra_isize) { |
7346 |
+ tried_min_extra_isize++; |
7347 |
+ new_extra_isize = s_min_extra_isize; |
7348 |
++ kfree(is); is = NULL; |
7349 |
++ kfree(bs); bs = NULL; |
7350 |
+ goto retry; |
7351 |
+ } |
7352 |
+ error = -1; |
7353 |
+diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c |
7354 |
+index c1a3e60..7f464c5 100644 |
7355 |
+--- a/fs/jfs/jfs_inode.c |
7356 |
++++ b/fs/jfs/jfs_inode.c |
7357 |
+@@ -95,7 +95,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode) |
7358 |
+ |
7359 |
+ if (insert_inode_locked(inode) < 0) { |
7360 |
+ rc = -EINVAL; |
7361 |
+- goto fail_unlock; |
7362 |
++ goto fail_put; |
7363 |
+ } |
7364 |
+ |
7365 |
+ inode_init_owner(inode, parent, mode); |
7366 |
+@@ -156,7 +156,6 @@ struct inode *ialloc(struct inode *parent, umode_t mode) |
7367 |
+ fail_drop: |
7368 |
+ dquot_drop(inode); |
7369 |
+ inode->i_flags |= S_NOQUOTA; |
7370 |
+-fail_unlock: |
7371 |
+ clear_nlink(inode); |
7372 |
+ unlock_new_inode(inode); |
7373 |
+ fail_put: |
7374 |
+diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c |
7375 |
+index 561a3dc..61b697e 100644 |
7376 |
+--- a/fs/nfsd/vfs.c |
7377 |
++++ b/fs/nfsd/vfs.c |
7378 |
+@@ -726,12 +726,13 @@ static int nfsd_open_break_lease(struct inode *inode, int access) |
7379 |
+ |
7380 |
+ /* |
7381 |
+ * Open an existing file or directory. |
7382 |
+- * The access argument indicates the type of open (read/write/lock) |
7383 |
++ * The may_flags argument indicates the type of open (read/write/lock) |
7384 |
++ * and additional flags. |
7385 |
+ * N.B. After this call fhp needs an fh_put |
7386 |
+ */ |
7387 |
+ __be32 |
7388 |
+ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, |
7389 |
+- int access, struct file **filp) |
7390 |
++ int may_flags, struct file **filp) |
7391 |
+ { |
7392 |
+ struct dentry *dentry; |
7393 |
+ struct inode *inode; |
7394 |
+@@ -746,7 +747,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, |
7395 |
+ * and (hopefully) checked permission - so allow OWNER_OVERRIDE |
7396 |
+ * in case a chmod has now revoked permission. |
7397 |
+ */ |
7398 |
+- err = fh_verify(rqstp, fhp, type, access | NFSD_MAY_OWNER_OVERRIDE); |
7399 |
++ err = fh_verify(rqstp, fhp, type, may_flags | NFSD_MAY_OWNER_OVERRIDE); |
7400 |
+ if (err) |
7401 |
+ goto out; |
7402 |
+ |
7403 |
+@@ -757,7 +758,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, |
7404 |
+ * or any access when mandatory locking enabled |
7405 |
+ */ |
7406 |
+ err = nfserr_perm; |
7407 |
+- if (IS_APPEND(inode) && (access & NFSD_MAY_WRITE)) |
7408 |
++ if (IS_APPEND(inode) && (may_flags & NFSD_MAY_WRITE)) |
7409 |
+ goto out; |
7410 |
+ /* |
7411 |
+ * We must ignore files (but only files) which might have mandatory |
7412 |
+@@ -770,12 +771,12 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, |
7413 |
+ if (!inode->i_fop) |
7414 |
+ goto out; |
7415 |
+ |
7416 |
+- host_err = nfsd_open_break_lease(inode, access); |
7417 |
++ host_err = nfsd_open_break_lease(inode, may_flags); |
7418 |
+ if (host_err) /* NOMEM or WOULDBLOCK */ |
7419 |
+ goto out_nfserr; |
7420 |
+ |
7421 |
+- if (access & NFSD_MAY_WRITE) { |
7422 |
+- if (access & NFSD_MAY_READ) |
7423 |
++ if (may_flags & NFSD_MAY_WRITE) { |
7424 |
++ if (may_flags & NFSD_MAY_READ) |
7425 |
+ flags = O_RDWR|O_LARGEFILE; |
7426 |
+ else |
7427 |
+ flags = O_WRONLY|O_LARGEFILE; |
7428 |
+@@ -785,8 +786,15 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, |
7429 |
+ if (IS_ERR(*filp)) { |
7430 |
+ host_err = PTR_ERR(*filp); |
7431 |
+ *filp = NULL; |
7432 |
+- } else |
7433 |
+- host_err = ima_file_check(*filp, access); |
7434 |
++ } else { |
7435 |
++ host_err = ima_file_check(*filp, may_flags); |
7436 |
++ |
7437 |
++ if (may_flags & NFSD_MAY_64BIT_COOKIE) |
7438 |
++ (*filp)->f_mode |= FMODE_64BITHASH; |
7439 |
++ else |
7440 |
++ (*filp)->f_mode |= FMODE_32BITHASH; |
7441 |
++ } |
7442 |
++ |
7443 |
+ out_nfserr: |
7444 |
+ err = nfserrno(host_err); |
7445 |
+ out: |
7446 |
+@@ -2016,8 +2024,13 @@ nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, |
7447 |
+ __be32 err; |
7448 |
+ struct file *file; |
7449 |
+ loff_t offset = *offsetp; |
7450 |
++ int may_flags = NFSD_MAY_READ; |
7451 |
++ |
7452 |
++ /* NFSv2 only supports 32 bit cookies */ |
7453 |
++ if (rqstp->rq_vers > 2) |
7454 |
++ may_flags |= NFSD_MAY_64BIT_COOKIE; |
7455 |
+ |
7456 |
+- err = nfsd_open(rqstp, fhp, S_IFDIR, NFSD_MAY_READ, &file); |
7457 |
++ err = nfsd_open(rqstp, fhp, S_IFDIR, may_flags, &file); |
7458 |
+ if (err) |
7459 |
+ goto out; |
7460 |
+ |
7461 |
+diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h |
7462 |
+index 3f54ad0..85d4d42 100644 |
7463 |
+--- a/fs/nfsd/vfs.h |
7464 |
++++ b/fs/nfsd/vfs.h |
7465 |
+@@ -27,6 +27,8 @@ |
7466 |
+ #define NFSD_MAY_BYPASS_GSS 0x400 |
7467 |
+ #define NFSD_MAY_READ_IF_EXEC 0x800 |
7468 |
+ |
7469 |
++#define NFSD_MAY_64BIT_COOKIE 0x1000 /* 64 bit readdir cookies for >= NFSv3 */ |
7470 |
++ |
7471 |
+ #define NFSD_MAY_CREATE (NFSD_MAY_EXEC|NFSD_MAY_WRITE) |
7472 |
+ #define NFSD_MAY_REMOVE (NFSD_MAY_EXEC|NFSD_MAY_WRITE|NFSD_MAY_TRUNC) |
7473 |
+ |
7474 |
+diff --git a/fs/statfs.c b/fs/statfs.c |
7475 |
+index 9cf04a1..a133c3e 100644 |
7476 |
+--- a/fs/statfs.c |
7477 |
++++ b/fs/statfs.c |
7478 |
+@@ -86,7 +86,7 @@ int user_statfs(const char __user *pathname, struct kstatfs *st) |
7479 |
+ |
7480 |
+ int fd_statfs(int fd, struct kstatfs *st) |
7481 |
+ { |
7482 |
+- struct file *file = fget(fd); |
7483 |
++ struct file *file = fget_raw(fd); |
7484 |
+ int error = -EBADF; |
7485 |
+ if (file) { |
7486 |
+ error = vfs_statfs(&file->f_path, st); |
7487 |
+diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h |
7488 |
+index 7639f18..8f4ae68 100644 |
7489 |
+--- a/include/drm/drm_mode.h |
7490 |
++++ b/include/drm/drm_mode.h |
7491 |
+@@ -184,6 +184,8 @@ struct drm_mode_get_connector { |
7492 |
+ __u32 connection; |
7493 |
+ __u32 mm_width, mm_height; /**< HxW in millimeters */ |
7494 |
+ __u32 subpixel; |
7495 |
++ |
7496 |
++ __u32 pad; |
7497 |
+ }; |
7498 |
+ |
7499 |
+ #define DRM_MODE_PROP_PENDING (1<<0) |
7500 |
+diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h |
7501 |
+index 3fd17c2..5633053 100644 |
7502 |
+--- a/include/linux/compiler-gcc.h |
7503 |
++++ b/include/linux/compiler-gcc.h |
7504 |
+@@ -5,6 +5,9 @@ |
7505 |
+ /* |
7506 |
+ * Common definitions for all gcc versions go here. |
7507 |
+ */ |
7508 |
++#define GCC_VERSION (__GNUC__ * 10000 \ |
7509 |
++ + __GNUC_MINOR__ * 100 \ |
7510 |
++ + __GNUC_PATCHLEVEL__) |
7511 |
+ |
7512 |
+ |
7513 |
+ /* Optimization barrier */ |
7514 |
+diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h |
7515 |
+index dfadc96..643d6c4 100644 |
7516 |
+--- a/include/linux/compiler-gcc4.h |
7517 |
++++ b/include/linux/compiler-gcc4.h |
7518 |
+@@ -29,6 +29,21 @@ |
7519 |
+ the kernel context */ |
7520 |
+ #define __cold __attribute__((__cold__)) |
7521 |
+ |
7522 |
++/* |
7523 |
++ * GCC 'asm goto' miscompiles certain code sequences: |
7524 |
++ * |
7525 |
++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 |
7526 |
++ * |
7527 |
++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. |
7528 |
++ * Fixed in GCC 4.8.2 and later versions. |
7529 |
++ * |
7530 |
++ * (asm goto is automatically volatile - the naming reflects this.) |
7531 |
++ */ |
7532 |
++#if GCC_VERSION <= 40801 |
7533 |
++# define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) |
7534 |
++#else |
7535 |
++# define asm_volatile_goto(x...) do { asm goto(x); } while (0) |
7536 |
++#endif |
7537 |
+ |
7538 |
+ #if __GNUC_MINOR__ >= 5 |
7539 |
+ /* |
7540 |
+diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h |
7541 |
+index dec9911..d59ab12 100644 |
7542 |
+--- a/include/linux/ext3_fs.h |
7543 |
++++ b/include/linux/ext3_fs.h |
7544 |
+@@ -781,7 +781,11 @@ struct dx_hash_info |
7545 |
+ u32 *seed; |
7546 |
+ }; |
7547 |
+ |
7548 |
+-#define EXT3_HTREE_EOF 0x7fffffff |
7549 |
++ |
7550 |
++/* 32 and 64 bit signed EOF for dx directories */ |
7551 |
++#define EXT3_HTREE_EOF_32BIT ((1UL << (32 - 1)) - 1) |
7552 |
++#define EXT3_HTREE_EOF_64BIT ((1ULL << (64 - 1)) - 1) |
7553 |
++ |
7554 |
+ |
7555 |
+ /* |
7556 |
+ * Control parameters used by ext3_htree_next_block |
7557 |
+diff --git a/include/linux/fs.h b/include/linux/fs.h |
7558 |
+index a276817..dd74385 100644 |
7559 |
+--- a/include/linux/fs.h |
7560 |
++++ b/include/linux/fs.h |
7561 |
+@@ -92,6 +92,10 @@ struct inodes_stat_t { |
7562 |
+ /* File is opened using open(.., 3, ..) and is writeable only for ioctls |
7563 |
+ (specialy hack for floppy.c) */ |
7564 |
+ #define FMODE_WRITE_IOCTL ((__force fmode_t)0x100) |
7565 |
++/* 32bit hashes as llseek() offset (for directories) */ |
7566 |
++#define FMODE_32BITHASH ((__force fmode_t)0x200) |
7567 |
++/* 64bit hashes as llseek() offset (for directories) */ |
7568 |
++#define FMODE_64BITHASH ((__force fmode_t)0x400) |
7569 |
+ |
7570 |
+ /* |
7571 |
+ * Don't update ctime and mtime. |
7572 |
+@@ -907,9 +911,11 @@ static inline loff_t i_size_read(const struct inode *inode) |
7573 |
+ static inline void i_size_write(struct inode *inode, loff_t i_size) |
7574 |
+ { |
7575 |
+ #if BITS_PER_LONG==32 && defined(CONFIG_SMP) |
7576 |
++ preempt_disable(); |
7577 |
+ write_seqcount_begin(&inode->i_size_seqcount); |
7578 |
+ inode->i_size = i_size; |
7579 |
+ write_seqcount_end(&inode->i_size_seqcount); |
7580 |
++ preempt_enable(); |
7581 |
+ #elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPT) |
7582 |
+ preempt_disable(); |
7583 |
+ inode->i_size = i_size; |
7584 |
+diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h |
7585 |
+index eeb6a29..8d5b91e 100644 |
7586 |
+--- a/include/linux/perf_event.h |
7587 |
++++ b/include/linux/perf_event.h |
7588 |
+@@ -300,13 +300,15 @@ struct perf_event_mmap_page { |
7589 |
+ /* |
7590 |
+ * Control data for the mmap() data buffer. |
7591 |
+ * |
7592 |
+- * User-space reading the @data_head value should issue an rmb(), on |
7593 |
+- * SMP capable platforms, after reading this value -- see |
7594 |
+- * perf_event_wakeup(). |
7595 |
++ * User-space reading the @data_head value should issue an smp_rmb(), |
7596 |
++ * after reading this value. |
7597 |
+ * |
7598 |
+ * When the mapping is PROT_WRITE the @data_tail value should be |
7599 |
+- * written by userspace to reflect the last read data. In this case |
7600 |
+- * the kernel will not over-write unread data. |
7601 |
++ * written by userspace to reflect the last read data, after issueing |
7602 |
++ * an smp_mb() to separate the data read from the ->data_tail store. |
7603 |
++ * In this case the kernel will not over-write unread data. |
7604 |
++ * |
7605 |
++ * See perf_output_put_handle() for the data ordering. |
7606 |
+ */ |
7607 |
+ __u64 data_head; /* head in the data section */ |
7608 |
+ __u64 data_tail; /* user-space written tail */ |
7609 |
+diff --git a/include/linux/random.h b/include/linux/random.h |
7610 |
+index 29e217a..7e77cee 100644 |
7611 |
+--- a/include/linux/random.h |
7612 |
++++ b/include/linux/random.h |
7613 |
+@@ -58,6 +58,7 @@ extern void add_interrupt_randomness(int irq, int irq_flags); |
7614 |
+ extern void get_random_bytes(void *buf, int nbytes); |
7615 |
+ extern void get_random_bytes_arch(void *buf, int nbytes); |
7616 |
+ void generate_random_uuid(unsigned char uuid_out[16]); |
7617 |
++extern int random_int_secret_init(void); |
7618 |
+ |
7619 |
+ #ifndef MODULE |
7620 |
+ extern const struct file_operations random_fops, urandom_fops; |
7621 |
+diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h |
7622 |
+index efe50af..85180bf 100644 |
7623 |
+--- a/include/linux/skbuff.h |
7624 |
++++ b/include/linux/skbuff.h |
7625 |
+@@ -737,6 +737,16 @@ static inline int skb_cloned(const struct sk_buff *skb) |
7626 |
+ (atomic_read(&skb_shinfo(skb)->dataref) & SKB_DATAREF_MASK) != 1; |
7627 |
+ } |
7628 |
+ |
7629 |
++static inline int skb_unclone(struct sk_buff *skb, gfp_t pri) |
7630 |
++{ |
7631 |
++ might_sleep_if(pri & __GFP_WAIT); |
7632 |
++ |
7633 |
++ if (skb_cloned(skb)) |
7634 |
++ return pskb_expand_head(skb, 0, 0, pri); |
7635 |
++ |
7636 |
++ return 0; |
7637 |
++} |
7638 |
++ |
7639 |
+ /** |
7640 |
+ * skb_header_cloned - is the header a clone |
7641 |
+ * @skb: buffer to check |
7642 |
+@@ -1157,6 +1167,11 @@ static inline int skb_pagelen(const struct sk_buff *skb) |
7643 |
+ return len + skb_headlen(skb); |
7644 |
+ } |
7645 |
+ |
7646 |
++static inline bool skb_has_frags(const struct sk_buff *skb) |
7647 |
++{ |
7648 |
++ return skb_shinfo(skb)->nr_frags; |
7649 |
++} |
7650 |
++ |
7651 |
+ /** |
7652 |
+ * __skb_fill_page_desc - initialise a paged fragment in an skb |
7653 |
+ * @skb: buffer containing fragment to be initialised |
7654 |
+diff --git a/include/linux/timex.h b/include/linux/timex.h |
7655 |
+index 08e90fb..5fee575 100644 |
7656 |
+--- a/include/linux/timex.h |
7657 |
++++ b/include/linux/timex.h |
7658 |
+@@ -173,6 +173,20 @@ struct timex { |
7659 |
+ |
7660 |
+ #include <asm/timex.h> |
7661 |
+ |
7662 |
++#ifndef random_get_entropy |
7663 |
++/* |
7664 |
++ * The random_get_entropy() function is used by the /dev/random driver |
7665 |
++ * in order to extract entropy via the relative unpredictability of |
7666 |
++ * when an interrupt takes places versus a high speed, fine-grained |
7667 |
++ * timing source or cycle counter. Since it will be occurred on every |
7668 |
++ * single interrupt, it must have a very low cost/overhead. |
7669 |
++ * |
7670 |
++ * By default we use get_cycles() for this purpose, but individual |
7671 |
++ * architectures may override this in their asm/timex.h header file. |
7672 |
++ */ |
7673 |
++#define random_get_entropy() get_cycles() |
7674 |
++#endif |
7675 |
++ |
7676 |
+ /* |
7677 |
+ * SHIFT_PLL is used as a dampening factor to define how much we |
7678 |
+ * adjust the frequency correction for a given offset in PLL mode. |
7679 |
+diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h |
7680 |
+index a7a683e..a8c2ef6 100644 |
7681 |
+--- a/include/net/cipso_ipv4.h |
7682 |
++++ b/include/net/cipso_ipv4.h |
7683 |
+@@ -290,6 +290,7 @@ static inline int cipso_v4_validate(const struct sk_buff *skb, |
7684 |
+ unsigned char err_offset = 0; |
7685 |
+ u8 opt_len = opt[1]; |
7686 |
+ u8 opt_iter; |
7687 |
++ u8 tag_len; |
7688 |
+ |
7689 |
+ if (opt_len < 8) { |
7690 |
+ err_offset = 1; |
7691 |
+@@ -302,11 +303,12 @@ static inline int cipso_v4_validate(const struct sk_buff *skb, |
7692 |
+ } |
7693 |
+ |
7694 |
+ for (opt_iter = 6; opt_iter < opt_len;) { |
7695 |
+- if (opt[opt_iter + 1] > (opt_len - opt_iter)) { |
7696 |
++ tag_len = opt[opt_iter + 1]; |
7697 |
++ if ((tag_len == 0) || (opt[opt_iter + 1] > (opt_len - opt_iter))) { |
7698 |
+ err_offset = opt_iter + 1; |
7699 |
+ goto out; |
7700 |
+ } |
7701 |
+- opt_iter += opt[opt_iter + 1]; |
7702 |
++ opt_iter += tag_len; |
7703 |
+ } |
7704 |
+ |
7705 |
+ out: |
7706 |
+diff --git a/include/net/dst.h b/include/net/dst.h |
7707 |
+index 16010d1..86ef78d 100644 |
7708 |
+--- a/include/net/dst.h |
7709 |
++++ b/include/net/dst.h |
7710 |
+@@ -459,10 +459,22 @@ static inline struct dst_entry *xfrm_lookup(struct net *net, |
7711 |
+ { |
7712 |
+ return dst_orig; |
7713 |
+ } |
7714 |
++ |
7715 |
++static inline struct xfrm_state *dst_xfrm(const struct dst_entry *dst) |
7716 |
++{ |
7717 |
++ return NULL; |
7718 |
++} |
7719 |
++ |
7720 |
+ #else |
7721 |
+ extern struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig, |
7722 |
+ const struct flowi *fl, struct sock *sk, |
7723 |
+ int flags); |
7724 |
++ |
7725 |
++/* skb attached with this dst needs transformation if dst->xfrm is valid */ |
7726 |
++static inline struct xfrm_state *dst_xfrm(const struct dst_entry *dst) |
7727 |
++{ |
7728 |
++ return dst->xfrm; |
7729 |
++} |
7730 |
+ #endif |
7731 |
+ |
7732 |
+ #endif /* _NET_DST_H */ |
7733 |
+diff --git a/init/main.c b/init/main.c |
7734 |
+index 5d0eb1d..7474450 100644 |
7735 |
+--- a/init/main.c |
7736 |
++++ b/init/main.c |
7737 |
+@@ -68,6 +68,7 @@ |
7738 |
+ #include <linux/shmem_fs.h> |
7739 |
+ #include <linux/slab.h> |
7740 |
+ #include <linux/perf_event.h> |
7741 |
++#include <linux/random.h> |
7742 |
+ |
7743 |
+ #include <asm/io.h> |
7744 |
+ #include <asm/bugs.h> |
7745 |
+@@ -732,6 +733,7 @@ static void __init do_basic_setup(void) |
7746 |
+ do_ctors(); |
7747 |
+ usermodehelper_enable(); |
7748 |
+ do_initcalls(); |
7749 |
++ random_int_secret_init(); |
7750 |
+ } |
7751 |
+ |
7752 |
+ static void __init do_pre_smp_initcalls(void) |
7753 |
+diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c |
7754 |
+index 7f3011c..58c3b51 100644 |
7755 |
+--- a/kernel/events/ring_buffer.c |
7756 |
++++ b/kernel/events/ring_buffer.c |
7757 |
+@@ -75,10 +75,31 @@ again: |
7758 |
+ goto out; |
7759 |
+ |
7760 |
+ /* |
7761 |
+- * Publish the known good head. Rely on the full barrier implied |
7762 |
+- * by atomic_dec_and_test() order the rb->head read and this |
7763 |
+- * write. |
7764 |
++ * Since the mmap() consumer (userspace) can run on a different CPU: |
7765 |
++ * |
7766 |
++ * kernel user |
7767 |
++ * |
7768 |
++ * READ ->data_tail READ ->data_head |
7769 |
++ * smp_mb() (A) smp_rmb() (C) |
7770 |
++ * WRITE $data READ $data |
7771 |
++ * smp_wmb() (B) smp_mb() (D) |
7772 |
++ * STORE ->data_head WRITE ->data_tail |
7773 |
++ * |
7774 |
++ * Where A pairs with D, and B pairs with C. |
7775 |
++ * |
7776 |
++ * I don't think A needs to be a full barrier because we won't in fact |
7777 |
++ * write data until we see the store from userspace. So we simply don't |
7778 |
++ * issue the data WRITE until we observe it. Be conservative for now. |
7779 |
++ * |
7780 |
++ * OTOH, D needs to be a full barrier since it separates the data READ |
7781 |
++ * from the tail WRITE. |
7782 |
++ * |
7783 |
++ * For B a WMB is sufficient since it separates two WRITEs, and for C |
7784 |
++ * an RMB is sufficient since it separates two READs. |
7785 |
++ * |
7786 |
++ * See perf_output_begin(). |
7787 |
+ */ |
7788 |
++ smp_wmb(); |
7789 |
+ rb->user_page->data_head = head; |
7790 |
+ |
7791 |
+ /* |
7792 |
+@@ -142,9 +163,11 @@ int perf_output_begin(struct perf_output_handle *handle, |
7793 |
+ * Userspace could choose to issue a mb() before updating the |
7794 |
+ * tail pointer. So that all reads will be completed before the |
7795 |
+ * write is issued. |
7796 |
++ * |
7797 |
++ * See perf_output_put_handle(). |
7798 |
+ */ |
7799 |
+ tail = ACCESS_ONCE(rb->user_page->data_tail); |
7800 |
+- smp_rmb(); |
7801 |
++ smp_mb(); |
7802 |
+ offset = head = local_read(&rb->head); |
7803 |
+ head += size; |
7804 |
+ if (unlikely(!perf_output_space(rb, tail, offset, head))) |
7805 |
+diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c |
7806 |
+index ce1067f..c5a12a7 100644 |
7807 |
+--- a/kernel/trace/trace.c |
7808 |
++++ b/kernel/trace/trace.c |
7809 |
+@@ -534,9 +534,12 @@ int trace_get_user(struct trace_parser *parser, const char __user *ubuf, |
7810 |
+ if (isspace(ch)) { |
7811 |
+ parser->buffer[parser->idx] = 0; |
7812 |
+ parser->cont = false; |
7813 |
+- } else { |
7814 |
++ } else if (parser->idx < parser->size - 1) { |
7815 |
+ parser->cont = true; |
7816 |
+ parser->buffer[parser->idx++] = ch; |
7817 |
++ } else { |
7818 |
++ ret = -EINVAL; |
7819 |
++ goto out; |
7820 |
+ } |
7821 |
+ |
7822 |
+ *ppos += read; |
7823 |
+diff --git a/lib/scatterlist.c b/lib/scatterlist.c |
7824 |
+index 4ceb05d..2ffcb3c 100644 |
7825 |
+--- a/lib/scatterlist.c |
7826 |
++++ b/lib/scatterlist.c |
7827 |
+@@ -419,7 +419,8 @@ void sg_miter_stop(struct sg_mapping_iter *miter) |
7828 |
+ if (miter->addr) { |
7829 |
+ miter->__offset += miter->consumed; |
7830 |
+ |
7831 |
+- if (miter->__flags & SG_MITER_TO_SG) |
7832 |
++ if ((miter->__flags & SG_MITER_TO_SG) && |
7833 |
++ !PageSlab(miter->page)) |
7834 |
+ flush_kernel_dcache_page(miter->page); |
7835 |
+ |
7836 |
+ if (miter->__flags & SG_MITER_ATOMIC) { |
7837 |
+diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c |
7838 |
+index 235c219..c705612 100644 |
7839 |
+--- a/net/8021q/vlan_netlink.c |
7840 |
++++ b/net/8021q/vlan_netlink.c |
7841 |
+@@ -152,7 +152,7 @@ static size_t vlan_get_size(const struct net_device *dev) |
7842 |
+ struct vlan_dev_info *vlan = vlan_dev_info(dev); |
7843 |
+ |
7844 |
+ return nla_total_size(2) + /* IFLA_VLAN_ID */ |
7845 |
+- sizeof(struct ifla_vlan_flags) + /* IFLA_VLAN_FLAGS */ |
7846 |
++ nla_total_size(sizeof(struct ifla_vlan_flags)) + /* IFLA_VLAN_FLAGS */ |
7847 |
+ vlan_qos_map_size(vlan->nr_ingress_mappings) + |
7848 |
+ vlan_qos_map_size(vlan->nr_egress_mappings); |
7849 |
+ } |
7850 |
+diff --git a/net/compat.c b/net/compat.c |
7851 |
+index 8c979cc..3139ef2 100644 |
7852 |
+--- a/net/compat.c |
7853 |
++++ b/net/compat.c |
7854 |
+@@ -71,6 +71,8 @@ int get_compat_msghdr(struct msghdr *kmsg, struct compat_msghdr __user *umsg) |
7855 |
+ __get_user(kmsg->msg_controllen, &umsg->msg_controllen) || |
7856 |
+ __get_user(kmsg->msg_flags, &umsg->msg_flags)) |
7857 |
+ return -EFAULT; |
7858 |
++ if (kmsg->msg_namelen > sizeof(struct sockaddr_storage)) |
7859 |
++ return -EINVAL; |
7860 |
+ kmsg->msg_name = compat_ptr(tmp1); |
7861 |
+ kmsg->msg_iov = compat_ptr(tmp2); |
7862 |
+ kmsg->msg_control = compat_ptr(tmp3); |
7863 |
+diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c |
7864 |
+index 984ec65..4afcf31 100644 |
7865 |
+--- a/net/ipv4/inet_hashtables.c |
7866 |
++++ b/net/ipv4/inet_hashtables.c |
7867 |
+@@ -268,7 +268,7 @@ begintw: |
7868 |
+ } |
7869 |
+ if (unlikely(!INET_TW_MATCH(sk, net, hash, acookie, |
7870 |
+ saddr, daddr, ports, dif))) { |
7871 |
+- sock_put(sk); |
7872 |
++ inet_twsk_put(inet_twsk(sk)); |
7873 |
+ goto begintw; |
7874 |
+ } |
7875 |
+ goto out; |
7876 |
+diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c |
7877 |
+index daf408e..16191f0 100644 |
7878 |
+--- a/net/ipv4/ip_output.c |
7879 |
++++ b/net/ipv4/ip_output.c |
7880 |
+@@ -833,7 +833,7 @@ static int __ip_append_data(struct sock *sk, |
7881 |
+ csummode = CHECKSUM_PARTIAL; |
7882 |
+ |
7883 |
+ cork->length += length; |
7884 |
+- if (((length > mtu) || (skb && skb_is_gso(skb))) && |
7885 |
++ if (((length > mtu) || (skb && skb_has_frags(skb))) && |
7886 |
+ (sk->sk_protocol == IPPROTO_UDP) && |
7887 |
+ (rt->dst.dev->features & NETIF_F_UFO) && !rt->dst.header_len) { |
7888 |
+ err = ip_ufo_append_data(sk, queue, getfrag, from, length, |
7889 |
+diff --git a/net/ipv4/route.c b/net/ipv4/route.c |
7890 |
+index c45a155a3..6768ce2 100644 |
7891 |
+--- a/net/ipv4/route.c |
7892 |
++++ b/net/ipv4/route.c |
7893 |
+@@ -2727,7 +2727,7 @@ static struct rtable *ip_route_output_slow(struct net *net, struct flowi4 *fl4) |
7894 |
+ RT_SCOPE_LINK); |
7895 |
+ goto make_route; |
7896 |
+ } |
7897 |
+- if (fl4->saddr) { |
7898 |
++ if (!fl4->saddr) { |
7899 |
+ if (ipv4_is_multicast(fl4->daddr)) |
7900 |
+ fl4->saddr = inet_select_addr(dev_out, 0, |
7901 |
+ fl4->flowi4_scope); |
7902 |
+diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c |
7903 |
+index 872b41d..c1ed01e 100644 |
7904 |
+--- a/net/ipv4/tcp_input.c |
7905 |
++++ b/net/ipv4/tcp_input.c |
7906 |
+@@ -1469,7 +1469,10 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, |
7907 |
+ tp->lost_cnt_hint -= tcp_skb_pcount(prev); |
7908 |
+ } |
7909 |
+ |
7910 |
+- TCP_SKB_CB(skb)->tcp_flags |= TCP_SKB_CB(prev)->tcp_flags; |
7911 |
++ TCP_SKB_CB(prev)->tcp_flags |= TCP_SKB_CB(skb)->tcp_flags; |
7912 |
++ if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) |
7913 |
++ TCP_SKB_CB(prev)->end_seq++; |
7914 |
++ |
7915 |
+ if (skb == tcp_highest_sack(sk)) |
7916 |
+ tcp_advance_highest_sack(sk, skb); |
7917 |
+ |
7918 |
+diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c |
7919 |
+index 3add486..0d5a118 100644 |
7920 |
+--- a/net/ipv4/tcp_output.c |
7921 |
++++ b/net/ipv4/tcp_output.c |
7922 |
+@@ -933,6 +933,9 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb) |
7923 |
+ static void tcp_set_skb_tso_segs(const struct sock *sk, struct sk_buff *skb, |
7924 |
+ unsigned int mss_now) |
7925 |
+ { |
7926 |
++ /* Make sure we own this skb before messing gso_size/gso_segs */ |
7927 |
++ WARN_ON_ONCE(skb_cloned(skb)); |
7928 |
++ |
7929 |
+ if (skb->len <= mss_now || !sk_can_gso(sk) || |
7930 |
+ skb->ip_summed == CHECKSUM_NONE) { |
7931 |
+ /* Avoid the costly divide in the normal |
7932 |
+@@ -1014,9 +1017,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, |
7933 |
+ if (nsize < 0) |
7934 |
+ nsize = 0; |
7935 |
+ |
7936 |
+- if (skb_cloned(skb) && |
7937 |
+- skb_is_nonlinear(skb) && |
7938 |
+- pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) |
7939 |
++ if (skb_unclone(skb, GFP_ATOMIC)) |
7940 |
+ return -ENOMEM; |
7941 |
+ |
7942 |
+ /* Get a new skb... force flag on. */ |
7943 |
+@@ -2129,6 +2130,8 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) |
7944 |
+ int oldpcount = tcp_skb_pcount(skb); |
7945 |
+ |
7946 |
+ if (unlikely(oldpcount > 1)) { |
7947 |
++ if (skb_unclone(skb, GFP_ATOMIC)) |
7948 |
++ return -ENOMEM; |
7949 |
+ tcp_init_tso_segs(sk, skb, cur_mss); |
7950 |
+ tcp_adjust_pcount(sk, skb, oldpcount - tcp_skb_pcount(skb)); |
7951 |
+ } |
7952 |
+diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c |
7953 |
+index 73f1a00..e38290b 100644 |
7954 |
+--- a/net/ipv6/inet6_hashtables.c |
7955 |
++++ b/net/ipv6/inet6_hashtables.c |
7956 |
+@@ -110,7 +110,7 @@ begintw: |
7957 |
+ goto out; |
7958 |
+ } |
7959 |
+ if (!INET6_TW_MATCH(sk, net, hash, saddr, daddr, ports, dif)) { |
7960 |
+- sock_put(sk); |
7961 |
++ inet_twsk_put(inet_twsk(sk)); |
7962 |
+ goto begintw; |
7963 |
+ } |
7964 |
+ goto out; |
7965 |
+diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c |
7966 |
+index 91d0711..97675bf 100644 |
7967 |
+--- a/net/ipv6/ip6_output.c |
7968 |
++++ b/net/ipv6/ip6_output.c |
7969 |
+@@ -1342,7 +1342,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, |
7970 |
+ skb = skb_peek_tail(&sk->sk_write_queue); |
7971 |
+ cork->length += length; |
7972 |
+ if (((length > mtu) || |
7973 |
+- (skb && skb_is_gso(skb))) && |
7974 |
++ (skb && skb_has_frags(skb))) && |
7975 |
+ (sk->sk_protocol == IPPROTO_UDP) && |
7976 |
+ (rt->dst.dev->features & NETIF_F_UFO)) { |
7977 |
+ err = ip6_ufo_append_data(sk, getfrag, from, length, |
7978 |
+diff --git a/net/ipv6/route.c b/net/ipv6/route.c |
7979 |
+index 18ea73c..bc9103d 100644 |
7980 |
+--- a/net/ipv6/route.c |
7981 |
++++ b/net/ipv6/route.c |
7982 |
+@@ -791,7 +791,7 @@ static struct rt6_info *rt6_alloc_clone(struct rt6_info *ort, |
7983 |
+ } |
7984 |
+ |
7985 |
+ static struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, int oif, |
7986 |
+- struct flowi6 *fl6, int flags) |
7987 |
++ struct flowi6 *fl6, int flags, bool input) |
7988 |
+ { |
7989 |
+ struct fib6_node *fn; |
7990 |
+ struct rt6_info *rt, *nrt; |
7991 |
+@@ -799,8 +799,11 @@ static struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, |
7992 |
+ int attempts = 3; |
7993 |
+ int err; |
7994 |
+ int reachable = net->ipv6.devconf_all->forwarding ? 0 : RT6_LOOKUP_F_REACHABLE; |
7995 |
++ int local = RTF_NONEXTHOP; |
7996 |
+ |
7997 |
+ strict |= flags & RT6_LOOKUP_F_IFACE; |
7998 |
++ if (input) |
7999 |
++ local |= RTF_LOCAL; |
8000 |
+ |
8001 |
+ relookup: |
8002 |
+ read_lock_bh(&table->tb6_lock); |
8003 |
+@@ -820,7 +823,7 @@ restart: |
8004 |
+ read_unlock_bh(&table->tb6_lock); |
8005 |
+ |
8006 |
+ if (!dst_get_neighbour_raw(&rt->dst) |
8007 |
+- && !(rt->rt6i_flags & (RTF_NONEXTHOP | RTF_LOCAL))) |
8008 |
++ && !(rt->rt6i_flags & local)) |
8009 |
+ nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr); |
8010 |
+ else if (!(rt->dst.flags & DST_HOST)) |
8011 |
+ nrt = rt6_alloc_clone(rt, &fl6->daddr); |
8012 |
+@@ -864,7 +867,7 @@ out2: |
8013 |
+ static struct rt6_info *ip6_pol_route_input(struct net *net, struct fib6_table *table, |
8014 |
+ struct flowi6 *fl6, int flags) |
8015 |
+ { |
8016 |
+- return ip6_pol_route(net, table, fl6->flowi6_iif, fl6, flags); |
8017 |
++ return ip6_pol_route(net, table, fl6->flowi6_iif, fl6, flags, true); |
8018 |
+ } |
8019 |
+ |
8020 |
+ void ip6_route_input(struct sk_buff *skb) |
8021 |
+@@ -890,7 +893,7 @@ void ip6_route_input(struct sk_buff *skb) |
8022 |
+ static struct rt6_info *ip6_pol_route_output(struct net *net, struct fib6_table *table, |
8023 |
+ struct flowi6 *fl6, int flags) |
8024 |
+ { |
8025 |
+- return ip6_pol_route(net, table, fl6->flowi6_oif, fl6, flags); |
8026 |
++ return ip6_pol_route(net, table, fl6->flowi6_oif, fl6, flags, false); |
8027 |
+ } |
8028 |
+ |
8029 |
+ struct dst_entry * ip6_route_output(struct net *net, const struct sock *sk, |
8030 |
+diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c |
8031 |
+index e579006..8570079 100644 |
8032 |
+--- a/net/l2tp/l2tp_ppp.c |
8033 |
++++ b/net/l2tp/l2tp_ppp.c |
8034 |
+@@ -357,7 +357,9 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh |
8035 |
+ goto error_put_sess_tun; |
8036 |
+ } |
8037 |
+ |
8038 |
++ local_bh_disable(); |
8039 |
+ l2tp_xmit_skb(session, skb, session->hdr_len); |
8040 |
++ local_bh_enable(); |
8041 |
+ |
8042 |
+ sock_put(ps->tunnel_sock); |
8043 |
+ sock_put(sk); |
8044 |
+@@ -432,7 +434,9 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb) |
8045 |
+ skb->data[0] = ppph[0]; |
8046 |
+ skb->data[1] = ppph[1]; |
8047 |
+ |
8048 |
++ local_bh_disable(); |
8049 |
+ l2tp_xmit_skb(session, skb, session->hdr_len); |
8050 |
++ local_bh_enable(); |
8051 |
+ |
8052 |
+ sock_put(sk_tun); |
8053 |
+ sock_put(sk); |
8054 |
+diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h |
8055 |
+index 73495f1..a9cf593 100644 |
8056 |
+--- a/net/mac80211/ieee80211_i.h |
8057 |
++++ b/net/mac80211/ieee80211_i.h |
8058 |
+@@ -708,6 +708,8 @@ struct tpt_led_trigger { |
8059 |
+ * that the scan completed. |
8060 |
+ * @SCAN_ABORTED: Set for our scan work function when the driver reported |
8061 |
+ * a scan complete for an aborted scan. |
8062 |
++ * @SCAN_HW_CANCELLED: Set for our scan work function when the scan is being |
8063 |
++ * cancelled. |
8064 |
+ */ |
8065 |
+ enum { |
8066 |
+ SCAN_SW_SCANNING, |
8067 |
+@@ -715,6 +717,7 @@ enum { |
8068 |
+ SCAN_OFF_CHANNEL, |
8069 |
+ SCAN_COMPLETED, |
8070 |
+ SCAN_ABORTED, |
8071 |
++ SCAN_HW_CANCELLED, |
8072 |
+ }; |
8073 |
+ |
8074 |
+ /** |
8075 |
+diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c |
8076 |
+index 7d882fc..db01d02 100644 |
8077 |
+--- a/net/mac80211/rx.c |
8078 |
++++ b/net/mac80211/rx.c |
8079 |
+@@ -2780,6 +2780,9 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx, |
8080 |
+ case NL80211_IFTYPE_ADHOC: |
8081 |
+ if (!bssid) |
8082 |
+ return 0; |
8083 |
++ if (compare_ether_addr(sdata->vif.addr, hdr->addr2) == 0 || |
8084 |
++ compare_ether_addr(sdata->u.ibss.bssid, hdr->addr2) == 0) |
8085 |
++ return 0; |
8086 |
+ if (ieee80211_is_beacon(hdr->frame_control)) { |
8087 |
+ return 1; |
8088 |
+ } |
8089 |
+diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c |
8090 |
+index 5279300..0aeea49 100644 |
8091 |
+--- a/net/mac80211/scan.c |
8092 |
++++ b/net/mac80211/scan.c |
8093 |
+@@ -224,6 +224,9 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local) |
8094 |
+ enum ieee80211_band band; |
8095 |
+ int i, ielen, n_chans; |
8096 |
+ |
8097 |
++ if (test_bit(SCAN_HW_CANCELLED, &local->scanning)) |
8098 |
++ return false; |
8099 |
++ |
8100 |
+ do { |
8101 |
+ if (local->hw_scan_band == IEEE80211_NUM_BANDS) |
8102 |
+ return false; |
8103 |
+@@ -815,7 +818,23 @@ void ieee80211_scan_cancel(struct ieee80211_local *local) |
8104 |
+ if (!local->scan_req) |
8105 |
+ goto out; |
8106 |
+ |
8107 |
++ /* |
8108 |
++ * We have a scan running and the driver already reported completion, |
8109 |
++ * but the worker hasn't run yet or is stuck on the mutex - mark it as |
8110 |
++ * cancelled. |
8111 |
++ */ |
8112 |
++ if (test_bit(SCAN_HW_SCANNING, &local->scanning) && |
8113 |
++ test_bit(SCAN_COMPLETED, &local->scanning)) { |
8114 |
++ set_bit(SCAN_HW_CANCELLED, &local->scanning); |
8115 |
++ goto out; |
8116 |
++ } |
8117 |
++ |
8118 |
+ if (test_bit(SCAN_HW_SCANNING, &local->scanning)) { |
8119 |
++ /* |
8120 |
++ * Make sure that __ieee80211_scan_completed doesn't trigger a |
8121 |
++ * scan on another band. |
8122 |
++ */ |
8123 |
++ set_bit(SCAN_HW_CANCELLED, &local->scanning); |
8124 |
+ if (local->ops->cancel_hw_scan) |
8125 |
+ drv_cancel_hw_scan(local, local->scan_sdata); |
8126 |
+ goto out; |
8127 |
+diff --git a/net/mac80211/status.c b/net/mac80211/status.c |
8128 |
+index 67df50e..1a49354 100644 |
8129 |
+--- a/net/mac80211/status.c |
8130 |
++++ b/net/mac80211/status.c |
8131 |
+@@ -181,6 +181,9 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb) |
8132 |
+ struct ieee80211_local *local = sta->local; |
8133 |
+ struct ieee80211_sub_if_data *sdata = sta->sdata; |
8134 |
+ |
8135 |
++ if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) |
8136 |
++ sta->last_rx = jiffies; |
8137 |
++ |
8138 |
+ if (ieee80211_is_data_qos(mgmt->frame_control)) { |
8139 |
+ struct ieee80211_hdr *hdr = (void *) skb->data; |
8140 |
+ u8 *qc = ieee80211_get_qos_ctl(hdr); |
8141 |
+diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c |
8142 |
+index 93faf6a..4a8c55b 100644 |
8143 |
+--- a/net/netfilter/nf_conntrack_sip.c |
8144 |
++++ b/net/netfilter/nf_conntrack_sip.c |
8145 |
+@@ -1468,7 +1468,7 @@ static int sip_help_tcp(struct sk_buff *skb, unsigned int protoff, |
8146 |
+ |
8147 |
+ msglen = origlen = end - dptr; |
8148 |
+ if (msglen > datalen) |
8149 |
+- return NF_DROP; |
8150 |
++ return NF_ACCEPT; |
8151 |
+ |
8152 |
+ ret = process_sip_msg(skb, ct, dataoff, &dptr, &msglen); |
8153 |
+ if (ret != NF_ACCEPT) |
8154 |
+diff --git a/net/sctp/output.c b/net/sctp/output.c |
8155 |
+index 32ba8d0..cf3e22c 100644 |
8156 |
+--- a/net/sctp/output.c |
8157 |
++++ b/net/sctp/output.c |
8158 |
+@@ -518,7 +518,8 @@ int sctp_packet_transmit(struct sctp_packet *packet) |
8159 |
+ * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>. |
8160 |
+ */ |
8161 |
+ if (!sctp_checksum_disable) { |
8162 |
+- if (!(dst->dev->features & NETIF_F_SCTP_CSUM)) { |
8163 |
++ if (!(dst->dev->features & NETIF_F_SCTP_CSUM) || |
8164 |
++ (dst_xfrm(dst) != NULL) || packet->ipfragok) { |
8165 |
+ __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len); |
8166 |
+ |
8167 |
+ /* 3) Put the resultant value into the checksum field in the |
8168 |
+diff --git a/net/socket.c b/net/socket.c |
8169 |
+index cf546a3..bf7adaa 100644 |
8170 |
+--- a/net/socket.c |
8171 |
++++ b/net/socket.c |
8172 |
+@@ -1876,6 +1876,16 @@ struct used_address { |
8173 |
+ unsigned int name_len; |
8174 |
+ }; |
8175 |
+ |
8176 |
++static int copy_msghdr_from_user(struct msghdr *kmsg, |
8177 |
++ struct msghdr __user *umsg) |
8178 |
++{ |
8179 |
++ if (copy_from_user(kmsg, umsg, sizeof(struct msghdr))) |
8180 |
++ return -EFAULT; |
8181 |
++ if (kmsg->msg_namelen > sizeof(struct sockaddr_storage)) |
8182 |
++ return -EINVAL; |
8183 |
++ return 0; |
8184 |
++} |
8185 |
++ |
8186 |
+ static int ___sys_sendmsg(struct socket *sock, struct msghdr __user *msg, |
8187 |
+ struct msghdr *msg_sys, unsigned flags, |
8188 |
+ struct used_address *used_address) |
8189 |
+@@ -1894,8 +1904,11 @@ static int ___sys_sendmsg(struct socket *sock, struct msghdr __user *msg, |
8190 |
+ if (MSG_CMSG_COMPAT & flags) { |
8191 |
+ if (get_compat_msghdr(msg_sys, msg_compat)) |
8192 |
+ return -EFAULT; |
8193 |
+- } else if (copy_from_user(msg_sys, msg, sizeof(struct msghdr))) |
8194 |
+- return -EFAULT; |
8195 |
++ } else { |
8196 |
++ err = copy_msghdr_from_user(msg_sys, msg); |
8197 |
++ if (err) |
8198 |
++ return err; |
8199 |
++ } |
8200 |
+ |
8201 |
+ /* do not move before msg_sys is valid */ |
8202 |
+ err = -EMSGSIZE; |
8203 |
+@@ -2110,8 +2123,11 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg, |
8204 |
+ if (MSG_CMSG_COMPAT & flags) { |
8205 |
+ if (get_compat_msghdr(msg_sys, msg_compat)) |
8206 |
+ return -EFAULT; |
8207 |
+- } else if (copy_from_user(msg_sys, msg, sizeof(struct msghdr))) |
8208 |
+- return -EFAULT; |
8209 |
++ } else { |
8210 |
++ err = copy_msghdr_from_user(msg_sys, msg); |
8211 |
++ if (err) |
8212 |
++ return err; |
8213 |
++ } |
8214 |
+ |
8215 |
+ err = -EMSGSIZE; |
8216 |
+ if (msg_sys->msg_iovlen > UIO_MAXIOV) |
8217 |
+diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c |
8218 |
+index 5611563..5122b22 100644 |
8219 |
+--- a/net/unix/af_unix.c |
8220 |
++++ b/net/unix/af_unix.c |
8221 |
+@@ -1236,6 +1236,15 @@ static int unix_socketpair(struct socket *socka, struct socket *sockb) |
8222 |
+ return 0; |
8223 |
+ } |
8224 |
+ |
8225 |
++static void unix_sock_inherit_flags(const struct socket *old, |
8226 |
++ struct socket *new) |
8227 |
++{ |
8228 |
++ if (test_bit(SOCK_PASSCRED, &old->flags)) |
8229 |
++ set_bit(SOCK_PASSCRED, &new->flags); |
8230 |
++ if (test_bit(SOCK_PASSSEC, &old->flags)) |
8231 |
++ set_bit(SOCK_PASSSEC, &new->flags); |
8232 |
++} |
8233 |
++ |
8234 |
+ static int unix_accept(struct socket *sock, struct socket *newsock, int flags) |
8235 |
+ { |
8236 |
+ struct sock *sk = sock->sk; |
8237 |
+@@ -1270,6 +1279,7 @@ static int unix_accept(struct socket *sock, struct socket *newsock, int flags) |
8238 |
+ /* attach accepted sock to socket */ |
8239 |
+ unix_state_lock(tsk); |
8240 |
+ newsock->state = SS_CONNECTED; |
8241 |
++ unix_sock_inherit_flags(sock, newsock); |
8242 |
+ sock_graft(tsk, newsock); |
8243 |
+ unix_state_unlock(tsk); |
8244 |
+ return 0; |
8245 |
+diff --git a/net/wireless/radiotap.c b/net/wireless/radiotap.c |
8246 |
+index c4ad795..617a310 100644 |
8247 |
+--- a/net/wireless/radiotap.c |
8248 |
++++ b/net/wireless/radiotap.c |
8249 |
+@@ -95,6 +95,10 @@ int ieee80211_radiotap_iterator_init( |
8250 |
+ struct ieee80211_radiotap_header *radiotap_header, |
8251 |
+ int max_length, const struct ieee80211_radiotap_vendor_namespaces *vns) |
8252 |
+ { |
8253 |
++ /* check the radiotap header can actually be present */ |
8254 |
++ if (max_length < sizeof(struct ieee80211_radiotap_header)) |
8255 |
++ return -EINVAL; |
8256 |
++ |
8257 |
+ /* Linux only supports version 0 radiotap format */ |
8258 |
+ if (radiotap_header->it_version) |
8259 |
+ return -EINVAL; |
8260 |
+@@ -129,7 +133,8 @@ int ieee80211_radiotap_iterator_init( |
8261 |
+ */ |
8262 |
+ |
8263 |
+ if ((unsigned long)iterator->_arg - |
8264 |
+- (unsigned long)iterator->_rtheader > |
8265 |
++ (unsigned long)iterator->_rtheader + |
8266 |
++ sizeof(uint32_t) > |
8267 |
+ (unsigned long)iterator->_max_length) |
8268 |
+ return -EINVAL; |
8269 |
+ } |
8270 |
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
8271 |
+index 1b43fde..92c913d 100644 |
8272 |
+--- a/sound/pci/hda/patch_realtek.c |
8273 |
++++ b/sound/pci/hda/patch_realtek.c |
8274 |
+@@ -5798,6 +5798,8 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = { |
8275 |
+ SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE), |
8276 |
+ SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), |
8277 |
+ SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), |
8278 |
++ SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_ASUS_MODE4), |
8279 |
++ SND_PCI_QUIRK(0x1043, 0x1bf3, "ASUS N76VZ", ALC662_FIXUP_ASUS_MODE4), |
8280 |
+ SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT), |
8281 |
+ SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2), |
8282 |
+ SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), |
8283 |
+diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c |
8284 |
+index 3642e06..e44c0e3 100644 |
8285 |
+--- a/sound/soc/codecs/wm_hubs.c |
8286 |
++++ b/sound/soc/codecs/wm_hubs.c |
8287 |
+@@ -414,6 +414,7 @@ static int hp_supply_event(struct snd_soc_dapm_widget *w, |
8288 |
+ hubs->hp_startup_mode); |
8289 |
+ break; |
8290 |
+ } |
8291 |
++ break; |
8292 |
+ |
8293 |
+ case SND_SOC_DAPM_PRE_PMD: |
8294 |
+ snd_soc_update_bits(codec, WM8993_CHARGE_PUMP_1, |
8295 |
+diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c |
8296 |
+index b516488..1d83a40 100644 |
8297 |
+--- a/sound/soc/soc-dapm.c |
8298 |
++++ b/sound/soc/soc-dapm.c |
8299 |
+@@ -1523,7 +1523,7 @@ static ssize_t dapm_widget_power_read_file(struct file *file, |
8300 |
+ w->active ? "active" : "inactive"); |
8301 |
+ |
8302 |
+ list_for_each_entry(p, &w->sources, list_sink) { |
8303 |
+- if (p->connected && !p->connected(w, p->sink)) |
8304 |
++ if (p->connected && !p->connected(w, p->source)) |
8305 |
+ continue; |
8306 |
+ |
8307 |
+ if (p->connect) |
8308 |
+diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c |
8309 |
+index d5724d8..1226631 100644 |
8310 |
+--- a/sound/usb/usx2y/usbusx2yaudio.c |
8311 |
++++ b/sound/usb/usx2y/usbusx2yaudio.c |
8312 |
+@@ -299,19 +299,6 @@ static void usX2Y_error_urb_status(struct usX2Ydev *usX2Y, |
8313 |
+ usX2Y_clients_stop(usX2Y); |
8314 |
+ } |
8315 |
+ |
8316 |
+-static void usX2Y_error_sequence(struct usX2Ydev *usX2Y, |
8317 |
+- struct snd_usX2Y_substream *subs, struct urb *urb) |
8318 |
+-{ |
8319 |
+- snd_printk(KERN_ERR |
8320 |
+-"Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n" |
8321 |
+-"Most propably some urb of usb-frame %i is still missing.\n" |
8322 |
+-"Cause could be too long delays in usb-hcd interrupt handling.\n", |
8323 |
+- usb_get_current_frame_number(usX2Y->dev), |
8324 |
+- subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", |
8325 |
+- usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame); |
8326 |
+- usX2Y_clients_stop(usX2Y); |
8327 |
+-} |
8328 |
+- |
8329 |
+ static void i_usX2Y_urb_complete(struct urb *urb) |
8330 |
+ { |
8331 |
+ struct snd_usX2Y_substream *subs = urb->context; |
8332 |
+@@ -328,12 +315,9 @@ static void i_usX2Y_urb_complete(struct urb *urb) |
8333 |
+ usX2Y_error_urb_status(usX2Y, subs, urb); |
8334 |
+ return; |
8335 |
+ } |
8336 |
+- if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF))) |
8337 |
+- subs->completed_urb = urb; |
8338 |
+- else { |
8339 |
+- usX2Y_error_sequence(usX2Y, subs, urb); |
8340 |
+- return; |
8341 |
+- } |
8342 |
++ |
8343 |
++ subs->completed_urb = urb; |
8344 |
++ |
8345 |
+ { |
8346 |
+ struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE], |
8347 |
+ *playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; |
8348 |
+diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c |
8349 |
+index a51340f..83a8b8d 100644 |
8350 |
+--- a/sound/usb/usx2y/usx2yhwdeppcm.c |
8351 |
++++ b/sound/usb/usx2y/usx2yhwdeppcm.c |
8352 |
+@@ -244,13 +244,8 @@ static void i_usX2Y_usbpcm_urb_complete(struct urb *urb) |
8353 |
+ usX2Y_error_urb_status(usX2Y, subs, urb); |
8354 |
+ return; |
8355 |
+ } |
8356 |
+- if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF))) |
8357 |
+- subs->completed_urb = urb; |
8358 |
+- else { |
8359 |
+- usX2Y_error_sequence(usX2Y, subs, urb); |
8360 |
+- return; |
8361 |
+- } |
8362 |
+ |
8363 |
++ subs->completed_urb = urb; |
8364 |
+ capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; |
8365 |
+ capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2]; |
8366 |
+ playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; |
8367 |
+diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c |
8368 |
+index 5177964..714fc35 100644 |
8369 |
+--- a/tools/perf/builtin-sched.c |
8370 |
++++ b/tools/perf/builtin-sched.c |
8371 |
+@@ -14,6 +14,7 @@ |
8372 |
+ #include "util/debug.h" |
8373 |
+ |
8374 |
+ #include <sys/prctl.h> |
8375 |
++#include <sys/resource.h> |
8376 |
+ |
8377 |
+ #include <semaphore.h> |
8378 |
+ #include <pthread.h> |
8379 |
|
8380 |
diff --git a/3.2.52/4420_grsecurity-3.0-3.2.52-201311261520.patch b/3.2.53/4420_grsecurity-3.0-3.2.53-201312011108.patch |
8381 |
similarity index 99% |
8382 |
rename from 3.2.52/4420_grsecurity-3.0-3.2.52-201311261520.patch |
8383 |
rename to 3.2.53/4420_grsecurity-3.0-3.2.53-201312011108.patch |
8384 |
index bb4bd2e..15444aa 100644 |
8385 |
--- a/3.2.52/4420_grsecurity-3.0-3.2.52-201311261520.patch |
8386 |
+++ b/3.2.53/4420_grsecurity-3.0-3.2.53-201312011108.patch |
8387 |
@@ -270,7 +270,7 @@ index 88fd7f5..b318a78 100644 |
8388 |
============================================================== |
8389 |
|
8390 |
diff --git a/Makefile b/Makefile |
8391 |
-index 1dd2c09..6f850c4 100644 |
8392 |
+index 90f57dc..1082409 100644 |
8393 |
--- a/Makefile |
8394 |
+++ b/Makefile |
8395 |
@@ -245,8 +245,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
8396 |
@@ -4742,7 +4742,7 @@ index 7ea75d1..5075226 100644 |
8397 |
return addr; |
8398 |
} |
8399 |
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c |
8400 |
-index f19e660..414fe24 100644 |
8401 |
+index cd8b02f..543008b 100644 |
8402 |
--- a/arch/parisc/kernel/traps.c |
8403 |
+++ b/arch/parisc/kernel/traps.c |
8404 |
@@ -733,9 +733,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs) |
8405 |
@@ -9496,23 +9496,6 @@ index 0032f92..cd151e0 100644 |
8406 |
|
8407 |
#ifdef CONFIG_64BIT |
8408 |
#define set_pud(pudptr, pudval) set_64bit((u64 *) (pudptr), pud_val(pudval)) |
8409 |
-diff --git a/arch/um/kernel/exitcode.c b/arch/um/kernel/exitcode.c |
8410 |
-index 829df49..41ebbfe 100644 |
8411 |
---- a/arch/um/kernel/exitcode.c |
8412 |
-+++ b/arch/um/kernel/exitcode.c |
8413 |
-@@ -40,9 +40,11 @@ static ssize_t exitcode_proc_write(struct file *file, |
8414 |
- const char __user *buffer, size_t count, loff_t *pos) |
8415 |
- { |
8416 |
- char *end, buf[sizeof("nnnnn\0")]; |
8417 |
-+ size_t size; |
8418 |
- int tmp; |
8419 |
- |
8420 |
-- if (copy_from_user(buf, buffer, count)) |
8421 |
-+ size = min(count, sizeof(buf)); |
8422 |
-+ if (copy_from_user(buf, buffer, size)) |
8423 |
- return -EFAULT; |
8424 |
- |
8425 |
- tmp = simple_strtol(buf, &end, 0); |
8426 |
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c |
8427 |
index c533835..84db18e 100644 |
8428 |
--- a/arch/um/kernel/process.c |
8429 |
@@ -12187,7 +12170,7 @@ index 30d737e..9830a9b 100644 |
8430 |
static inline void __user *compat_ptr(compat_uptr_t uptr) |
8431 |
{ |
8432 |
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h |
8433 |
-index 0c3b775..8cadbc6 100644 |
8434 |
+index a315f1c..540df6a 100644 |
8435 |
--- a/arch/x86/include/asm/cpufeature.h |
8436 |
+++ b/arch/x86/include/asm/cpufeature.h |
8437 |
@@ -197,8 +197,9 @@ |
8438 |
@@ -33707,7 +33690,7 @@ index da3cfee..a5a6606 100644 |
8439 |
|
8440 |
*ppos = i; |
8441 |
diff --git a/drivers/char/random.c b/drivers/char/random.c |
8442 |
-index b651733..788c4ba 100644 |
8443 |
+index c244f0e..255f226 100644 |
8444 |
--- a/drivers/char/random.c |
8445 |
+++ b/drivers/char/random.c |
8446 |
@@ -269,8 +269,13 @@ |
8447 |
@@ -33984,184 +33967,6 @@ index c68b8ad..ef7a702 100644 |
8448 |
} |
8449 |
|
8450 |
static ssize_t port_fops_write(struct file *filp, const char __user *ubuf, |
8451 |
-diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c |
8452 |
-index 46bbf43..9954dff 100644 |
8453 |
---- a/drivers/connector/cn_proc.c |
8454 |
-+++ b/drivers/connector/cn_proc.c |
8455 |
-@@ -62,8 +62,9 @@ void proc_fork_connector(struct task_struct *task) |
8456 |
- if (atomic_read(&proc_event_num_listeners) < 1) |
8457 |
- return; |
8458 |
- |
8459 |
-- msg = (struct cn_msg*)buffer; |
8460 |
-- ev = (struct proc_event*)msg->data; |
8461 |
-+ msg = (struct cn_msg *)buffer; |
8462 |
-+ ev = (struct proc_event *)msg->data; |
8463 |
-+ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
8464 |
- get_seq(&msg->seq, &ev->cpu); |
8465 |
- ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
8466 |
- put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
8467 |
-@@ -79,6 +80,7 @@ void proc_fork_connector(struct task_struct *task) |
8468 |
- memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
8469 |
- msg->ack = 0; /* not used */ |
8470 |
- msg->len = sizeof(*ev); |
8471 |
-+ msg->flags = 0; /* not used */ |
8472 |
- /* If cn_netlink_send() failed, the data is not sent */ |
8473 |
- cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
8474 |
- } |
8475 |
-@@ -93,8 +95,9 @@ void proc_exec_connector(struct task_struct *task) |
8476 |
- if (atomic_read(&proc_event_num_listeners) < 1) |
8477 |
- return; |
8478 |
- |
8479 |
-- msg = (struct cn_msg*)buffer; |
8480 |
-- ev = (struct proc_event*)msg->data; |
8481 |
-+ msg = (struct cn_msg *)buffer; |
8482 |
-+ ev = (struct proc_event *)msg->data; |
8483 |
-+ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
8484 |
- get_seq(&msg->seq, &ev->cpu); |
8485 |
- ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
8486 |
- put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
8487 |
-@@ -105,6 +108,7 @@ void proc_exec_connector(struct task_struct *task) |
8488 |
- memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
8489 |
- msg->ack = 0; /* not used */ |
8490 |
- msg->len = sizeof(*ev); |
8491 |
-+ msg->flags = 0; /* not used */ |
8492 |
- cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
8493 |
- } |
8494 |
- |
8495 |
-@@ -119,8 +123,9 @@ void proc_id_connector(struct task_struct *task, int which_id) |
8496 |
- if (atomic_read(&proc_event_num_listeners) < 1) |
8497 |
- return; |
8498 |
- |
8499 |
-- msg = (struct cn_msg*)buffer; |
8500 |
-- ev = (struct proc_event*)msg->data; |
8501 |
-+ msg = (struct cn_msg *)buffer; |
8502 |
-+ ev = (struct proc_event *)msg->data; |
8503 |
-+ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
8504 |
- ev->what = which_id; |
8505 |
- ev->event_data.id.process_pid = task->pid; |
8506 |
- ev->event_data.id.process_tgid = task->tgid; |
8507 |
-@@ -144,6 +149,7 @@ void proc_id_connector(struct task_struct *task, int which_id) |
8508 |
- memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
8509 |
- msg->ack = 0; /* not used */ |
8510 |
- msg->len = sizeof(*ev); |
8511 |
-+ msg->flags = 0; /* not used */ |
8512 |
- cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
8513 |
- } |
8514 |
- |
8515 |
-@@ -159,6 +165,7 @@ void proc_sid_connector(struct task_struct *task) |
8516 |
- |
8517 |
- msg = (struct cn_msg *)buffer; |
8518 |
- ev = (struct proc_event *)msg->data; |
8519 |
-+ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
8520 |
- get_seq(&msg->seq, &ev->cpu); |
8521 |
- ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
8522 |
- put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
8523 |
-@@ -169,6 +176,7 @@ void proc_sid_connector(struct task_struct *task) |
8524 |
- memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
8525 |
- msg->ack = 0; /* not used */ |
8526 |
- msg->len = sizeof(*ev); |
8527 |
-+ msg->flags = 0; /* not used */ |
8528 |
- cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
8529 |
- } |
8530 |
- |
8531 |
-@@ -184,6 +192,7 @@ void proc_ptrace_connector(struct task_struct *task, int ptrace_id) |
8532 |
- |
8533 |
- msg = (struct cn_msg *)buffer; |
8534 |
- ev = (struct proc_event *)msg->data; |
8535 |
-+ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
8536 |
- get_seq(&msg->seq, &ev->cpu); |
8537 |
- ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
8538 |
- put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
8539 |
-@@ -202,6 +211,7 @@ void proc_ptrace_connector(struct task_struct *task, int ptrace_id) |
8540 |
- memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
8541 |
- msg->ack = 0; /* not used */ |
8542 |
- msg->len = sizeof(*ev); |
8543 |
-+ msg->flags = 0; /* not used */ |
8544 |
- cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
8545 |
- } |
8546 |
- |
8547 |
-@@ -217,6 +227,7 @@ void proc_comm_connector(struct task_struct *task) |
8548 |
- |
8549 |
- msg = (struct cn_msg *)buffer; |
8550 |
- ev = (struct proc_event *)msg->data; |
8551 |
-+ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
8552 |
- get_seq(&msg->seq, &ev->cpu); |
8553 |
- ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
8554 |
- put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
8555 |
-@@ -228,6 +239,7 @@ void proc_comm_connector(struct task_struct *task) |
8556 |
- memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
8557 |
- msg->ack = 0; /* not used */ |
8558 |
- msg->len = sizeof(*ev); |
8559 |
-+ msg->flags = 0; /* not used */ |
8560 |
- cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
8561 |
- } |
8562 |
- |
8563 |
-@@ -241,8 +253,9 @@ void proc_exit_connector(struct task_struct *task) |
8564 |
- if (atomic_read(&proc_event_num_listeners) < 1) |
8565 |
- return; |
8566 |
- |
8567 |
-- msg = (struct cn_msg*)buffer; |
8568 |
-- ev = (struct proc_event*)msg->data; |
8569 |
-+ msg = (struct cn_msg *)buffer; |
8570 |
-+ ev = (struct proc_event *)msg->data; |
8571 |
-+ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
8572 |
- get_seq(&msg->seq, &ev->cpu); |
8573 |
- ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
8574 |
- put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
8575 |
-@@ -255,6 +268,7 @@ void proc_exit_connector(struct task_struct *task) |
8576 |
- memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
8577 |
- msg->ack = 0; /* not used */ |
8578 |
- msg->len = sizeof(*ev); |
8579 |
-+ msg->flags = 0; /* not used */ |
8580 |
- cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
8581 |
- } |
8582 |
- |
8583 |
-@@ -276,8 +290,9 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack) |
8584 |
- if (atomic_read(&proc_event_num_listeners) < 1) |
8585 |
- return; |
8586 |
- |
8587 |
-- msg = (struct cn_msg*)buffer; |
8588 |
-- ev = (struct proc_event*)msg->data; |
8589 |
-+ msg = (struct cn_msg *)buffer; |
8590 |
-+ ev = (struct proc_event *)msg->data; |
8591 |
-+ memset(&ev->event_data, 0, sizeof(ev->event_data)); |
8592 |
- msg->seq = rcvd_seq; |
8593 |
- ktime_get_ts(&ts); /* get high res monotonic timestamp */ |
8594 |
- put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns); |
8595 |
-@@ -287,6 +302,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack) |
8596 |
- memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id)); |
8597 |
- msg->ack = rcvd_ack + 1; |
8598 |
- msg->len = sizeof(*ev); |
8599 |
-+ msg->flags = 0; /* not used */ |
8600 |
- cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL); |
8601 |
- } |
8602 |
- |
8603 |
-diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c |
8604 |
-index dde6a0f..ea6efe8 100644 |
8605 |
---- a/drivers/connector/connector.c |
8606 |
-+++ b/drivers/connector/connector.c |
8607 |
-@@ -157,17 +157,18 @@ static int cn_call_callback(struct sk_buff *skb) |
8608 |
- static void cn_rx_skb(struct sk_buff *__skb) |
8609 |
- { |
8610 |
- struct nlmsghdr *nlh; |
8611 |
-- int err; |
8612 |
- struct sk_buff *skb; |
8613 |
-+ int len, err; |
8614 |
- |
8615 |
- skb = skb_get(__skb); |
8616 |
- |
8617 |
- if (skb->len >= NLMSG_SPACE(0)) { |
8618 |
- nlh = nlmsg_hdr(skb); |
8619 |
-+ len = nlmsg_len(nlh); |
8620 |
- |
8621 |
-- if (nlh->nlmsg_len < sizeof(struct cn_msg) || |
8622 |
-+ if (len < (int)sizeof(struct cn_msg) || |
8623 |
- skb->len < nlh->nlmsg_len || |
8624 |
-- nlh->nlmsg_len > CONNECTOR_MAX_MSG_SIZE) { |
8625 |
-+ len > CONNECTOR_MAX_MSG_SIZE) { |
8626 |
- kfree_skb(skb); |
8627 |
- return; |
8628 |
- } |
8629 |
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c |
8630 |
index 56c6c6b..99056e6 100644 |
8631 |
--- a/drivers/cpufreq/acpi-cpufreq.c |
8632 |
@@ -35077,7 +34882,7 @@ index 11788f7..cd469eb 100644 |
8633 |
dev = crtc->dev; |
8634 |
|
8635 |
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c |
8636 |
-index 40c187c..59da444 100644 |
8637 |
+index acfe567..6fd273c1 100644 |
8638 |
--- a/drivers/gpu/drm/drm_drv.c |
8639 |
+++ b/drivers/gpu/drm/drm_drv.c |
8640 |
@@ -308,7 +308,7 @@ module_exit(drm_core_exit); |
8641 |
@@ -36044,7 +35849,7 @@ index a9e33ce..09edd4b 100644 |
8642 |
|
8643 |
#endif |
8644 |
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c |
8645 |
-index a68057a..f3e26dd 100644 |
8646 |
+index 5efba47..aaaf339 100644 |
8647 |
--- a/drivers/gpu/drm/radeon/evergreen.c |
8648 |
+++ b/drivers/gpu/drm/radeon/evergreen.c |
8649 |
@@ -3094,7 +3094,9 @@ static int evergreen_startup(struct radeon_device *rdev) |
8650 |
@@ -36897,10 +36702,10 @@ index 66f6729..4de8c4a 100644 |
8651 |
int res = 0; |
8652 |
|
8653 |
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c |
8654 |
-index 30cac58..f6406b3 100644 |
8655 |
+index 0b86d47..8066c3f 100644 |
8656 |
--- a/drivers/hwmon/applesmc.c |
8657 |
+++ b/drivers/hwmon/applesmc.c |
8658 |
-@@ -1069,7 +1069,7 @@ static int applesmc_create_nodes(struct applesmc_node_group *groups, int num) |
8659 |
+@@ -1082,7 +1082,7 @@ static int applesmc_create_nodes(struct applesmc_node_group *groups, int num) |
8660 |
{ |
8661 |
struct applesmc_node_group *grp; |
8662 |
struct applesmc_dev_attr *node; |
8663 |
@@ -41980,30 +41785,6 @@ index e662cbc..8d4a102 100644 |
8664 |
return -EINVAL; |
8665 |
} |
8666 |
|
8667 |
-diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c |
8668 |
-index ebb9f24..7a4c491 100644 |
8669 |
---- a/drivers/net/wan/farsync.c |
8670 |
-+++ b/drivers/net/wan/farsync.c |
8671 |
-@@ -1972,6 +1972,7 @@ fst_get_iface(struct fst_card_info *card, struct fst_port_info *port, |
8672 |
- } |
8673 |
- |
8674 |
- i = port->index; |
8675 |
-+ memset(&sync, 0, sizeof(sync)); |
8676 |
- sync.clock_rate = FST_RDL(card, portConfig[i].lineSpeed); |
8677 |
- /* Lucky card and linux use same encoding here */ |
8678 |
- sync.clock_type = FST_RDB(card, portConfig[i].internalClock) == |
8679 |
-diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c |
8680 |
-index 44b7071..c643d77 100644 |
8681 |
---- a/drivers/net/wan/wanxl.c |
8682 |
-+++ b/drivers/net/wan/wanxl.c |
8683 |
-@@ -355,6 +355,7 @@ static int wanxl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) |
8684 |
- ifr->ifr_settings.size = size; /* data size wanted */ |
8685 |
- return -ENOBUFS; |
8686 |
- } |
8687 |
-+ memset(&line, 0, sizeof(line)); |
8688 |
- line.clock_type = get_status(port)->clocking; |
8689 |
- line.clock_rate = 0; |
8690 |
- line.loopback = 0; |
8691 |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c |
8692 |
index ac1176a..79e93d4 100644 |
8693 |
--- a/drivers/net/wireless/airo.c |
8694 |
@@ -43496,7 +43277,7 @@ index 2836538..30edf9d 100644 |
8695 |
ret = sysfs_create_bin_file(&pdev->dev.kobj, &m48t59_nvram_attr); |
8696 |
if (ret) { |
8697 |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c |
8698 |
-index 705e13e..46f4afb 100644 |
8699 |
+index 2e658d2..46f4afb 100644 |
8700 |
--- a/drivers/scsi/aacraid/linit.c |
8701 |
+++ b/drivers/scsi/aacraid/linit.c |
8702 |
@@ -93,7 +93,7 @@ static DECLARE_PCI_DEVICE_TABLE(aac_pci_tbl) = { |
8703 |
@@ -43508,15 +43289,6 @@ index 705e13e..46f4afb 100644 |
8704 |
#endif |
8705 |
{ 0x1028, 0x0001, 0x1028, 0x0001, 0, 0, 0 }, /* PERC 2/Si (Iguana/PERC2Si) */ |
8706 |
{ 0x1028, 0x0002, 0x1028, 0x0002, 0, 0, 1 }, /* PERC 3/Di (Opal/PERC3Di) */ |
8707 |
-@@ -771,6 +771,8 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long |
8708 |
- static int aac_compat_ioctl(struct scsi_device *sdev, int cmd, void __user *arg) |
8709 |
- { |
8710 |
- struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata; |
8711 |
-+ if (!capable(CAP_SYS_RAWIO)) |
8712 |
-+ return -EPERM; |
8713 |
- return aac_compat_do_ioctl(dev, cmd, (unsigned long)arg); |
8714 |
- } |
8715 |
- |
8716 |
diff --git a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c |
8717 |
index 14b5f8d..cc9bd26 100644 |
8718 |
--- a/drivers/scsi/aic7xxx/aic79xx_pci.c |
8719 |
@@ -44557,18 +44329,6 @@ index b2ccdea..84cde75 100644 |
8720 |
|
8721 |
static u8 *buf; |
8722 |
|
8723 |
-diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c |
8724 |
-index 2fa658e..391b768 100644 |
8725 |
---- a/drivers/staging/bcm/Bcmchar.c |
8726 |
-+++ b/drivers/staging/bcm/Bcmchar.c |
8727 |
-@@ -1932,6 +1932,7 @@ cntrlEnd: |
8728 |
- |
8729 |
- BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Called IOCTL_BCM_GET_DEVICE_DRIVER_INFO\n"); |
8730 |
- |
8731 |
-+ memset(&DevInfo, 0, sizeof(DevInfo)); |
8732 |
- DevInfo.MaxRDMBufferSize = BUFFER_4K; |
8733 |
- DevInfo.u32DSDStartOffset = EEPROM_CALPARAM_START; |
8734 |
- DevInfo.u32RxAlignmentCorrection = 0; |
8735 |
diff --git a/drivers/staging/gma500/power.c b/drivers/staging/gma500/power.c |
8736 |
index 436fe97..4082570 100644 |
8737 |
--- a/drivers/staging/gma500/power.c |
8738 |
@@ -44931,59 +44691,6 @@ index df8ea25..47dd9c6 100644 |
8739 |
pDevice->apdev->netdev_ops = &apdev_netdev_ops; |
8740 |
|
8741 |
pDevice->apdev->type = ARPHRD_IEEE80211; |
8742 |
-diff --git a/drivers/staging/wlags49_h2/wl_priv.c b/drivers/staging/wlags49_h2/wl_priv.c |
8743 |
-index 260d4f0..ed836c2 100644 |
8744 |
---- a/drivers/staging/wlags49_h2/wl_priv.c |
8745 |
-+++ b/drivers/staging/wlags49_h2/wl_priv.c |
8746 |
-@@ -570,6 +570,7 @@ int wvlan_uil_put_info( struct uilreq *urq, struct wl_private *lp ) |
8747 |
- ltv_t *pLtv; |
8748 |
- bool_t ltvAllocated = FALSE; |
8749 |
- ENCSTRCT sEncryption; |
8750 |
-+ size_t len; |
8751 |
- |
8752 |
- #ifdef USE_WDS |
8753 |
- hcf_16 hcfPort = HCF_PORT_0; |
8754 |
-@@ -685,9 +686,10 @@ int wvlan_uil_put_info( struct uilreq *urq, struct wl_private *lp ) |
8755 |
- pLtv->u.u16[0] = CNV_INT_TO_LITTLE( pLtv->u.u16[0] ); |
8756 |
- break; |
8757 |
- case CFG_CNF_OWN_NAME: |
8758 |
-- memset( lp->StationName, 0, sizeof( lp->StationName )); |
8759 |
-- memcpy( (void *)lp->StationName, (void *)&pLtv->u.u8[2], (size_t)pLtv->u.u16[0]); |
8760 |
-- pLtv->u.u16[0] = CNV_INT_TO_LITTLE( pLtv->u.u16[0] ); |
8761 |
-+ memset(lp->StationName, 0, sizeof(lp->StationName)); |
8762 |
-+ len = min_t(size_t, pLtv->u.u16[0], sizeof(lp->StationName)); |
8763 |
-+ strlcpy(lp->StationName, &pLtv->u.u8[2], len); |
8764 |
-+ pLtv->u.u16[0] = CNV_INT_TO_LITTLE(pLtv->u.u16[0]); |
8765 |
- break; |
8766 |
- case CFG_CNF_LOAD_BALANCING: |
8767 |
- lp->loadBalancing = pLtv->u.u16[0]; |
8768 |
-@@ -1798,9 +1800,10 @@ int wvlan_set_station_nickname(struct net_device *dev, |
8769 |
- union iwreq_data *wrqu, |
8770 |
- char *extra) |
8771 |
- { |
8772 |
-- struct wl_private *lp = wl_priv(dev); |
8773 |
-- unsigned long flags; |
8774 |
-- int ret = 0; |
8775 |
-+ struct wl_private *lp = wl_priv(dev); |
8776 |
-+ unsigned long flags; |
8777 |
-+ size_t len; |
8778 |
-+ int ret = 0; |
8779 |
- /*------------------------------------------------------------------------*/ |
8780 |
- |
8781 |
- |
8782 |
-@@ -1809,9 +1812,9 @@ int wvlan_set_station_nickname(struct net_device *dev, |
8783 |
- |
8784 |
- wl_lock(lp, &flags); |
8785 |
- |
8786 |
-- memset( lp->StationName, 0, sizeof( lp->StationName )); |
8787 |
-- |
8788 |
-- memcpy( lp->StationName, extra, wrqu->data.length); |
8789 |
-+ memset(lp->StationName, 0, sizeof(lp->StationName)); |
8790 |
-+ len = min_t(size_t, wrqu->data.length, sizeof(lp->StationName)); |
8791 |
-+ strlcpy(lp->StationName, extra, len); |
8792 |
- |
8793 |
- /* Commit the adapter parameters */ |
8794 |
- wl_apply( lp ); |
8795 |
diff --git a/drivers/staging/zcache/tmem.c b/drivers/staging/zcache/tmem.c |
8796 |
index 1ca66ea..76f1343 100644 |
8797 |
--- a/drivers/staging/zcache/tmem.c |
8798 |
@@ -45849,7 +45556,7 @@ index 65447c5..0526f0a 100644 |
8799 |
ret = -EPERM; |
8800 |
goto reterr; |
8801 |
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c |
8802 |
-index a783d53..45f96c9 100644 |
8803 |
+index af57648..2b62a69 100644 |
8804 |
--- a/drivers/uio/uio.c |
8805 |
+++ b/drivers/uio/uio.c |
8806 |
@@ -25,6 +25,7 @@ |
8807 |
@@ -45949,36 +45656,7 @@ index a783d53..45f96c9 100644 |
8808 |
} |
8809 |
|
8810 |
static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf) |
8811 |
-@@ -650,16 +655,27 @@ static int uio_mmap_physical(struct vm_area_struct *vma) |
8812 |
- { |
8813 |
- struct uio_device *idev = vma->vm_private_data; |
8814 |
- int mi = uio_find_mem_index(vma); |
8815 |
-+ struct uio_mem *mem; |
8816 |
- if (mi < 0) |
8817 |
- return -EINVAL; |
8818 |
-+ mem = idev->info->mem + mi; |
8819 |
- |
8820 |
- vma->vm_flags |= VM_IO | VM_RESERVED; |
8821 |
- |
8822 |
- vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
8823 |
- |
8824 |
-+ /* |
8825 |
-+ * We cannot use the vm_iomap_memory() helper here, |
8826 |
-+ * because vma->vm_pgoff is the map index we looked |
8827 |
-+ * up above in uio_find_mem_index(), rather than an |
8828 |
-+ * actual page offset into the mmap. |
8829 |
-+ * |
8830 |
-+ * So we just do the physical mmap without a page |
8831 |
-+ * offset. |
8832 |
-+ */ |
8833 |
- return remap_pfn_range(vma, |
8834 |
- vma->vm_start, |
8835 |
-- idev->info->mem[mi].addr >> PAGE_SHIFT, |
8836 |
-+ mem->addr >> PAGE_SHIFT, |
8837 |
- vma->vm_end - vma->vm_start, |
8838 |
- vma->vm_page_prot); |
8839 |
- } |
8840 |
-@@ -821,7 +837,7 @@ int __uio_register_device(struct module *owner, |
8841 |
+@@ -833,7 +838,7 @@ int __uio_register_device(struct module *owner, |
8842 |
idev->owner = owner; |
8843 |
idev->info = info; |
8844 |
init_waitqueue_head(&idev->wait); |
8845 |
@@ -46490,95 +46168,6 @@ index 46f72ed..107788d 100644 |
8846 |
|
8847 |
return 0; |
8848 |
} |
8849 |
-diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c |
8850 |
-index 649cb35..1be8b5d 100644 |
8851 |
---- a/drivers/video/au1100fb.c |
8852 |
-+++ b/drivers/video/au1100fb.c |
8853 |
-@@ -387,39 +387,13 @@ void au1100fb_fb_rotate(struct fb_info *fbi, int angle) |
8854 |
- int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) |
8855 |
- { |
8856 |
- struct au1100fb_device *fbdev; |
8857 |
-- unsigned int len; |
8858 |
-- unsigned long start=0, off; |
8859 |
- |
8860 |
- fbdev = to_au1100fb_device(fbi); |
8861 |
- |
8862 |
-- if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) { |
8863 |
-- return -EINVAL; |
8864 |
-- } |
8865 |
-- |
8866 |
-- start = fbdev->fb_phys & PAGE_MASK; |
8867 |
-- len = PAGE_ALIGN((start & ~PAGE_MASK) + fbdev->fb_len); |
8868 |
-- |
8869 |
-- off = vma->vm_pgoff << PAGE_SHIFT; |
8870 |
-- |
8871 |
-- if ((vma->vm_end - vma->vm_start + off) > len) { |
8872 |
-- return -EINVAL; |
8873 |
-- } |
8874 |
-- |
8875 |
-- off += start; |
8876 |
-- vma->vm_pgoff = off >> PAGE_SHIFT; |
8877 |
-- |
8878 |
- vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
8879 |
- pgprot_val(vma->vm_page_prot) |= (6 << 9); //CCA=6 |
8880 |
- |
8881 |
-- vma->vm_flags |= VM_IO; |
8882 |
-- |
8883 |
-- if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, |
8884 |
-- vma->vm_end - vma->vm_start, |
8885 |
-- vma->vm_page_prot)) { |
8886 |
-- return -EAGAIN; |
8887 |
-- } |
8888 |
-- |
8889 |
-- return 0; |
8890 |
-+ return vm_iomap_memory(vma, fbdev->fb_phys, fbdev->fb_len); |
8891 |
- } |
8892 |
- |
8893 |
- static struct fb_ops au1100fb_ops = |
8894 |
-diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c |
8895 |
-index 7200559..5bd7d88 100644 |
8896 |
---- a/drivers/video/au1200fb.c |
8897 |
-+++ b/drivers/video/au1200fb.c |
8898 |
-@@ -1216,38 +1216,13 @@ static int au1200fb_fb_blank(int blank_mode, struct fb_info *fbi) |
8899 |
- * method mainly to allow the use of the TLB streaming flag (CCA=6) |
8900 |
- */ |
8901 |
- static int au1200fb_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) |
8902 |
-- |
8903 |
- { |
8904 |
-- unsigned int len; |
8905 |
-- unsigned long start=0, off; |
8906 |
- struct au1200fb_device *fbdev = info->par; |
8907 |
- |
8908 |
-- if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) { |
8909 |
-- return -EINVAL; |
8910 |
-- } |
8911 |
-- |
8912 |
-- start = fbdev->fb_phys & PAGE_MASK; |
8913 |
-- len = PAGE_ALIGN((start & ~PAGE_MASK) + fbdev->fb_len); |
8914 |
-- |
8915 |
-- off = vma->vm_pgoff << PAGE_SHIFT; |
8916 |
-- |
8917 |
-- if ((vma->vm_end - vma->vm_start + off) > len) { |
8918 |
-- return -EINVAL; |
8919 |
-- } |
8920 |
-- |
8921 |
-- off += start; |
8922 |
-- vma->vm_pgoff = off >> PAGE_SHIFT; |
8923 |
-- |
8924 |
- vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
8925 |
- pgprot_val(vma->vm_page_prot) |= _CACHE_MASK; /* CCA=7 */ |
8926 |
- |
8927 |
-- vma->vm_flags |= VM_IO; |
8928 |
-- |
8929 |
-- return io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, |
8930 |
-- vma->vm_end - vma->vm_start, |
8931 |
-- vma->vm_page_prot); |
8932 |
-- |
8933 |
-- return 0; |
8934 |
-+ return vm_iomap_memory(vma, fbdev->fb_phys, fbdev->fb_len); |
8935 |
- } |
8936 |
- |
8937 |
- static void set_global(u_int cmd, struct au1200_lcd_global_regs_t *pdata) |
8938 |
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c |
8939 |
index 7363c1b..b69ad66 100644 |
8940 |
--- a/drivers/video/backlight/backlight.c |
8941 |
@@ -49625,7 +49214,7 @@ index 28b1c6c..b9939d9 100644 |
8942 |
FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_COPYAREA; |
8943 |
break; |
8944 |
diff --git a/drivers/video/smscufx.c b/drivers/video/smscufx.c |
8945 |
-index dd9533a..aff3199 100644 |
8946 |
+index dd9533a..aff3199e 100644 |
8947 |
--- a/drivers/video/smscufx.c |
8948 |
+++ b/drivers/video/smscufx.c |
8949 |
@@ -1172,7 +1172,9 @@ static int ufx_ops_release(struct fb_info *info, int user) |
8950 |
@@ -52514,31 +52103,28 @@ index a9be90d..3cf866c 100644 |
8951 |
/* Free the char* */ |
8952 |
kfree(buf); |
8953 |
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c |
8954 |
-index ac1ad48..d80e1db 100644 |
8955 |
+index 5ce56e7..d80e1db 100644 |
8956 |
--- a/fs/ecryptfs/keystore.c |
8957 |
+++ b/fs/ecryptfs/keystore.c |
8958 |
-@@ -1151,8 +1151,8 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, |
8959 |
- struct ecryptfs_msg_ctx *msg_ctx; |
8960 |
+@@ -1152,7 +1152,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, |
8961 |
struct ecryptfs_message *msg = NULL; |
8962 |
char *auth_tok_sig; |
8963 |
-- char *payload; |
8964 |
+ char *payload = NULL; |
8965 |
- size_t payload_len; |
8966 |
-+ char *payload = NULL; |
8967 |
+ size_t payload_len = 0; |
8968 |
int rc; |
8969 |
|
8970 |
rc = ecryptfs_get_auth_tok_sig(&auth_tok_sig, auth_tok); |
8971 |
-@@ -1204,8 +1204,8 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, |
8972 |
+@@ -1204,8 +1204,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, |
8973 |
crypt_stat->key_size); |
8974 |
} |
8975 |
out: |
8976 |
- if (msg) |
8977 |
- kfree(msg); |
8978 |
+ kfree(msg); |
8979 |
-+ kfree(payload); |
8980 |
+ kfree(payload); |
8981 |
return rc; |
8982 |
} |
8983 |
- |
8984 |
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c |
8985 |
index 94afdfd..bdb8854 100644 |
8986 |
--- a/fs/ecryptfs/main.c |
8987 |
@@ -53783,7 +53369,7 @@ index 2845a1f..f29de63 100644 |
8988 |
if (free_clusters >= (nclusters + dirty_clusters)) |
8989 |
return 1; |
8990 |
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h |
8991 |
-index 60b6ca5..bfa15a7 100644 |
8992 |
+index 22c71b9..ba28a7d 100644 |
8993 |
--- a/fs/ext4/ext4.h |
8994 |
+++ b/fs/ext4/ext4.h |
8995 |
@@ -1206,19 +1206,19 @@ struct ext4_sb_info { |
8996 |
@@ -54019,7 +53605,7 @@ index 84f84bf..a8770cd 100644 |
8997 |
static int __init ext4_init_feat_adverts(void) |
8998 |
{ |
8999 |
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c |
9000 |
-index d5498b2..14a9eca 100644 |
9001 |
+index b4e9f3f..14a9eca 100644 |
9002 |
--- a/fs/ext4/xattr.c |
9003 |
+++ b/fs/ext4/xattr.c |
9004 |
@@ -328,7 +328,7 @@ static int |
9005 |
@@ -54043,15 +53629,6 @@ index d5498b2..14a9eca 100644 |
9006 |
} |
9007 |
|
9008 |
static int |
9009 |
-@@ -1269,6 +1270,8 @@ retry: |
9010 |
- s_min_extra_isize) { |
9011 |
- tried_min_extra_isize++; |
9012 |
- new_extra_isize = s_min_extra_isize; |
9013 |
-+ kfree(is); is = NULL; |
9014 |
-+ kfree(bs); bs = NULL; |
9015 |
- goto retry; |
9016 |
- } |
9017 |
- error = -1; |
9018 |
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c |
9019 |
index 216b419..350a088 100644 |
9020 |
--- a/fs/fat/namei_msdos.c |
9021 |
@@ -57061,10 +56638,10 @@ index c45a2ea..1a6bd66 100644 |
9022 |
#ifdef CONFIG_PROC_FS |
9023 |
static int create_proc_exports_entry(void) |
9024 |
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c |
9025 |
-index 561a3dc..9c46c5e 100644 |
9026 |
+index 61b697e..eb6503c 100644 |
9027 |
--- a/fs/nfsd/vfs.c |
9028 |
+++ b/fs/nfsd/vfs.c |
9029 |
-@@ -915,7 +915,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, |
9030 |
+@@ -923,7 +923,7 @@ nfsd_vfs_read(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, |
9031 |
} else { |
9032 |
oldfs = get_fs(); |
9033 |
set_fs(KERNEL_DS); |
9034 |
@@ -57073,7 +56650,7 @@ index 561a3dc..9c46c5e 100644 |
9035 |
set_fs(oldfs); |
9036 |
} |
9037 |
|
9038 |
-@@ -1019,7 +1019,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, |
9039 |
+@@ -1027,7 +1027,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, |
9040 |
|
9041 |
/* Write the data. */ |
9042 |
oldfs = get_fs(); set_fs(KERNEL_DS); |
9043 |
@@ -57082,7 +56659,7 @@ index 561a3dc..9c46c5e 100644 |
9044 |
set_fs(oldfs); |
9045 |
if (host_err < 0) |
9046 |
goto out_nfserr; |
9047 |
-@@ -1560,7 +1560,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) |
9048 |
+@@ -1568,7 +1568,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) |
9049 |
*/ |
9050 |
|
9051 |
oldfs = get_fs(); set_fs(KERNEL_DS); |
9052 |
@@ -72260,11 +71837,11 @@ index d42bd48..554dcd5 100644 |
9053 |
/* |
9054 |
* epoll (fs/eventpoll.c) compat bits follow ... |
9055 |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h |
9056 |
-index dfadc96..23c5182 100644 |
9057 |
+index 643d6c4..3e46a17 100644 |
9058 |
--- a/include/linux/compiler-gcc4.h |
9059 |
+++ b/include/linux/compiler-gcc4.h |
9060 |
-@@ -31,6 +31,21 @@ |
9061 |
- |
9062 |
+@@ -46,6 +46,21 @@ |
9063 |
+ #endif |
9064 |
|
9065 |
#if __GNUC_MINOR__ >= 5 |
9066 |
+ |
9067 |
@@ -72285,7 +71862,7 @@ index dfadc96..23c5182 100644 |
9068 |
/* |
9069 |
* Mark a position in code as unreachable. This can be used to |
9070 |
* suppress control flow warnings after asm blocks that transfer |
9071 |
-@@ -46,6 +61,11 @@ |
9072 |
+@@ -61,6 +76,11 @@ |
9073 |
#define __noclone __attribute__((__noclone__)) |
9074 |
|
9075 |
#endif |
9076 |
@@ -72901,10 +72478,10 @@ index 8eeb205..13d571c 100644 |
9077 |
|
9078 |
#endif /* __KERNEL__ */ |
9079 |
diff --git a/include/linux/fs.h b/include/linux/fs.h |
9080 |
-index a276817..ba31358 100644 |
9081 |
+index dd74385..c745e49 100644 |
9082 |
--- a/include/linux/fs.h |
9083 |
+++ b/include/linux/fs.h |
9084 |
-@@ -1618,7 +1618,8 @@ struct file_operations { |
9085 |
+@@ -1624,7 +1624,8 @@ struct file_operations { |
9086 |
int (*setlease)(struct file *, long, struct file_lock **); |
9087 |
long (*fallocate)(struct file *file, int mode, loff_t offset, |
9088 |
loff_t len); |
9089 |
@@ -72914,7 +72491,7 @@ index a276817..ba31358 100644 |
9090 |
|
9091 |
struct inode_operations { |
9092 |
struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); |
9093 |
-@@ -1885,6 +1886,8 @@ struct file_system_type { |
9094 |
+@@ -1891,6 +1892,8 @@ struct file_system_type { |
9095 |
struct lock_class_key i_mutex_dir_key; |
9096 |
}; |
9097 |
|
9098 |
@@ -72923,7 +72500,7 @@ index a276817..ba31358 100644 |
9099 |
extern struct dentry *mount_ns(struct file_system_type *fs_type, int flags, |
9100 |
void *data, int (*fill_super)(struct super_block *, void *, int)); |
9101 |
extern struct dentry *mount_bdev(struct file_system_type *fs_type, |
9102 |
-@@ -2716,5 +2719,15 @@ static inline void inode_has_no_xattr(struct inode *inode) |
9103 |
+@@ -2722,5 +2725,15 @@ static inline void inode_has_no_xattr(struct inode *inode) |
9104 |
inode->i_flags |= S_NOSEC; |
9105 |
} |
9106 |
|
9107 |
@@ -75703,10 +75280,10 @@ index 45fc162..01a4068 100644 |
9108 |
/** |
9109 |
* struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot |
9110 |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h |
9111 |
-index eeb6a29..6eb2b52 100644 |
9112 |
+index 8d5b91e..9209ea4 100644 |
9113 |
--- a/include/linux/perf_event.h |
9114 |
+++ b/include/linux/perf_event.h |
9115 |
-@@ -748,8 +748,8 @@ struct perf_event { |
9116 |
+@@ -750,8 +750,8 @@ struct perf_event { |
9117 |
|
9118 |
enum perf_event_active_state state; |
9119 |
unsigned int attach_state; |
9120 |
@@ -75717,7 +75294,7 @@ index eeb6a29..6eb2b52 100644 |
9121 |
|
9122 |
/* |
9123 |
* These are the total time in nanoseconds that the event |
9124 |
-@@ -800,8 +800,8 @@ struct perf_event { |
9125 |
+@@ -802,8 +802,8 @@ struct perf_event { |
9126 |
* These accumulate total time (in nanoseconds) that children |
9127 |
* events have been enabled and running, respectively. |
9128 |
*/ |
9129 |
@@ -75728,7 +75305,7 @@ index eeb6a29..6eb2b52 100644 |
9130 |
|
9131 |
/* |
9132 |
* Protect attach/detach and child_list: |
9133 |
-@@ -1100,7 +1100,7 @@ static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64 |
9134 |
+@@ -1102,7 +1102,7 @@ static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64 |
9135 |
entry->ip[entry->nr++] = ip; |
9136 |
} |
9137 |
|
9138 |
@@ -75737,7 +75314,7 @@ index eeb6a29..6eb2b52 100644 |
9139 |
extern int sysctl_perf_event_mlock; |
9140 |
extern int sysctl_perf_event_sample_rate; |
9141 |
|
9142 |
-@@ -1108,19 +1108,24 @@ extern int perf_proc_update_handler(struct ctl_table *table, int write, |
9143 |
+@@ -1110,19 +1110,24 @@ extern int perf_proc_update_handler(struct ctl_table *table, int write, |
9144 |
void __user *buffer, size_t *lenp, |
9145 |
loff_t *ppos); |
9146 |
|
9147 |
@@ -75765,7 +75342,7 @@ index eeb6a29..6eb2b52 100644 |
9148 |
} |
9149 |
|
9150 |
extern void perf_event_init(void); |
9151 |
-@@ -1198,7 +1203,7 @@ static inline void perf_restore_debug_store(void) { } |
9152 |
+@@ -1200,7 +1205,7 @@ static inline void perf_restore_debug_store(void) { } |
9153 |
*/ |
9154 |
#define perf_cpu_notifier(fn) \ |
9155 |
do { \ |
9156 |
@@ -75998,7 +75575,7 @@ index 800f113..13b3715 100644 |
9157 |
} |
9158 |
|
9159 |
diff --git a/include/linux/random.h b/include/linux/random.h |
9160 |
-index 29e217a..a76bcd0 100644 |
9161 |
+index 7e77cee..207b34e 100644 |
9162 |
--- a/include/linux/random.h |
9163 |
+++ b/include/linux/random.h |
9164 |
@@ -51,9 +51,19 @@ struct rnd_state { |
9165 |
@@ -76023,7 +75600,7 @@ index 29e217a..a76bcd0 100644 |
9166 |
|
9167 |
extern void get_random_bytes(void *buf, int nbytes); |
9168 |
extern void get_random_bytes_arch(void *buf, int nbytes); |
9169 |
-@@ -71,12 +81,17 @@ void srandom32(u32 seed); |
9170 |
+@@ -72,12 +82,17 @@ void srandom32(u32 seed); |
9171 |
|
9172 |
u32 prandom32(struct rnd_state *); |
9173 |
|
9174 |
@@ -76781,7 +76358,7 @@ index 92808b8..c28cac4 100644 |
9175 |
|
9176 |
/* shm_mode upper byte flags */ |
9177 |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h |
9178 |
-index efe50af..9a039e5 100644 |
9179 |
+index 85180bf..cc75886 100644 |
9180 |
--- a/include/linux/skbuff.h |
9181 |
+++ b/include/linux/skbuff.h |
9182 |
@@ -538,7 +538,7 @@ extern void consume_skb(struct sk_buff *skb); |
9183 |
@@ -76820,19 +76397,7 @@ index efe50af..9a039e5 100644 |
9184 |
} |
9185 |
|
9186 |
/** |
9187 |
-@@ -1157,6 +1157,11 @@ static inline int skb_pagelen(const struct sk_buff *skb) |
9188 |
- return len + skb_headlen(skb); |
9189 |
- } |
9190 |
- |
9191 |
-+static inline bool skb_has_frags(const struct sk_buff *skb) |
9192 |
-+{ |
9193 |
-+ return skb_shinfo(skb)->nr_frags; |
9194 |
-+} |
9195 |
-+ |
9196 |
- /** |
9197 |
- * __skb_fill_page_desc - initialise a paged fragment in an skb |
9198 |
- * @skb: buffer containing fragment to be initialised |
9199 |
-@@ -1546,7 +1551,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len) |
9200 |
+@@ -1561,7 +1561,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len) |
9201 |
* NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) |
9202 |
*/ |
9203 |
#ifndef NET_SKB_PAD |
9204 |
@@ -76841,7 +76406,7 @@ index efe50af..9a039e5 100644 |
9205 |
#endif |
9206 |
|
9207 |
extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); |
9208 |
-@@ -2085,7 +2090,7 @@ extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, |
9209 |
+@@ -2100,7 +2100,7 @@ extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, |
9210 |
int noblock, int *err); |
9211 |
extern unsigned int datagram_poll(struct file *file, struct socket *sock, |
9212 |
struct poll_table_struct *wait); |
9213 |
@@ -76850,7 +76415,7 @@ index efe50af..9a039e5 100644 |
9214 |
int offset, struct iovec *to, |
9215 |
int size); |
9216 |
extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, |
9217 |
-@@ -2365,6 +2370,9 @@ static inline void nf_reset(struct sk_buff *skb) |
9218 |
+@@ -2380,6 +2380,9 @@ static inline void nf_reset(struct sk_buff *skb) |
9219 |
nf_bridge_put(skb->nf_bridge); |
9220 |
skb->nf_bridge = NULL; |
9221 |
#endif |
9222 |
@@ -79065,10 +78630,10 @@ index 2531811..4f036c4 100644 |
9223 |
#ifdef CONFIG_BLK_DEV_RAM |
9224 |
int fd; |
9225 |
diff --git a/init/main.c b/init/main.c |
9226 |
-index 5d0eb1d..83506bb 100644 |
9227 |
+index 7474450..caef7e7 100644 |
9228 |
--- a/init/main.c |
9229 |
+++ b/init/main.c |
9230 |
-@@ -96,6 +96,8 @@ static inline void mark_rodata_ro(void) { } |
9231 |
+@@ -97,6 +97,8 @@ static inline void mark_rodata_ro(void) { } |
9232 |
extern void tc_init(void); |
9233 |
#endif |
9234 |
|
9235 |
@@ -79077,7 +78642,7 @@ index 5d0eb1d..83506bb 100644 |
9236 |
/* |
9237 |
* Debug helper: via this flag we know that we are in 'early bootup code' |
9238 |
* where only the boot processor is running with IRQ disabled. This means |
9239 |
-@@ -149,6 +151,64 @@ static int __init set_reset_devices(char *str) |
9240 |
+@@ -150,6 +152,64 @@ static int __init set_reset_devices(char *str) |
9241 |
|
9242 |
__setup("reset_devices", set_reset_devices); |
9243 |
|
9244 |
@@ -79142,7 +78707,7 @@ index 5d0eb1d..83506bb 100644 |
9245 |
static const char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, }; |
9246 |
const char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; |
9247 |
static const char *panic_later, *panic_param; |
9248 |
-@@ -678,6 +738,7 @@ int __init_or_module do_one_initcall(initcall_t fn) |
9249 |
+@@ -679,6 +739,7 @@ int __init_or_module do_one_initcall(initcall_t fn) |
9250 |
{ |
9251 |
int count = preempt_count(); |
9252 |
int ret; |
9253 |
@@ -79150,7 +78715,7 @@ index 5d0eb1d..83506bb 100644 |
9254 |
|
9255 |
if (initcall_debug) |
9256 |
ret = do_one_initcall_debug(fn); |
9257 |
-@@ -690,17 +751,18 @@ int __init_or_module do_one_initcall(initcall_t fn) |
9258 |
+@@ -691,17 +752,18 @@ int __init_or_module do_one_initcall(initcall_t fn) |
9259 |
sprintf(msgbuf, "error code %d ", ret); |
9260 |
|
9261 |
if (preempt_count() != count) { |
9262 |
@@ -79173,7 +78738,7 @@ index 5d0eb1d..83506bb 100644 |
9263 |
return ret; |
9264 |
} |
9265 |
|
9266 |
-@@ -748,6 +810,10 @@ static void run_init_process(const char *init_filename) |
9267 |
+@@ -750,6 +812,10 @@ static void run_init_process(const char *init_filename) |
9268 |
kernel_execve(init_filename, argv_init, envp_init); |
9269 |
} |
9270 |
|
9271 |
@@ -79184,7 +78749,7 @@ index 5d0eb1d..83506bb 100644 |
9272 |
/* This is a non __init function. Force it to be noinline otherwise gcc |
9273 |
* makes it inline to init() and it becomes part of init.text section |
9274 |
*/ |
9275 |
-@@ -769,6 +835,11 @@ static noinline int init_post(void) |
9276 |
+@@ -771,6 +837,11 @@ static noinline int init_post(void) |
9277 |
ramdisk_execute_command); |
9278 |
} |
9279 |
|
9280 |
@@ -79196,7 +78761,7 @@ index 5d0eb1d..83506bb 100644 |
9281 |
/* |
9282 |
* We try each of these until one succeeds. |
9283 |
* |
9284 |
-@@ -821,7 +892,7 @@ static int __init kernel_init(void * unused) |
9285 |
+@@ -823,7 +894,7 @@ static int __init kernel_init(void * unused) |
9286 |
do_basic_setup(); |
9287 |
|
9288 |
/* Open the /dev/console on the rootfs, this should never fail */ |
9289 |
@@ -79205,7 +78770,7 @@ index 5d0eb1d..83506bb 100644 |
9290 |
printk(KERN_WARNING "Warning: unable to open an initial console.\n"); |
9291 |
|
9292 |
(void) sys_dup(0); |
9293 |
-@@ -834,11 +905,13 @@ static int __init kernel_init(void * unused) |
9294 |
+@@ -836,11 +907,13 @@ static int __init kernel_init(void * unused) |
9295 |
if (!ramdisk_execute_command) |
9296 |
ramdisk_execute_command = "/init"; |
9297 |
|
9298 |
@@ -85746,10 +85311,10 @@ index 6fdc629..55739fe 100644 |
9299 |
*data_page = bpage; |
9300 |
|
9301 |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c |
9302 |
-index ce1067f..d823ee9 100644 |
9303 |
+index c5a12a7..4d94416 100644 |
9304 |
--- a/kernel/trace/trace.c |
9305 |
+++ b/kernel/trace/trace.c |
9306 |
-@@ -2653,7 +2653,7 @@ int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set) |
9307 |
+@@ -2656,7 +2656,7 @@ int trace_keep_overwrite(struct tracer *tracer, u32 mask, int set) |
9308 |
return 0; |
9309 |
} |
9310 |
|
9311 |
@@ -85758,7 +85323,7 @@ index ce1067f..d823ee9 100644 |
9312 |
{ |
9313 |
/* do nothing if flag is already set */ |
9314 |
if (!!(trace_flags & mask) == !!enabled) |
9315 |
-@@ -4245,10 +4245,9 @@ static const struct file_operations tracing_dyn_info_fops = { |
9316 |
+@@ -4248,10 +4248,9 @@ static const struct file_operations tracing_dyn_info_fops = { |
9317 |
}; |
9318 |
#endif |
9319 |
|
9320 |
@@ -85770,7 +85335,7 @@ index ce1067f..d823ee9 100644 |
9321 |
static int once; |
9322 |
|
9323 |
if (d_tracer) |
9324 |
-@@ -4268,10 +4267,9 @@ struct dentry *tracing_init_dentry(void) |
9325 |
+@@ -4271,10 +4270,9 @@ struct dentry *tracing_init_dentry(void) |
9326 |
return d_tracer; |
9327 |
} |
9328 |
|
9329 |
@@ -86605,20 +86170,6 @@ index d9df745..e73c2fe 100644 |
9330 |
|
9331 |
static inline void *ptr_to_indirect(void *ptr) |
9332 |
{ |
9333 |
-diff --git a/lib/scatterlist.c b/lib/scatterlist.c |
9334 |
-index 4ceb05d..2ffcb3c 100644 |
9335 |
---- a/lib/scatterlist.c |
9336 |
-+++ b/lib/scatterlist.c |
9337 |
-@@ -419,7 +419,8 @@ void sg_miter_stop(struct sg_mapping_iter *miter) |
9338 |
- if (miter->addr) { |
9339 |
- miter->__offset += miter->consumed; |
9340 |
- |
9341 |
-- if (miter->__flags & SG_MITER_TO_SG) |
9342 |
-+ if ((miter->__flags & SG_MITER_TO_SG) && |
9343 |
-+ !PageSlab(miter->page)) |
9344 |
- flush_kernel_dcache_page(miter->page); |
9345 |
- |
9346 |
- if (miter->__flags & SG_MITER_ATOMIC) { |
9347 |
diff --git a/lib/vsprintf.c b/lib/vsprintf.c |
9348 |
index d74c317..1170419 100644 |
9349 |
--- a/lib/vsprintf.c |
9350 |
@@ -90350,6 +89901,19 @@ index 70e814a..38e1f43 100644 |
9351 |
for (i = 0; i < riovcnt && iov_l_curr_idx < liovcnt; i++) { |
9352 |
rc = process_vm_rw_single_vec( |
9353 |
(unsigned long)rvec[i].iov_base, rvec[i].iov_len, |
9354 |
+diff --git a/mm/readahead.c b/mm/readahead.c |
9355 |
+index cbcbb02..dfdc1de 100644 |
9356 |
+--- a/mm/readahead.c |
9357 |
++++ b/mm/readahead.c |
9358 |
+@@ -342,7 +342,7 @@ static unsigned long get_next_ra_size(struct file_ra_state *ra, |
9359 |
+ * - length of the sequential read sequence, or |
9360 |
+ * - thrashing threshold in memory tight systems |
9361 |
+ */ |
9362 |
+-static pgoff_t count_history_pages(struct address_space *mapping, |
9363 |
++static pgoff_t __intentional_overflow(-1) count_history_pages(struct address_space *mapping, |
9364 |
+ struct file_ra_state *ra, |
9365 |
+ pgoff_t offset, unsigned long max) |
9366 |
+ { |
9367 |
diff --git a/mm/rmap.c b/mm/rmap.c |
9368 |
index 8685697..e047d10 100644 |
9369 |
--- a/mm/rmap.c |
9370 |
@@ -92688,25 +92252,23 @@ index f78f898..d7aa843 100644 |
9371 |
|
9372 |
if (__rtnl_register(PF_CAN, RTM_GETROUTE, NULL, cgw_dump_jobs, NULL)) { |
9373 |
diff --git a/net/compat.c b/net/compat.c |
9374 |
-index 8c979cc..453a165 100644 |
9375 |
+index 3139ef2..453a165 100644 |
9376 |
--- a/net/compat.c |
9377 |
+++ b/net/compat.c |
9378 |
-@@ -71,9 +71,11 @@ int get_compat_msghdr(struct msghdr *kmsg, struct compat_msghdr __user *umsg) |
9379 |
- __get_user(kmsg->msg_controllen, &umsg->msg_controllen) || |
9380 |
- __get_user(kmsg->msg_flags, &umsg->msg_flags)) |
9381 |
+@@ -73,9 +73,9 @@ int get_compat_msghdr(struct msghdr *kmsg, struct compat_msghdr __user *umsg) |
9382 |
return -EFAULT; |
9383 |
+ if (kmsg->msg_namelen > sizeof(struct sockaddr_storage)) |
9384 |
+ return -EINVAL; |
9385 |
- kmsg->msg_name = compat_ptr(tmp1); |
9386 |
- kmsg->msg_iov = compat_ptr(tmp2); |
9387 |
- kmsg->msg_control = compat_ptr(tmp3); |
9388 |
-+ if (kmsg->msg_namelen > sizeof(struct sockaddr_storage)) |
9389 |
-+ return -EINVAL; |
9390 |
+ kmsg->msg_name = (void __force_kernel *)compat_ptr(tmp1); |
9391 |
+ kmsg->msg_iov = (void __force_kernel *)compat_ptr(tmp2); |
9392 |
+ kmsg->msg_control = (void __force_kernel *)compat_ptr(tmp3); |
9393 |
return 0; |
9394 |
} |
9395 |
|
9396 |
-@@ -85,7 +87,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, |
9397 |
+@@ -87,7 +87,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, |
9398 |
|
9399 |
if (kern_msg->msg_namelen) { |
9400 |
if (mode == VERIFY_READ) { |
9401 |
@@ -92715,7 +92277,7 @@ index 8c979cc..453a165 100644 |
9402 |
kern_msg->msg_namelen, |
9403 |
kern_address); |
9404 |
if (err < 0) |
9405 |
-@@ -96,7 +98,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, |
9406 |
+@@ -98,7 +98,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, |
9407 |
kern_msg->msg_name = NULL; |
9408 |
|
9409 |
tot_len = iov_from_user_compat_to_kern(kern_iov, |
9410 |
@@ -92724,7 +92286,7 @@ index 8c979cc..453a165 100644 |
9411 |
kern_msg->msg_iovlen); |
9412 |
if (tot_len >= 0) |
9413 |
kern_msg->msg_iov = kern_iov; |
9414 |
-@@ -116,20 +118,20 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, |
9415 |
+@@ -118,20 +118,20 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, |
9416 |
|
9417 |
#define CMSG_COMPAT_FIRSTHDR(msg) \ |
9418 |
(((msg)->msg_controllen) >= sizeof(struct compat_cmsghdr) ? \ |
9419 |
@@ -92748,7 +92310,7 @@ index 8c979cc..453a165 100644 |
9420 |
msg->msg_controllen) |
9421 |
return NULL; |
9422 |
return (struct compat_cmsghdr __user *)ptr; |
9423 |
-@@ -221,7 +223,7 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat |
9424 |
+@@ -223,7 +223,7 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat |
9425 |
{ |
9426 |
struct compat_timeval ctv; |
9427 |
struct compat_timespec cts[3]; |
9428 |
@@ -92757,7 +92319,7 @@ index 8c979cc..453a165 100644 |
9429 |
struct compat_cmsghdr cmhdr; |
9430 |
int cmlen; |
9431 |
|
9432 |
-@@ -273,7 +275,7 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat |
9433 |
+@@ -275,7 +275,7 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat |
9434 |
|
9435 |
void scm_detach_fds_compat(struct msghdr *kmsg, struct scm_cookie *scm) |
9436 |
{ |
9437 |
@@ -92766,7 +92328,7 @@ index 8c979cc..453a165 100644 |
9438 |
int fdmax = (kmsg->msg_controllen - sizeof(struct compat_cmsghdr)) / sizeof(int); |
9439 |
int fdnum = scm->fp->count; |
9440 |
struct file **fp = scm->fp->fp; |
9441 |
-@@ -326,14 +328,6 @@ void scm_detach_fds_compat(struct msghdr *kmsg, struct scm_cookie *scm) |
9442 |
+@@ -328,14 +328,6 @@ void scm_detach_fds_compat(struct msghdr *kmsg, struct scm_cookie *scm) |
9443 |
__scm_destroy(scm); |
9444 |
} |
9445 |
|
9446 |
@@ -92781,7 +92343,7 @@ index 8c979cc..453a165 100644 |
9447 |
static int do_set_attach_filter(struct socket *sock, int level, int optname, |
9448 |
char __user *optval, unsigned int optlen) |
9449 |
{ |
9450 |
-@@ -370,7 +364,7 @@ static int do_set_sock_timeout(struct socket *sock, int level, |
9451 |
+@@ -372,7 +364,7 @@ static int do_set_sock_timeout(struct socket *sock, int level, |
9452 |
return -EFAULT; |
9453 |
old_fs = get_fs(); |
9454 |
set_fs(KERNEL_DS); |
9455 |
@@ -92790,7 +92352,7 @@ index 8c979cc..453a165 100644 |
9456 |
set_fs(old_fs); |
9457 |
|
9458 |
return err; |
9459 |
-@@ -431,7 +425,7 @@ static int do_get_sock_timeout(struct socket *sock, int level, int optname, |
9460 |
+@@ -433,7 +425,7 @@ static int do_get_sock_timeout(struct socket *sock, int level, int optname, |
9461 |
len = sizeof(ktime); |
9462 |
old_fs = get_fs(); |
9463 |
set_fs(KERNEL_DS); |
9464 |
@@ -92799,7 +92361,7 @@ index 8c979cc..453a165 100644 |
9465 |
set_fs(old_fs); |
9466 |
|
9467 |
if (!err) { |
9468 |
-@@ -566,7 +560,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname, |
9469 |
+@@ -568,7 +560,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname, |
9470 |
case MCAST_JOIN_GROUP: |
9471 |
case MCAST_LEAVE_GROUP: |
9472 |
{ |
9473 |
@@ -92808,7 +92370,7 @@ index 8c979cc..453a165 100644 |
9474 |
struct group_req __user *kgr = |
9475 |
compat_alloc_user_space(sizeof(struct group_req)); |
9476 |
u32 interface; |
9477 |
-@@ -587,7 +581,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname, |
9478 |
+@@ -589,7 +581,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname, |
9479 |
case MCAST_BLOCK_SOURCE: |
9480 |
case MCAST_UNBLOCK_SOURCE: |
9481 |
{ |
9482 |
@@ -92817,7 +92379,7 @@ index 8c979cc..453a165 100644 |
9483 |
struct group_source_req __user *kgsr = compat_alloc_user_space( |
9484 |
sizeof(struct group_source_req)); |
9485 |
u32 interface; |
9486 |
-@@ -608,7 +602,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname, |
9487 |
+@@ -610,7 +602,7 @@ int compat_mc_setsockopt(struct sock *sock, int level, int optname, |
9488 |
} |
9489 |
case MCAST_MSFILTER: |
9490 |
{ |
9491 |
@@ -92826,7 +92388,7 @@ index 8c979cc..453a165 100644 |
9492 |
struct group_filter __user *kgf; |
9493 |
u32 interface, fmode, numsrc; |
9494 |
|
9495 |
-@@ -646,7 +640,7 @@ int compat_mc_getsockopt(struct sock *sock, int level, int optname, |
9496 |
+@@ -648,7 +640,7 @@ int compat_mc_getsockopt(struct sock *sock, int level, int optname, |
9497 |
char __user *optval, int __user *optlen, |
9498 |
int (*getsockopt)(struct sock *, int, int, char __user *, int __user *)) |
9499 |
{ |
9500 |
@@ -92835,7 +92397,7 @@ index 8c979cc..453a165 100644 |
9501 |
struct group_filter __user *kgf; |
9502 |
int __user *koptlen; |
9503 |
u32 interface, fmode, numsrc; |
9504 |
-@@ -799,7 +793,7 @@ asmlinkage long compat_sys_socketcall(int call, u32 __user *args) |
9505 |
+@@ -801,7 +793,7 @@ asmlinkage long compat_sys_socketcall(int call, u32 __user *args) |
9506 |
|
9507 |
if (call < SYS_SOCKET || call > SYS_SENDMMSG) |
9508 |
return -EINVAL; |
9509 |
@@ -93883,7 +93445,7 @@ index ccee270..db23c3c 100644 |
9510 |
tmo = req->expires - jiffies; |
9511 |
if (tmo < 0) |
9512 |
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c |
9513 |
-index 984ec65..392d206 100644 |
9514 |
+index 4afcf31..392d206 100644 |
9515 |
--- a/net/ipv4/inet_hashtables.c |
9516 |
+++ b/net/ipv4/inet_hashtables.c |
9517 |
@@ -18,12 +18,15 @@ |
9518 |
@@ -93902,15 +93464,6 @@ index 984ec65..392d206 100644 |
9519 |
/* |
9520 |
* Allocate and initialize a new local port bind bucket. |
9521 |
* The bindhash mutex for snum's hash chain must be held here. |
9522 |
-@@ -268,7 +271,7 @@ begintw: |
9523 |
- } |
9524 |
- if (unlikely(!INET_TW_MATCH(sk, net, hash, acookie, |
9525 |
- saddr, daddr, ports, dif))) { |
9526 |
-- sock_put(sk); |
9527 |
-+ inet_twsk_put(inet_twsk(sk)); |
9528 |
- goto begintw; |
9529 |
- } |
9530 |
- goto out; |
9531 |
@@ -530,6 +533,8 @@ ok: |
9532 |
twrefcnt += inet_twsk_bind_unhash(tw, hinfo); |
9533 |
spin_unlock(&head->lock); |
9534 |
@@ -94016,19 +93569,6 @@ index 5f28fab..ebd7a97 100644 |
9535 |
.kind = "gretap", |
9536 |
.maxtype = IFLA_GRE_MAX, |
9537 |
.policy = ipgre_policy, |
9538 |
-diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c |
9539 |
-index daf408e..16191f0 100644 |
9540 |
---- a/net/ipv4/ip_output.c |
9541 |
-+++ b/net/ipv4/ip_output.c |
9542 |
-@@ -833,7 +833,7 @@ static int __ip_append_data(struct sock *sk, |
9543 |
- csummode = CHECKSUM_PARTIAL; |
9544 |
- |
9545 |
- cork->length += length; |
9546 |
-- if (((length > mtu) || (skb && skb_is_gso(skb))) && |
9547 |
-+ if (((length > mtu) || (skb && skb_has_frags(skb))) && |
9548 |
- (sk->sk_protocol == IPPROTO_UDP) && |
9549 |
- (rt->dst.dev->features & NETIF_F_UFO) && !rt->dst.header_len) { |
9550 |
- err = ip_ufo_append_data(sk, queue, getfrag, from, length, |
9551 |
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c |
9552 |
index 3b36002..27e6634 100644 |
9553 |
--- a/net/ipv4/ip_sockglue.c |
9554 |
@@ -94328,7 +93868,7 @@ index 2815014..1d39ae6 100644 |
9555 |
.exit = raw_exit_net, |
9556 |
}; |
9557 |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c |
9558 |
-index c45a155a3..dadea8d 100644 |
9559 |
+index 6768ce2..c682a62 100644 |
9560 |
--- a/net/ipv4/route.c |
9561 |
+++ b/net/ipv4/route.c |
9562 |
@@ -313,7 +313,7 @@ static inline unsigned int rt_hash(__be32 daddr, __be32 saddr, int idx, |
9563 |
@@ -94556,22 +94096,10 @@ index 739b073..7ac6591 100644 |
9564 |
hdr = register_sysctl_paths(net_ipv4_ctl_path, ipv4_table); |
9565 |
if (hdr == NULL) |
9566 |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c |
9567 |
-index 872b41d..bb914c3 100644 |
9568 |
+index c1ed01e..bb914c3 100644 |
9569 |
--- a/net/ipv4/tcp_input.c |
9570 |
+++ b/net/ipv4/tcp_input.c |
9571 |
-@@ -1469,7 +1469,10 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, |
9572 |
- tp->lost_cnt_hint -= tcp_skb_pcount(prev); |
9573 |
- } |
9574 |
- |
9575 |
-- TCP_SKB_CB(skb)->tcp_flags |= TCP_SKB_CB(prev)->tcp_flags; |
9576 |
-+ TCP_SKB_CB(prev)->tcp_flags |= TCP_SKB_CB(skb)->tcp_flags; |
9577 |
-+ if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) |
9578 |
-+ TCP_SKB_CB(prev)->end_seq++; |
9579 |
-+ |
9580 |
- if (skb == tcp_highest_sack(sk)) |
9581 |
- tcp_advance_highest_sack(sk, skb); |
9582 |
- |
9583 |
-@@ -4736,7 +4739,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb, |
9584 |
+@@ -4739,7 +4739,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb, |
9585 |
* simplifies code) |
9586 |
*/ |
9587 |
static void |
9588 |
@@ -94580,7 +94108,7 @@ index 872b41d..bb914c3 100644 |
9589 |
struct sk_buff *head, struct sk_buff *tail, |
9590 |
u32 start, u32 end) |
9591 |
{ |
9592 |
-@@ -5551,6 +5554,9 @@ slow_path: |
9593 |
+@@ -5554,6 +5554,9 @@ slow_path: |
9594 |
if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb)) |
9595 |
goto csum_error; |
9596 |
|
9597 |
@@ -94590,7 +94118,7 @@ index 872b41d..bb914c3 100644 |
9598 |
/* |
9599 |
* Standard slow path. |
9600 |
*/ |
9601 |
-@@ -5559,8 +5565,7 @@ slow_path: |
9602 |
+@@ -5562,8 +5565,7 @@ slow_path: |
9603 |
return 0; |
9604 |
|
9605 |
step5: |
9606 |
@@ -94600,7 +94128,7 @@ index 872b41d..bb914c3 100644 |
9607 |
goto discard; |
9608 |
|
9609 |
tcp_rcv_rtt_measure_ts(sk, skb); |
9610 |
-@@ -5791,6 +5796,7 @@ discard: |
9611 |
+@@ -5794,6 +5796,7 @@ discard: |
9612 |
tcp_paws_reject(&tp->rx_opt, 0)) |
9613 |
goto discard_and_undo; |
9614 |
|
9615 |
@@ -94608,7 +94136,7 @@ index 872b41d..bb914c3 100644 |
9616 |
if (th->syn) { |
9617 |
/* We see SYN without ACK. It is attempt of |
9618 |
* simultaneous connect with crossed SYNs. |
9619 |
-@@ -5839,6 +5845,7 @@ discard: |
9620 |
+@@ -5842,6 +5845,7 @@ discard: |
9621 |
goto discard; |
9622 |
#endif |
9623 |
} |
9624 |
@@ -94616,7 +94144,7 @@ index 872b41d..bb914c3 100644 |
9625 |
/* "fifth, if neither of the SYN or RST bits is set then |
9626 |
* drop the segment and return." |
9627 |
*/ |
9628 |
-@@ -5882,7 +5889,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, |
9629 |
+@@ -5885,7 +5889,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, |
9630 |
goto discard; |
9631 |
|
9632 |
if (th->syn) { |
9633 |
@@ -94625,7 +94153,7 @@ index 872b41d..bb914c3 100644 |
9634 |
goto discard; |
9635 |
if (icsk->icsk_af_ops->conn_request(sk, skb) < 0) |
9636 |
return 1; |
9637 |
-@@ -5921,11 +5928,14 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, |
9638 |
+@@ -5924,11 +5928,14 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, |
9639 |
return 0; |
9640 |
} |
9641 |
|
9642 |
@@ -94641,7 +94169,7 @@ index 872b41d..bb914c3 100644 |
9643 |
int acceptable = tcp_ack(sk, skb, FLAG_SLOWPATH | |
9644 |
FLAG_UPDATE_TS_RECENT) > 0; |
9645 |
|
9646 |
-@@ -6031,8 +6041,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, |
9647 |
+@@ -6034,8 +6041,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, |
9648 |
} |
9649 |
break; |
9650 |
} |
9651 |
@@ -94786,10 +94314,10 @@ index 66363b6..b0654a3 100644 |
9652 |
req->rsk_ops->send_reset(sk, skb); |
9653 |
|
9654 |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c |
9655 |
-index 3add486..a5df757 100644 |
9656 |
+index 0d5a118..5f6f0e6 100644 |
9657 |
--- a/net/ipv4/tcp_output.c |
9658 |
+++ b/net/ipv4/tcp_output.c |
9659 |
-@@ -1318,7 +1318,7 @@ static void tcp_cwnd_validate(struct sock *sk) |
9660 |
+@@ -1319,7 +1319,7 @@ static void tcp_cwnd_validate(struct sock *sk) |
9661 |
* modulo only when the receiver window alone is the limiting factor or |
9662 |
* when we would be allowed to send the split-due-to-Nagle skb fully. |
9663 |
*/ |
9664 |
@@ -95056,21 +94584,8 @@ index 1567fb1..29af910 100644 |
9665 |
__sk_dst_reset(sk); |
9666 |
dst = NULL; |
9667 |
} |
9668 |
-diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c |
9669 |
-index 73f1a00..e38290b 100644 |
9670 |
---- a/net/ipv6/inet6_hashtables.c |
9671 |
-+++ b/net/ipv6/inet6_hashtables.c |
9672 |
-@@ -110,7 +110,7 @@ begintw: |
9673 |
- goto out; |
9674 |
- } |
9675 |
- if (!INET6_TW_MATCH(sk, net, hash, saddr, daddr, ports, dif)) { |
9676 |
-- sock_put(sk); |
9677 |
-+ inet_twsk_put(inet_twsk(sk)); |
9678 |
- goto begintw; |
9679 |
- } |
9680 |
- goto out; |
9681 |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c |
9682 |
-index 91d0711..7dc5e62 100644 |
9683 |
+index 97675bf..7dc5e62 100644 |
9684 |
--- a/net/ipv6/ip6_output.c |
9685 |
+++ b/net/ipv6/ip6_output.c |
9686 |
@@ -600,8 +600,8 @@ int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr) |
9687 |
@@ -95102,15 +94617,6 @@ index 91d0711..7dc5e62 100644 |
9688 |
} |
9689 |
|
9690 |
int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) |
9691 |
-@@ -1342,7 +1339,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, |
9692 |
- skb = skb_peek_tail(&sk->sk_write_queue); |
9693 |
- cork->length += length; |
9694 |
- if (((length > mtu) || |
9695 |
-- (skb && skb_is_gso(skb))) && |
9696 |
-+ (skb && skb_has_frags(skb))) && |
9697 |
- (sk->sk_protocol == IPPROTO_UDP) && |
9698 |
- (rt->dst.dev->features & NETIF_F_UFO)) { |
9699 |
- err = ip6_ufo_append_data(sk, getfrag, from, length, |
9700 |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c |
9701 |
index b204df8..8f274f4 100644 |
9702 |
--- a/net/ipv6/ipv6_sockglue.c |
9703 |
@@ -95314,10 +94820,10 @@ index eba5deb..61e026f 100644 |
9704 |
return -ENOMEM; |
9705 |
} |
9706 |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c |
9707 |
-index 18ea73c..b0b7be2 100644 |
9708 |
+index bc9103d..48a383f 100644 |
9709 |
--- a/net/ipv6/route.c |
9710 |
+++ b/net/ipv6/route.c |
9711 |
-@@ -2806,7 +2806,7 @@ ctl_table ipv6_route_table_template[] = { |
9712 |
+@@ -2809,7 +2809,7 @@ ctl_table ipv6_route_table_template[] = { |
9713 |
|
9714 |
struct ctl_table * __net_init ipv6_route_sysctl_init(struct net *net) |
9715 |
{ |
9716 |
@@ -95802,7 +95308,7 @@ index 93a41a0..d4b4edb 100644 |
9717 |
NLA_PUT_U32(skb, L2TP_ATTR_CONN_ID, tunnel->tunnel_id); |
9718 |
NLA_PUT_U32(skb, L2TP_ATTR_SESSION_ID, session->session_id); |
9719 |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h |
9720 |
-index 73495f1..ad51356 100644 |
9721 |
+index a9cf593..b04a2d5 100644 |
9722 |
--- a/net/mac80211/ieee80211_i.h |
9723 |
+++ b/net/mac80211/ieee80211_i.h |
9724 |
@@ -27,6 +27,7 @@ |
9725 |
@@ -95813,7 +95319,7 @@ index 73495f1..ad51356 100644 |
9726 |
#include "key.h" |
9727 |
#include "sta_info.h" |
9728 |
|
9729 |
-@@ -764,7 +765,7 @@ struct ieee80211_local { |
9730 |
+@@ -767,7 +768,7 @@ struct ieee80211_local { |
9731 |
/* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */ |
9732 |
spinlock_t queue_stop_reason_lock; |
9733 |
|
9734 |
@@ -97605,7 +97111,7 @@ index 8da4481..d02565e 100644 |
9735 |
+ (rtt >> sctp_rto_alpha); |
9736 |
} else { |
9737 |
diff --git a/net/socket.c b/net/socket.c |
9738 |
-index cf546a3..3cb0fca 100644 |
9739 |
+index bf7adaa..3cb0fca 100644 |
9740 |
--- a/net/socket.c |
9741 |
+++ b/net/socket.c |
9742 |
@@ -88,6 +88,7 @@ |
9743 |
@@ -97789,38 +97295,7 @@ index cf546a3..3cb0fca 100644 |
9744 |
int err, err2; |
9745 |
int fput_needed; |
9746 |
|
9747 |
-@@ -1876,6 +1942,16 @@ struct used_address { |
9748 |
- unsigned int name_len; |
9749 |
- }; |
9750 |
- |
9751 |
-+static int copy_msghdr_from_user(struct msghdr *kmsg, |
9752 |
-+ struct msghdr __user *umsg) |
9753 |
-+{ |
9754 |
-+ if (copy_from_user(kmsg, umsg, sizeof(struct msghdr))) |
9755 |
-+ return -EFAULT; |
9756 |
-+ if (kmsg->msg_namelen > sizeof(struct sockaddr_storage)) |
9757 |
-+ return -EINVAL; |
9758 |
-+ return 0; |
9759 |
-+} |
9760 |
-+ |
9761 |
- static int ___sys_sendmsg(struct socket *sock, struct msghdr __user *msg, |
9762 |
- struct msghdr *msg_sys, unsigned flags, |
9763 |
- struct used_address *used_address) |
9764 |
-@@ -1894,8 +1970,11 @@ static int ___sys_sendmsg(struct socket *sock, struct msghdr __user *msg, |
9765 |
- if (MSG_CMSG_COMPAT & flags) { |
9766 |
- if (get_compat_msghdr(msg_sys, msg_compat)) |
9767 |
- return -EFAULT; |
9768 |
-- } else if (copy_from_user(msg_sys, msg, sizeof(struct msghdr))) |
9769 |
-- return -EFAULT; |
9770 |
-+ } else { |
9771 |
-+ err = copy_msghdr_from_user(msg_sys, msg); |
9772 |
-+ if (err) |
9773 |
-+ return err; |
9774 |
-+ } |
9775 |
- |
9776 |
- /* do not move before msg_sys is valid */ |
9777 |
- err = -EMSGSIZE; |
9778 |
-@@ -1950,7 +2029,7 @@ static int ___sys_sendmsg(struct socket *sock, struct msghdr __user *msg, |
9779 |
+@@ -1963,7 +2029,7 @@ static int ___sys_sendmsg(struct socket *sock, struct msghdr __user *msg, |
9780 |
* checking falls down on this. |
9781 |
*/ |
9782 |
if (copy_from_user(ctl_buf, |
9783 |
@@ -97829,7 +97304,7 @@ index cf546a3..3cb0fca 100644 |
9784 |
ctl_len)) |
9785 |
goto out_freectl; |
9786 |
msg_sys->msg_control = ctl_buf; |
9787 |
-@@ -2101,7 +2180,7 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg, |
9788 |
+@@ -2114,7 +2180,7 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg, |
9789 |
int err, iov_size, total_len, len; |
9790 |
|
9791 |
/* kernel mode address */ |
9792 |
@@ -97838,21 +97313,7 @@ index cf546a3..3cb0fca 100644 |
9793 |
|
9794 |
/* user mode address pointers */ |
9795 |
struct sockaddr __user *uaddr; |
9796 |
-@@ -2110,8 +2189,11 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg, |
9797 |
- if (MSG_CMSG_COMPAT & flags) { |
9798 |
- if (get_compat_msghdr(msg_sys, msg_compat)) |
9799 |
- return -EFAULT; |
9800 |
-- } else if (copy_from_user(msg_sys, msg, sizeof(struct msghdr))) |
9801 |
-- return -EFAULT; |
9802 |
-+ } else { |
9803 |
-+ err = copy_msghdr_from_user(msg_sys, msg); |
9804 |
-+ if (err) |
9805 |
-+ return err; |
9806 |
-+ } |
9807 |
- |
9808 |
- err = -EMSGSIZE; |
9809 |
- if (msg_sys->msg_iovlen > UIO_MAXIOV) |
9810 |
-@@ -2131,7 +2213,7 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg, |
9811 |
+@@ -2147,7 +2213,7 @@ static int ___sys_recvmsg(struct socket *sock, struct msghdr __user *msg, |
9812 |
* kernel msghdr to use the kernel address space) |
9813 |
*/ |
9814 |
|
9815 |
@@ -97861,7 +97322,7 @@ index cf546a3..3cb0fca 100644 |
9816 |
uaddr_len = COMPAT_NAMELEN(msg); |
9817 |
if (MSG_CMSG_COMPAT & flags) { |
9818 |
err = verify_compat_iovec(msg_sys, iov, |
9819 |
-@@ -2772,7 +2854,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32) |
9820 |
+@@ -2788,7 +2854,7 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32) |
9821 |
} |
9822 |
|
9823 |
ifr = compat_alloc_user_space(buf_size); |
9824 |
@@ -97870,7 +97331,7 @@ index cf546a3..3cb0fca 100644 |
9825 |
|
9826 |
if (copy_in_user(&ifr->ifr_name, &ifr32->ifr_name, IFNAMSIZ)) |
9827 |
return -EFAULT; |
9828 |
-@@ -2796,12 +2878,12 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32) |
9829 |
+@@ -2812,12 +2878,12 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32) |
9830 |
offsetof(struct ethtool_rxnfc, fs.ring_cookie)); |
9831 |
|
9832 |
if (copy_in_user(rxnfc, compat_rxnfc, |
9833 |
@@ -97887,7 +97348,7 @@ index cf546a3..3cb0fca 100644 |
9834 |
copy_in_user(&rxnfc->rule_cnt, &compat_rxnfc->rule_cnt, |
9835 |
sizeof(rxnfc->rule_cnt))) |
9836 |
return -EFAULT; |
9837 |
-@@ -2813,12 +2895,12 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32) |
9838 |
+@@ -2829,12 +2895,12 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32) |
9839 |
|
9840 |
if (convert_out) { |
9841 |
if (copy_in_user(compat_rxnfc, rxnfc, |
9842 |
@@ -97904,7 +97365,7 @@ index cf546a3..3cb0fca 100644 |
9843 |
copy_in_user(&compat_rxnfc->rule_cnt, &rxnfc->rule_cnt, |
9844 |
sizeof(rxnfc->rule_cnt))) |
9845 |
return -EFAULT; |
9846 |
-@@ -2888,7 +2970,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd, |
9847 |
+@@ -2904,7 +2970,7 @@ static int bond_ioctl(struct net *net, unsigned int cmd, |
9848 |
old_fs = get_fs(); |
9849 |
set_fs(KERNEL_DS); |
9850 |
err = dev_ioctl(net, cmd, |
9851 |
@@ -97913,7 +97374,7 @@ index cf546a3..3cb0fca 100644 |
9852 |
set_fs(old_fs); |
9853 |
|
9854 |
return err; |
9855 |
-@@ -2997,7 +3079,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd, |
9856 |
+@@ -3013,7 +3079,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd, |
9857 |
|
9858 |
old_fs = get_fs(); |
9859 |
set_fs(KERNEL_DS); |
9860 |
@@ -97922,7 +97383,7 @@ index cf546a3..3cb0fca 100644 |
9861 |
set_fs(old_fs); |
9862 |
|
9863 |
if (cmd == SIOCGIFMAP && !err) { |
9864 |
-@@ -3102,7 +3184,7 @@ static int routing_ioctl(struct net *net, struct socket *sock, |
9865 |
+@@ -3118,7 +3184,7 @@ static int routing_ioctl(struct net *net, struct socket *sock, |
9866 |
ret |= __get_user(rtdev, &(ur4->rt_dev)); |
9867 |
if (rtdev) { |
9868 |
ret |= copy_from_user(devname, compat_ptr(rtdev), 15); |
9869 |
@@ -97931,7 +97392,7 @@ index cf546a3..3cb0fca 100644 |
9870 |
devname[15] = 0; |
9871 |
} else |
9872 |
r4.rt_dev = NULL; |
9873 |
-@@ -3342,8 +3424,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname, |
9874 |
+@@ -3358,8 +3424,8 @@ int kernel_getsockopt(struct socket *sock, int level, int optname, |
9875 |
int __user *uoptlen; |
9876 |
int err; |
9877 |
|
9878 |
@@ -97942,7 +97403,7 @@ index cf546a3..3cb0fca 100644 |
9879 |
|
9880 |
set_fs(KERNEL_DS); |
9881 |
if (level == SOL_SOCKET) |
9882 |
-@@ -3363,7 +3445,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname, |
9883 |
+@@ -3379,7 +3445,7 @@ int kernel_setsockopt(struct socket *sock, int level, int optname, |
9884 |
char __user *uoptval; |
9885 |
int err; |
9886 |
|
9887 |
@@ -98757,7 +98218,7 @@ index 1983717..4d6102c 100644 |
9888 |
|
9889 |
sub->evt.event = htohl(event, sub->swap); |
9890 |
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c |
9891 |
-index 5611563..911c6c1 100644 |
9892 |
+index 5122b22..25b11eb 100644 |
9893 |
--- a/net/unix/af_unix.c |
9894 |
+++ b/net/unix/af_unix.c |
9895 |
@@ -766,6 +766,12 @@ static struct sock *unix_find_other(struct net *net, |
9896 |
@@ -98806,7 +98267,7 @@ index 5611563..911c6c1 100644 |
9897 |
mutex_unlock(&path.dentry->d_inode->i_mutex); |
9898 |
dput(path.dentry); |
9899 |
path.dentry = dentry; |
9900 |
-@@ -2260,9 +2280,13 @@ static int unix_seq_show(struct seq_file *seq, void *v) |
9901 |
+@@ -2270,9 +2290,13 @@ static int unix_seq_show(struct seq_file *seq, void *v) |
9902 |
seq_puts(seq, "Num RefCount Protocol Flags Type St " |
9903 |
"Inode Path\n"); |
9904 |
else { |
9905 |
@@ -98821,7 +98282,7 @@ index 5611563..911c6c1 100644 |
9906 |
|
9907 |
seq_printf(seq, "%pK: %08X %08X %08X %04X %02X %5lu", |
9908 |
s, |
9909 |
-@@ -2289,8 +2313,10 @@ static int unix_seq_show(struct seq_file *seq, void *v) |
9910 |
+@@ -2299,8 +2323,10 @@ static int unix_seq_show(struct seq_file *seq, void *v) |
9911 |
} |
9912 |
for ( ; i < len; i++) |
9913 |
seq_putc(seq, u->addr->name->sun_path[i]); |
9914 |
@@ -104752,10 +104213,10 @@ index 0000000..679b9ef |
9915 |
+} |
9916 |
diff --git a/tools/gcc/size_overflow_hash.data b/tools/gcc/size_overflow_hash.data |
9917 |
new file mode 100644 |
9918 |
-index 0000000..05e26dd |
9919 |
+index 0000000..0634465 |
9920 |
--- /dev/null |
9921 |
+++ b/tools/gcc/size_overflow_hash.data |
9922 |
-@@ -0,0 +1,5989 @@ |
9923 |
+@@ -0,0 +1,5990 @@ |
9924 |
+intel_fake_agp_alloc_by_type_1 intel_fake_agp_alloc_by_type 1 1 NULL |
9925 |
+ocfs2_get_refcount_tree_3 ocfs2_get_refcount_tree 0 3 NULL |
9926 |
+storvsc_connect_to_vsp_22 storvsc_connect_to_vsp 2 22 NULL |
9927 |
@@ -105379,8 +104840,8 @@ index 0000000..05e26dd |
9928 |
+send_mpa_reject_7135 send_mpa_reject 3 7135 NULL |
9929 |
+ipv6_recv_rxpmtu_7142 ipv6_recv_rxpmtu 3 7142 NULL |
9930 |
+ocfs2_get_left_path_7159 ocfs2_get_left_path 0 7159 NULL |
9931 |
-+__alloc_objio_seg_7203 __alloc_objio_seg 1 7203 NULL nohasharray |
9932 |
-+utf16_strsize_7203 utf16_strsize 0 7203 &__alloc_objio_seg_7203 |
9933 |
++utf16_strsize_7203 utf16_strsize 0 7203 NULL nohasharray |
9934 |
++__alloc_objio_seg_7203 __alloc_objio_seg 1 7203 &utf16_strsize_7203 |
9935 |
+sys32_ipc_7238 sys32_ipc 3 7238 NULL |
9936 |
+hdlc_loop_7255 hdlc_loop 0 7255 NULL |
9937 |
+snd_mask_refine_7267 snd_mask_refine 0 7267 NULL |
9938 |
@@ -105546,8 +105007,8 @@ index 0000000..05e26dd |
9939 |
+usb_allocate_stream_buffers_8964 usb_allocate_stream_buffers 3 8964 NULL |
9940 |
+qib_qsfp_dump_8966 qib_qsfp_dump 0-3 8966 NULL |
9941 |
+venus_mkdir_8967 venus_mkdir 4 8967 NULL |
9942 |
-+vol_cdev_read_8968 vol_cdev_read 3 8968 NULL nohasharray |
9943 |
-+seq_open_net_8968 seq_open_net 4 8968 &vol_cdev_read_8968 |
9944 |
++seq_open_net_8968 seq_open_net 4 8968 NULL nohasharray |
9945 |
++vol_cdev_read_8968 vol_cdev_read 3 8968 &seq_open_net_8968 |
9946 |
+bio_integrity_get_tag_8974 bio_integrity_get_tag 3 8974 NULL |
9947 |
+btrfs_alloc_free_block_8986 btrfs_alloc_free_block 8 8986 NULL |
9948 |
+get_pipes_9008 get_pipes 0 9008 NULL |
9949 |
@@ -105699,8 +105160,8 @@ index 0000000..05e26dd |
9950 |
+do_compat_pselect_10398 do_compat_pselect 1 10398 NULL |
9951 |
+event_phy_transmit_error_read_10471 event_phy_transmit_error_read 3 10471 NULL |
9952 |
+qib_alloc_fast_reg_page_list_10507 qib_alloc_fast_reg_page_list 2 10507 NULL |
9953 |
-+sel_write_disable_10511 sel_write_disable 3 10511 NULL nohasharray |
9954 |
-+rbd_get_segment_10511 rbd_get_segment 0-3-4 10511 &sel_write_disable_10511 |
9955 |
++rbd_get_segment_10511 rbd_get_segment 0-3-4 10511 NULL nohasharray |
9956 |
++sel_write_disable_10511 sel_write_disable 3 10511 &rbd_get_segment_10511 |
9957 |
+osd_req_write_sg_kern_10514 osd_req_write_sg_kern 5 10514 NULL |
9958 |
+rds_message_alloc_10517 rds_message_alloc 1 10517 NULL |
9959 |
+snd_pcm_hw_params_user_10520 snd_pcm_hw_params_user 0 10520 NULL |
9960 |
@@ -106095,8 +105556,8 @@ index 0000000..05e26dd |
9961 |
+cmd_complete_14502 cmd_complete 5 14502 NULL |
9962 |
+ocfs2_debug_read_14507 ocfs2_debug_read 3 14507 NULL |
9963 |
+prepare_data_14536 prepare_data 3 14536 NULL nohasharray |
9964 |
-+ep0_write_14536 ep0_write 3 14536 &prepare_data_14536 nohasharray |
9965 |
-+dataflash_read_user_otp_14536 dataflash_read_user_otp 3-2 14536 &ep0_write_14536 |
9966 |
++dataflash_read_user_otp_14536 dataflash_read_user_otp 3-2 14536 &prepare_data_14536 nohasharray |
9967 |
++ep0_write_14536 ep0_write 3 14536 &dataflash_read_user_otp_14536 |
9968 |
+register_trace_sched_switch_14545 register_trace_sched_switch 0 14545 NULL |
9969 |
+l2cap_send_cmd_14548 l2cap_send_cmd 4 14548 NULL |
9970 |
+picolcd_debug_eeprom_read_14549 picolcd_debug_eeprom_read 3 14549 NULL |
9971 |
@@ -106121,8 +105582,8 @@ index 0000000..05e26dd |
9972 |
+cp_tm1217_read_14792 cp_tm1217_read 3 14792 &keys_proc_write_14792 |
9973 |
+ext4_kvmalloc_14796 ext4_kvmalloc 1 14796 NULL |
9974 |
+__kfifo_in_14797 __kfifo_in 3-0 14797 NULL |
9975 |
-+snd_als300_gcr_read_14801 snd_als300_gcr_read 0 14801 NULL nohasharray |
9976 |
-+hpet_readl_14801 hpet_readl 0 14801 &snd_als300_gcr_read_14801 |
9977 |
++hpet_readl_14801 hpet_readl 0 14801 NULL nohasharray |
9978 |
++snd_als300_gcr_read_14801 snd_als300_gcr_read 0 14801 &hpet_readl_14801 |
9979 |
+__i2400ms_rx_get_size_14826 __i2400ms_rx_get_size 0 14826 NULL |
9980 |
+do_tune_cpucache_14828 do_tune_cpucache 2 14828 NULL |
9981 |
+__mutex_fastpath_lock_retval_14844 __mutex_fastpath_lock_retval 0 14844 NULL |
9982 |
@@ -106896,8 +106357,8 @@ index 0000000..05e26dd |
9983 |
+pipe_iov_copy_from_user_23102 pipe_iov_copy_from_user 3 23102 NULL |
9984 |
+dgram_recvmsg_23104 dgram_recvmsg 4 23104 NULL |
9985 |
+ip_recv_error_23109 ip_recv_error 3 23109 NULL |
9986 |
-+msix_setup_entries_23110 msix_setup_entries 0 23110 NULL nohasharray |
9987 |
-+mwl8k_cmd_set_beacon_23110 mwl8k_cmd_set_beacon 4 23110 &msix_setup_entries_23110 |
9988 |
++mwl8k_cmd_set_beacon_23110 mwl8k_cmd_set_beacon 4 23110 NULL nohasharray |
9989 |
++msix_setup_entries_23110 msix_setup_entries 0 23110 &mwl8k_cmd_set_beacon_23110 |
9990 |
+nl80211_send_rx_auth_23111 nl80211_send_rx_auth 4 23111 NULL |
9991 |
+__clear_user_23118 __clear_user 0-2 23118 NULL |
9992 |
+iwl_legacy_dbgfs_interrupt_write_23122 iwl_legacy_dbgfs_interrupt_write 3 23122 NULL nohasharray |
9993 |
@@ -107314,9 +106775,9 @@ index 0000000..05e26dd |
9994 |
+cxio_hal_pblpool_alloc_27714 cxio_hal_pblpool_alloc 2 27714 NULL |
9995 |
+evm_write_key_27715 evm_write_key 3 27715 NULL |
9996 |
+ieee80211_if_fmt_dot11MeshGateAnnouncementProtocol_27722 ieee80211_if_fmt_dot11MeshGateAnnouncementProtocol 3 27722 NULL |
9997 |
-+pstore_write_27724 pstore_write 3 27724 NULL nohasharray |
9998 |
-+iwl_dbgfs_traffic_log_write_27724 iwl_dbgfs_traffic_log_write 3 27724 &pstore_write_27724 nohasharray |
9999 |
-+reg_w_buf_27724 reg_w_buf 3 27724 &iwl_dbgfs_traffic_log_write_27724 |
10000 |
++reg_w_buf_27724 reg_w_buf 3 27724 NULL nohasharray |
10001 |
++pstore_write_27724 pstore_write 3 27724 ®_w_buf_27724 nohasharray |
10002 |
++iwl_dbgfs_traffic_log_write_27724 iwl_dbgfs_traffic_log_write 3 27724 &pstore_write_27724 |
10003 |
+xfs_dir2_block_sfsize_27727 xfs_dir2_block_sfsize 0 27727 NULL |
10004 |
+kcalloc_27770 kcalloc 2-1 27770 NULL |
10005 |
+ttm_object_file_init_27804 ttm_object_file_init 2 27804 NULL |
10006 |
@@ -107432,8 +106893,8 @@ index 0000000..05e26dd |
10007 |
+hci_sock_setsockopt_28993 hci_sock_setsockopt 5 28993 NULL |
10008 |
+bin_uuid_28999 bin_uuid 3 28999 NULL |
10009 |
+sys_fcntl64_29031 sys_fcntl64 3 29031 NULL |
10010 |
-+rxrpc_sendmsg_29049 rxrpc_sendmsg 4 29049 NULL nohasharray |
10011 |
-+ProcessGetHostMibs_29049 ProcessGetHostMibs 0 29049 &rxrpc_sendmsg_29049 |
10012 |
++ProcessGetHostMibs_29049 ProcessGetHostMibs 0 29049 NULL nohasharray |
10013 |
++rxrpc_sendmsg_29049 rxrpc_sendmsg 4 29049 &ProcessGetHostMibs_29049 |
10014 |
+tso_fragment_29050 tso_fragment 3 29050 NULL |
10015 |
+split_bvec_29058 split_bvec 5 29058 NULL |
10016 |
+iso_packets_buffer_init_29061 iso_packets_buffer_init 3-4 29061 NULL |
10017 |
@@ -108246,8 +107707,8 @@ index 0000000..05e26dd |
10018 |
+snd_pcm_playback_rewind_38249 snd_pcm_playback_rewind 0-2 38249 NULL |
10019 |
+ieee80211_if_read_auto_open_plinks_38268 ieee80211_if_read_auto_open_plinks 3 38268 NULL nohasharray |
10020 |
+mthca_alloc_icm_table_38268 mthca_alloc_icm_table 3-4 38268 &ieee80211_if_read_auto_open_plinks_38268 |
10021 |
-+xfs_bmbt_to_bmdr_38275 xfs_bmbt_to_bmdr 3 38275 NULL nohasharray |
10022 |
-+xfs_bmdr_to_bmbt_38275 xfs_bmdr_to_bmbt 5 38275 &xfs_bmbt_to_bmdr_38275 |
10023 |
++xfs_bmdr_to_bmbt_38275 xfs_bmdr_to_bmbt 5 38275 NULL nohasharray |
10024 |
++xfs_bmbt_to_bmdr_38275 xfs_bmbt_to_bmdr 3 38275 &xfs_bmdr_to_bmbt_38275 |
10025 |
+zd_mac_rx_38296 zd_mac_rx 3 38296 NULL |
10026 |
+isr_rx_headers_read_38325 isr_rx_headers_read 3 38325 NULL |
10027 |
+ida_simple_get_38326 ida_simple_get 2 38326 NULL |
10028 |
@@ -108741,8 +108202,8 @@ index 0000000..05e26dd |
10029 |
+msi_capability_init_43423 msi_capability_init 0 43423 &__alloc_bootmem_low_43423 |
10030 |
+usb_alloc_urb_43436 usb_alloc_urb 1 43436 NULL |
10031 |
+ocfs2_rotate_tree_left_43442 ocfs2_rotate_tree_left 0 43442 NULL |
10032 |
-+usb_string_43443 usb_string 0 43443 NULL nohasharray |
10033 |
-+usemap_size_43443 usemap_size 0-2-1 43443 &usb_string_43443 |
10034 |
++usemap_size_43443 usemap_size 0-2-1 43443 NULL nohasharray |
10035 |
++usb_string_43443 usb_string 0 43443 &usemap_size_43443 |
10036 |
+__data_list_add_eb_43472 __data_list_add_eb 0 43472 NULL |
10037 |
+alloc_new_reservation_43480 alloc_new_reservation 4-0-2 43480 NULL |
10038 |
+nf_nat_ftp_fmt_cmd_43495 nf_nat_ftp_fmt_cmd 0 43495 NULL |
10039 |
@@ -109146,8 +108607,8 @@ index 0000000..05e26dd |
10040 |
+iwl_dbgfs_ucode_tracing_read_47983 iwl_dbgfs_ucode_tracing_read 3 47983 NULL nohasharray |
10041 |
+mempool_resize_47983 mempool_resize 2 47983 &iwl_dbgfs_ucode_tracing_read_47983 |
10042 |
+pnpacpi_parse_allocated_irqresource_47986 pnpacpi_parse_allocated_irqresource 2 47986 NULL |
10043 |
-+mgmt_pending_add_47990 mgmt_pending_add 5 47990 NULL nohasharray |
10044 |
-+dbg_port_buf_47990 dbg_port_buf 2 47990 &mgmt_pending_add_47990 |
10045 |
++dbg_port_buf_47990 dbg_port_buf 2 47990 NULL nohasharray |
10046 |
++mgmt_pending_add_47990 mgmt_pending_add 5 47990 &dbg_port_buf_47990 |
10047 |
+ib_umad_write_47993 ib_umad_write 3 47993 NULL |
10048 |
+ocfs2_find_refcount_split_pos_48001 ocfs2_find_refcount_split_pos 0 48001 NULL |
10049 |
+ffs_epfile_write_48014 ffs_epfile_write 3 48014 NULL |
10050 |
@@ -109192,8 +108653,8 @@ index 0000000..05e26dd |
10051 |
+r8712_usbctrl_vendorreq_48489 r8712_usbctrl_vendorreq 6 48489 NULL |
10052 |
+send_control_msg_48498 send_control_msg 6 48498 NULL |
10053 |
+mlx4_en_create_tx_ring_48501 mlx4_en_create_tx_ring 4 48501 NULL |
10054 |
-+diva_os_copy_to_user_48508 diva_os_copy_to_user 4 48508 NULL nohasharray |
10055 |
-+iwl_legacy_dbgfs_status_read_48508 iwl_legacy_dbgfs_status_read 3 48508 &diva_os_copy_to_user_48508 |
10056 |
++iwl_legacy_dbgfs_status_read_48508 iwl_legacy_dbgfs_status_read 3 48508 NULL nohasharray |
10057 |
++diva_os_copy_to_user_48508 diva_os_copy_to_user 4 48508 &iwl_legacy_dbgfs_status_read_48508 |
10058 |
+phantom_get_free_48514 phantom_get_free 0 48514 NULL |
10059 |
+ubi_dbg_check_write_48525 ubi_dbg_check_write 0 48525 NULL |
10060 |
+wiimote_hid_send_48528 wiimote_hid_send 3 48528 NULL |
10061 |
@@ -109753,8 +109214,8 @@ index 0000000..05e26dd |
10062 |
+pn_raw_send_54330 pn_raw_send 2 54330 NULL |
10063 |
+br_fdb_fillbuf_54339 br_fdb_fillbuf 0 54339 NULL |
10064 |
+__alloc_dev_table_54343 __alloc_dev_table 2 54343 NULL |
10065 |
-+_osd_realloc_seg_54352 _osd_realloc_seg 3 54352 NULL nohasharray |
10066 |
-+__get_free_pages_54352 __get_free_pages 0 54352 &_osd_realloc_seg_54352 |
10067 |
++__get_free_pages_54352 __get_free_pages 0 54352 NULL nohasharray |
10068 |
++_osd_realloc_seg_54352 _osd_realloc_seg 3 54352 &__get_free_pages_54352 |
10069 |
+tcf_hash_create_54360 tcf_hash_create 4 54360 NULL |
10070 |
+read_file_credit_dist_stats_54367 read_file_credit_dist_stats 3 54367 NULL |
10071 |
+vfs_readlink_54368 vfs_readlink 3 54368 NULL |
10072 |
@@ -109982,8 +109443,8 @@ index 0000000..05e26dd |
10073 |
+pvr2_debugifc_print_status_56890 pvr2_debugifc_print_status 3 56890 NULL |
10074 |
+__bitmap_clear_bits_56912 __bitmap_clear_bits 3 56912 NULL |
10075 |
+__kfifo_out_56927 __kfifo_out 0-3 56927 NULL |
10076 |
-+journal_init_revoke_56933 journal_init_revoke 2 56933 NULL nohasharray |
10077 |
-+CopyBufferToControlPacket_56933 CopyBufferToControlPacket 0 56933 &journal_init_revoke_56933 |
10078 |
++CopyBufferToControlPacket_56933 CopyBufferToControlPacket 0 56933 NULL nohasharray |
10079 |
++journal_init_revoke_56933 journal_init_revoke 2 56933 &CopyBufferToControlPacket_56933 |
10080 |
+diva_get_driver_info_56967 diva_get_driver_info 0 56967 NULL |
10081 |
+vlsi_alloc_ring_57003 vlsi_alloc_ring 3-4 57003 NULL |
10082 |
+btrfs_super_csum_size_57004 btrfs_super_csum_size 0 57004 NULL |
10083 |
@@ -110077,8 +109538,8 @@ index 0000000..05e26dd |
10084 |
+tt_response_fill_table_57902 tt_response_fill_table 1 57902 NULL |
10085 |
+xt_alloc_table_info_57903 xt_alloc_table_info 1 57903 NULL |
10086 |
+emi26_writememory_57908 emi26_writememory 4 57908 NULL |
10087 |
-+atomic_add_return_unchecked_57910 atomic_add_return_unchecked 0-1 57910 NULL nohasharray |
10088 |
-+iio_read_first_n_kfifo_57910 iio_read_first_n_kfifo 2 57910 &atomic_add_return_unchecked_57910 |
10089 |
++iio_read_first_n_kfifo_57910 iio_read_first_n_kfifo 2 57910 NULL nohasharray |
10090 |
++atomic_add_return_unchecked_57910 atomic_add_return_unchecked 0-1 57910 &iio_read_first_n_kfifo_57910 |
10091 |
+__snd_gf1_look16_57925 __snd_gf1_look16 0 57925 NULL |
10092 |
+sel_read_handle_unknown_57933 sel_read_handle_unknown 3 57933 NULL |
10093 |
+xfs_mru_cache_create_57943 xfs_mru_cache_create 3 57943 NULL |
10094 |
@@ -110271,8 +109732,8 @@ index 0000000..05e26dd |
10095 |
+sys_sched_getaffinity_60033 sys_sched_getaffinity 2 60033 NULL |
10096 |
+bio_integrity_hw_sectors_60039 bio_integrity_hw_sectors 0-2 60039 NULL |
10097 |
+do_ip6t_set_ctl_60040 do_ip6t_set_ctl 4 60040 NULL |
10098 |
-+vcs_size_60050 vcs_size 0 60050 NULL nohasharray |
10099 |
-+pin_2_irq_60050 pin_2_irq 0-3 60050 &vcs_size_60050 |
10100 |
++pin_2_irq_60050 pin_2_irq 0-3 60050 NULL nohasharray |
10101 |
++vcs_size_60050 vcs_size 0 60050 &pin_2_irq_60050 |
10102 |
+load_module_60056 load_module 2 60056 NULL nohasharray |
10103 |
+gru_alloc_gts_60056 gru_alloc_gts 3-2 60056 &load_module_60056 |
10104 |
+compat_writev_60063 compat_writev 3 60063 NULL |
10105 |
@@ -110293,6 +109754,7 @@ index 0000000..05e26dd |
10106 |
+printer_write_60276 printer_write 3 60276 NULL |
10107 |
+__pskb_pull_tail_60287 __pskb_pull_tail 2 60287 NULL |
10108 |
+do_xip_mapping_read_60297 do_xip_mapping_read 5 60297 NULL |
10109 |
++ext3_dir_llseek_60298 ext3_dir_llseek 2 60298 NULL |
10110 |
+getDataLength_60301 getDataLength 0 60301 NULL |
10111 |
+usb_alphatrack_write_60341 usb_alphatrack_write 3 60341 NULL |
10112 |
+__kfifo_from_user_r_60345 __kfifo_from_user_r 5-3 60345 NULL |
10113 |
|
10114 |
diff --git a/3.2.52/4425_grsec_remove_EI_PAX.patch b/3.2.53/4425_grsec_remove_EI_PAX.patch |
10115 |
similarity index 100% |
10116 |
rename from 3.2.52/4425_grsec_remove_EI_PAX.patch |
10117 |
rename to 3.2.53/4425_grsec_remove_EI_PAX.patch |
10118 |
|
10119 |
diff --git a/3.2.52/4427_force_XATTR_PAX_tmpfs.patch b/3.2.53/4427_force_XATTR_PAX_tmpfs.patch |
10120 |
similarity index 100% |
10121 |
rename from 3.2.52/4427_force_XATTR_PAX_tmpfs.patch |
10122 |
rename to 3.2.53/4427_force_XATTR_PAX_tmpfs.patch |
10123 |
|
10124 |
diff --git a/3.2.52/4430_grsec-remove-localversion-grsec.patch b/3.2.53/4430_grsec-remove-localversion-grsec.patch |
10125 |
similarity index 100% |
10126 |
rename from 3.2.52/4430_grsec-remove-localversion-grsec.patch |
10127 |
rename to 3.2.53/4430_grsec-remove-localversion-grsec.patch |
10128 |
|
10129 |
diff --git a/3.2.52/4435_grsec-mute-warnings.patch b/3.2.53/4435_grsec-mute-warnings.patch |
10130 |
similarity index 100% |
10131 |
rename from 3.2.52/4435_grsec-mute-warnings.patch |
10132 |
rename to 3.2.53/4435_grsec-mute-warnings.patch |
10133 |
|
10134 |
diff --git a/3.2.52/4440_grsec-remove-protected-paths.patch b/3.2.53/4440_grsec-remove-protected-paths.patch |
10135 |
similarity index 100% |
10136 |
rename from 3.2.52/4440_grsec-remove-protected-paths.patch |
10137 |
rename to 3.2.53/4440_grsec-remove-protected-paths.patch |
10138 |
|
10139 |
diff --git a/3.2.52/4450_grsec-kconfig-default-gids.patch b/3.2.53/4450_grsec-kconfig-default-gids.patch |
10140 |
similarity index 100% |
10141 |
rename from 3.2.52/4450_grsec-kconfig-default-gids.patch |
10142 |
rename to 3.2.53/4450_grsec-kconfig-default-gids.patch |
10143 |
|
10144 |
diff --git a/3.2.52/4465_selinux-avc_audit-log-curr_ip.patch b/3.2.53/4465_selinux-avc_audit-log-curr_ip.patch |
10145 |
similarity index 100% |
10146 |
rename from 3.2.52/4465_selinux-avc_audit-log-curr_ip.patch |
10147 |
rename to 3.2.53/4465_selinux-avc_audit-log-curr_ip.patch |
10148 |
|
10149 |
diff --git a/3.2.52/4470_disable-compat_vdso.patch b/3.2.53/4470_disable-compat_vdso.patch |
10150 |
similarity index 100% |
10151 |
rename from 3.2.52/4470_disable-compat_vdso.patch |
10152 |
rename to 3.2.53/4470_disable-compat_vdso.patch |
10153 |
|
10154 |
diff --git a/3.2.52/4475_emutramp_default_on.patch b/3.2.53/4475_emutramp_default_on.patch |
10155 |
similarity index 100% |
10156 |
rename from 3.2.52/4475_emutramp_default_on.patch |
10157 |
rename to 3.2.53/4475_emutramp_default_on.patch |