Gentoo Archives: gentoo-commits

From: "Mike Pagano (mpagano)" <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] linux-patches r2456 - genpatches-2.6/trunk/3.4
Date: Mon, 29 Jul 2013 00:42:37
Message-Id: 20130729004234.9C4772171C@flycatcher.gentoo.org
1 Author: mpagano
2 Date: 2013-07-29 00:42:34 +0000 (Mon, 29 Jul 2013)
3 New Revision: 2456
4
5 Added:
6 genpatches-2.6/trunk/3.4/1054_linux-3.4.55.patch
7 Modified:
8 genpatches-2.6/trunk/3.4/0000_README
9 Log:
10 Linux patch 3.4.55
11
12 Modified: genpatches-2.6/trunk/3.4/0000_README
13 ===================================================================
14 --- genpatches-2.6/trunk/3.4/0000_README 2013-07-29 00:39:20 UTC (rev 2455)
15 +++ genpatches-2.6/trunk/3.4/0000_README 2013-07-29 00:42:34 UTC (rev 2456)
16 @@ -255,6 +255,10 @@
17 From: http://www.kernel.org
18 Desc: Linux 3.4.54
19
20 +Patch: 1054_linux-3.4.55.patch
21 +From: http://www.kernel.org
22 +Desc: Linux 3.4.55
23 +
24 Patch: 1500_XATTR_USER_PREFIX.patch
25 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
26 Desc: Support for namespace user.pax.* on tmpfs.
27
28 Added: genpatches-2.6/trunk/3.4/1054_linux-3.4.55.patch
29 ===================================================================
30 --- genpatches-2.6/trunk/3.4/1054_linux-3.4.55.patch (rev 0)
31 +++ genpatches-2.6/trunk/3.4/1054_linux-3.4.55.patch 2013-07-29 00:42:34 UTC (rev 2456)
32 @@ -0,0 +1,1697 @@
33 +diff --git a/Makefile b/Makefile
34 +index 6ca3657..c11116f 100644
35 +--- a/Makefile
36 ++++ b/Makefile
37 +@@ -1,6 +1,6 @@
38 + VERSION = 3
39 + PATCHLEVEL = 4
40 +-SUBLEVEL = 54
41 ++SUBLEVEL = 55
42 + EXTRAVERSION =
43 + NAME = Saber-toothed Squirrel
44 +
45 +diff --git a/arch/sparc/kernel/asm-offsets.c b/arch/sparc/kernel/asm-offsets.c
46 +index 68f7e11..ce48203 100644
47 +--- a/arch/sparc/kernel/asm-offsets.c
48 ++++ b/arch/sparc/kernel/asm-offsets.c
49 +@@ -34,6 +34,8 @@ int foo(void)
50 + DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread));
51 + BLANK();
52 + DEFINE(AOFF_mm_context, offsetof(struct mm_struct, context));
53 ++ BLANK();
54 ++ DEFINE(VMA_VM_MM, offsetof(struct vm_area_struct, vm_mm));
55 +
56 + /* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */
57 + return 0;
58 +diff --git a/arch/sparc/mm/hypersparc.S b/arch/sparc/mm/hypersparc.S
59 +index 44aad32..969f964 100644
60 +--- a/arch/sparc/mm/hypersparc.S
61 ++++ b/arch/sparc/mm/hypersparc.S
62 +@@ -74,7 +74,7 @@ hypersparc_flush_cache_mm_out:
63 +
64 + /* The things we do for performance... */
65 + hypersparc_flush_cache_range:
66 +- ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
67 ++ ld [%o0 + VMA_VM_MM], %o0
68 + #ifndef CONFIG_SMP
69 + ld [%o0 + AOFF_mm_context], %g1
70 + cmp %g1, -1
71 +@@ -163,7 +163,7 @@ hypersparc_flush_cache_range_out:
72 + */
73 + /* Verified, my ass... */
74 + hypersparc_flush_cache_page:
75 +- ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
76 ++ ld [%o0 + VMA_VM_MM], %o0
77 + ld [%o0 + AOFF_mm_context], %g2
78 + #ifndef CONFIG_SMP
79 + cmp %g2, -1
80 +@@ -284,7 +284,7 @@ hypersparc_flush_tlb_mm_out:
81 + sta %g5, [%g1] ASI_M_MMUREGS
82 +
83 + hypersparc_flush_tlb_range:
84 +- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
85 ++ ld [%o0 + VMA_VM_MM], %o0
86 + mov SRMMU_CTX_REG, %g1
87 + ld [%o0 + AOFF_mm_context], %o3
88 + lda [%g1] ASI_M_MMUREGS, %g5
89 +@@ -307,7 +307,7 @@ hypersparc_flush_tlb_range_out:
90 + sta %g5, [%g1] ASI_M_MMUREGS
91 +
92 + hypersparc_flush_tlb_page:
93 +- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
94 ++ ld [%o0 + VMA_VM_MM], %o0
95 + mov SRMMU_CTX_REG, %g1
96 + ld [%o0 + AOFF_mm_context], %o3
97 + andn %o1, (PAGE_SIZE - 1), %o1
98 +diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
99 +index 0791618..7f8238f 100644
100 +--- a/arch/sparc/mm/init_64.c
101 ++++ b/arch/sparc/mm/init_64.c
102 +@@ -1067,7 +1067,14 @@ static int __init grab_mblocks(struct mdesc_handle *md)
103 + m->size = *val;
104 + val = mdesc_get_property(md, node,
105 + "address-congruence-offset", NULL);
106 +- m->offset = *val;
107 ++
108 ++ /* The address-congruence-offset property is optional.
109 ++ * Explicity zero it be identifty this.
110 ++ */
111 ++ if (val)
112 ++ m->offset = *val;
113 ++ else
114 ++ m->offset = 0UL;
115 +
116 + numadbg("MBLOCK[%d]: base[%llx] size[%llx] offset[%llx]\n",
117 + count - 1, m->base, m->size, m->offset);
118 +diff --git a/arch/sparc/mm/swift.S b/arch/sparc/mm/swift.S
119 +index c801c39..5d2b88d 100644
120 +--- a/arch/sparc/mm/swift.S
121 ++++ b/arch/sparc/mm/swift.S
122 +@@ -105,7 +105,7 @@ swift_flush_cache_mm_out:
123 +
124 + .globl swift_flush_cache_range
125 + swift_flush_cache_range:
126 +- ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
127 ++ ld [%o0 + VMA_VM_MM], %o0
128 + sub %o2, %o1, %o2
129 + sethi %hi(4096), %o3
130 + cmp %o2, %o3
131 +@@ -116,7 +116,7 @@ swift_flush_cache_range:
132 +
133 + .globl swift_flush_cache_page
134 + swift_flush_cache_page:
135 +- ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
136 ++ ld [%o0 + VMA_VM_MM], %o0
137 + 70:
138 + ld [%o0 + AOFF_mm_context], %g2
139 + cmp %g2, -1
140 +@@ -219,7 +219,7 @@ swift_flush_sig_insns:
141 + .globl swift_flush_tlb_range
142 + .globl swift_flush_tlb_all
143 + swift_flush_tlb_range:
144 +- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
145 ++ ld [%o0 + VMA_VM_MM], %o0
146 + swift_flush_tlb_mm:
147 + ld [%o0 + AOFF_mm_context], %g2
148 + cmp %g2, -1
149 +@@ -233,7 +233,7 @@ swift_flush_tlb_all_out:
150 +
151 + .globl swift_flush_tlb_page
152 + swift_flush_tlb_page:
153 +- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
154 ++ ld [%o0 + VMA_VM_MM], %o0
155 + mov SRMMU_CTX_REG, %g1
156 + ld [%o0 + AOFF_mm_context], %o3
157 + andn %o1, (PAGE_SIZE - 1), %o1
158 +diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c
159 +index afd021e..072f553 100644
160 +--- a/arch/sparc/mm/tlb.c
161 ++++ b/arch/sparc/mm/tlb.c
162 +@@ -115,8 +115,8 @@ no_cache_flush:
163 + }
164 +
165 + if (!tb->active) {
166 +- global_flush_tlb_page(mm, vaddr);
167 + flush_tsb_user_page(mm, vaddr);
168 ++ global_flush_tlb_page(mm, vaddr);
169 + goto out;
170 + }
171 +
172 +diff --git a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S
173 +index 4e55e8f..bf10a34 100644
174 +--- a/arch/sparc/mm/tsunami.S
175 ++++ b/arch/sparc/mm/tsunami.S
176 +@@ -24,7 +24,7 @@
177 + /* Sliiick... */
178 + tsunami_flush_cache_page:
179 + tsunami_flush_cache_range:
180 +- ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
181 ++ ld [%o0 + VMA_VM_MM], %o0
182 + tsunami_flush_cache_mm:
183 + ld [%o0 + AOFF_mm_context], %g2
184 + cmp %g2, -1
185 +@@ -46,7 +46,7 @@ tsunami_flush_sig_insns:
186 +
187 + /* More slick stuff... */
188 + tsunami_flush_tlb_range:
189 +- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
190 ++ ld [%o0 + VMA_VM_MM], %o0
191 + tsunami_flush_tlb_mm:
192 + ld [%o0 + AOFF_mm_context], %g2
193 + cmp %g2, -1
194 +@@ -65,7 +65,7 @@ tsunami_flush_tlb_out:
195 +
196 + /* This one can be done in a fine grained manner... */
197 + tsunami_flush_tlb_page:
198 +- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
199 ++ ld [%o0 + VMA_VM_MM], %o0
200 + mov SRMMU_CTX_REG, %g1
201 + ld [%o0 + AOFF_mm_context], %o3
202 + andn %o1, (PAGE_SIZE - 1), %o1
203 +diff --git a/arch/sparc/mm/viking.S b/arch/sparc/mm/viking.S
204 +index 6dfcc13..a516372 100644
205 +--- a/arch/sparc/mm/viking.S
206 ++++ b/arch/sparc/mm/viking.S
207 +@@ -109,7 +109,7 @@ viking_mxcc_flush_page:
208 + viking_flush_cache_page:
209 + viking_flush_cache_range:
210 + #ifndef CONFIG_SMP
211 +- ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */
212 ++ ld [%o0 + VMA_VM_MM], %o0
213 + #endif
214 + viking_flush_cache_mm:
215 + #ifndef CONFIG_SMP
216 +@@ -149,7 +149,7 @@ viking_flush_tlb_mm:
217 + #endif
218 +
219 + viking_flush_tlb_range:
220 +- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
221 ++ ld [%o0 + VMA_VM_MM], %o0
222 + mov SRMMU_CTX_REG, %g1
223 + ld [%o0 + AOFF_mm_context], %o3
224 + lda [%g1] ASI_M_MMUREGS, %g5
225 +@@ -174,7 +174,7 @@ viking_flush_tlb_range:
226 + #endif
227 +
228 + viking_flush_tlb_page:
229 +- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
230 ++ ld [%o0 + VMA_VM_MM], %o0
231 + mov SRMMU_CTX_REG, %g1
232 + ld [%o0 + AOFF_mm_context], %o3
233 + lda [%g1] ASI_M_MMUREGS, %g5
234 +@@ -240,7 +240,7 @@ sun4dsmp_flush_tlb_range:
235 + tst %g5
236 + bne 3f
237 + mov SRMMU_CTX_REG, %g1
238 +- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
239 ++ ld [%o0 + VMA_VM_MM], %o0
240 + ld [%o0 + AOFF_mm_context], %o3
241 + lda [%g1] ASI_M_MMUREGS, %g5
242 + sethi %hi(~((1 << SRMMU_PGDIR_SHIFT) - 1)), %o4
243 +@@ -266,7 +266,7 @@ sun4dsmp_flush_tlb_page:
244 + tst %g5
245 + bne 2f
246 + mov SRMMU_CTX_REG, %g1
247 +- ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */
248 ++ ld [%o0 + VMA_VM_MM], %o0
249 + ld [%o0 + AOFF_mm_context], %o3
250 + lda [%g1] ASI_M_MMUREGS, %g5
251 + and %o1, PAGE_MASK, %o1
252 +diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
253 +index af58f9b..45cc02b 100644
254 +--- a/drivers/ata/ata_piix.c
255 ++++ b/drivers/ata/ata_piix.c
256 +@@ -352,6 +352,8 @@ static const struct pci_device_id piix_pci_tbl[] = {
257 + /* SATA Controller IDE (BayTrail) */
258 + { 0x8086, 0x0F20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_byt },
259 + { 0x8086, 0x0F21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_byt },
260 ++ /* SATA Controller IDE (Coleto Creek) */
261 ++ { 0x8086, 0x23a6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
262 +
263 + { } /* terminate list */
264 + };
265 +diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
266 +index 21b80c5..f63a588 100644
267 +--- a/drivers/ata/libata-pmp.c
268 ++++ b/drivers/ata/libata-pmp.c
269 +@@ -389,9 +389,13 @@ static void sata_pmp_quirks(struct ata_port *ap)
270 + /* link reports offline after LPM */
271 + link->flags |= ATA_LFLAG_NO_LPM;
272 +
273 +- /* Class code report is unreliable. */
274 ++ /*
275 ++ * Class code report is unreliable and SRST times
276 ++ * out under certain configurations.
277 ++ */
278 + if (link->pmp < 5)
279 +- link->flags |= ATA_LFLAG_ASSUME_ATA;
280 ++ link->flags |= ATA_LFLAG_NO_SRST |
281 ++ ATA_LFLAG_ASSUME_ATA;
282 +
283 + /* port 5 is for SEMB device and it doesn't like SRST */
284 + if (link->pmp == 5)
285 +@@ -399,20 +403,17 @@ static void sata_pmp_quirks(struct ata_port *ap)
286 + ATA_LFLAG_ASSUME_SEMB;
287 + }
288 + } else if (vendor == 0x1095 && devid == 0x4723) {
289 +- /* sil4723 quirks */
290 +- ata_for_each_link(link, ap, EDGE) {
291 +- /* link reports offline after LPM */
292 +- link->flags |= ATA_LFLAG_NO_LPM;
293 +-
294 +- /* class code report is unreliable */
295 +- if (link->pmp < 2)
296 +- link->flags |= ATA_LFLAG_ASSUME_ATA;
297 +-
298 +- /* the config device at port 2 locks up on SRST */
299 +- if (link->pmp == 2)
300 +- link->flags |= ATA_LFLAG_NO_SRST |
301 +- ATA_LFLAG_ASSUME_ATA;
302 +- }
303 ++ /*
304 ++ * sil4723 quirks
305 ++ *
306 ++ * Link reports offline after LPM. Class code report is
307 ++ * unreliable. SIMG PMPs never got SRST reliable and the
308 ++ * config device at port 2 locks up on SRST.
309 ++ */
310 ++ ata_for_each_link(link, ap, EDGE)
311 ++ link->flags |= ATA_LFLAG_NO_LPM |
312 ++ ATA_LFLAG_NO_SRST |
313 ++ ATA_LFLAG_ASSUME_ATA;
314 + } else if (vendor == 0x1095 && devid == 0x4726) {
315 + /* sil4726 quirks */
316 + ata_for_each_link(link, ap, EDGE) {
317 +diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
318 +index 99a8444..c0536ed 100644
319 +--- a/drivers/iommu/amd_iommu.c
320 ++++ b/drivers/iommu/amd_iommu.c
321 +@@ -1309,6 +1309,10 @@ static unsigned long iommu_unmap_page(struct protection_domain *dom,
322 +
323 + /* Large PTE found which maps this address */
324 + unmap_size = PTE_PAGE_SIZE(*pte);
325 ++
326 ++ /* Only unmap from the first pte in the page */
327 ++ if ((unmap_size - 1) & bus_addr)
328 ++ break;
329 + count = PAGE_SIZE_PTE_COUNT(unmap_size);
330 + for (i = 0; i < count; i++)
331 + pte[i] = 0ULL;
332 +@@ -1318,7 +1322,7 @@ static unsigned long iommu_unmap_page(struct protection_domain *dom,
333 + unmapped += unmap_size;
334 + }
335 +
336 +- BUG_ON(!is_power_of_2(unmapped));
337 ++ BUG_ON(unmapped && !is_power_of_2(unmapped));
338 +
339 + return unmapped;
340 + }
341 +diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
342 +index bab0158..b33ad12 100644
343 +--- a/drivers/net/dummy.c
344 ++++ b/drivers/net/dummy.c
345 +@@ -186,6 +186,8 @@ static int __init dummy_init_module(void)
346 +
347 + rtnl_lock();
348 + err = __rtnl_link_register(&dummy_link_ops);
349 ++ if (err < 0)
350 ++ goto out;
351 +
352 + for (i = 0; i < numdummies && !err; i++) {
353 + err = dummy_init_one();
354 +@@ -193,6 +195,8 @@ static int __init dummy_init_module(void)
355 + }
356 + if (err < 0)
357 + __rtnl_link_unregister(&dummy_link_ops);
358 ++
359 ++out:
360 + rtnl_unlock();
361 +
362 + return err;
363 +diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
364 +index d53509e..d4a747a 100644
365 +--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
366 ++++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
367 +@@ -1688,8 +1688,8 @@ check_sum:
368 + return 0;
369 + }
370 +
371 +-static void atl1e_tx_map(struct atl1e_adapter *adapter,
372 +- struct sk_buff *skb, struct atl1e_tpd_desc *tpd)
373 ++static int atl1e_tx_map(struct atl1e_adapter *adapter,
374 ++ struct sk_buff *skb, struct atl1e_tpd_desc *tpd)
375 + {
376 + struct atl1e_tpd_desc *use_tpd = NULL;
377 + struct atl1e_tx_buffer *tx_buffer = NULL;
378 +@@ -1700,6 +1700,8 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter,
379 + u16 nr_frags;
380 + u16 f;
381 + int segment;
382 ++ int ring_start = adapter->tx_ring.next_to_use;
383 ++ int ring_end;
384 +
385 + nr_frags = skb_shinfo(skb)->nr_frags;
386 + segment = (tpd->word3 >> TPD_SEGMENT_EN_SHIFT) & TPD_SEGMENT_EN_MASK;
387 +@@ -1712,6 +1714,9 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter,
388 + tx_buffer->length = map_len;
389 + tx_buffer->dma = pci_map_single(adapter->pdev,
390 + skb->data, hdr_len, PCI_DMA_TODEVICE);
391 ++ if (dma_mapping_error(&adapter->pdev->dev, tx_buffer->dma))
392 ++ return -ENOSPC;
393 ++
394 + ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_SINGLE);
395 + mapped_len += map_len;
396 + use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma);
397 +@@ -1738,6 +1743,22 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter,
398 + tx_buffer->dma =
399 + pci_map_single(adapter->pdev, skb->data + mapped_len,
400 + map_len, PCI_DMA_TODEVICE);
401 ++
402 ++ if (dma_mapping_error(&adapter->pdev->dev, tx_buffer->dma)) {
403 ++ /* We need to unwind the mappings we've done */
404 ++ ring_end = adapter->tx_ring.next_to_use;
405 ++ adapter->tx_ring.next_to_use = ring_start;
406 ++ while (adapter->tx_ring.next_to_use != ring_end) {
407 ++ tpd = atl1e_get_tpd(adapter);
408 ++ tx_buffer = atl1e_get_tx_buffer(adapter, tpd);
409 ++ pci_unmap_single(adapter->pdev, tx_buffer->dma,
410 ++ tx_buffer->length, PCI_DMA_TODEVICE);
411 ++ }
412 ++ /* Reset the tx rings next pointer */
413 ++ adapter->tx_ring.next_to_use = ring_start;
414 ++ return -ENOSPC;
415 ++ }
416 ++
417 + ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_SINGLE);
418 + mapped_len += map_len;
419 + use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma);
420 +@@ -1773,6 +1794,23 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter,
421 + (i * MAX_TX_BUF_LEN),
422 + tx_buffer->length,
423 + DMA_TO_DEVICE);
424 ++
425 ++ if (dma_mapping_error(&adapter->pdev->dev, tx_buffer->dma)) {
426 ++ /* We need to unwind the mappings we've done */
427 ++ ring_end = adapter->tx_ring.next_to_use;
428 ++ adapter->tx_ring.next_to_use = ring_start;
429 ++ while (adapter->tx_ring.next_to_use != ring_end) {
430 ++ tpd = atl1e_get_tpd(adapter);
431 ++ tx_buffer = atl1e_get_tx_buffer(adapter, tpd);
432 ++ dma_unmap_page(&adapter->pdev->dev, tx_buffer->dma,
433 ++ tx_buffer->length, DMA_TO_DEVICE);
434 ++ }
435 ++
436 ++ /* Reset the ring next to use pointer */
437 ++ adapter->tx_ring.next_to_use = ring_start;
438 ++ return -ENOSPC;
439 ++ }
440 ++
441 + ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_PAGE);
442 + use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma);
443 + use_tpd->word2 = (use_tpd->word2 & (~TPD_BUFLEN_MASK)) |
444 +@@ -1790,6 +1828,7 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter,
445 + /* The last buffer info contain the skb address,
446 + so it will be free after unmap */
447 + tx_buffer->skb = skb;
448 ++ return 0;
449 + }
450 +
451 + static void atl1e_tx_queue(struct atl1e_adapter *adapter, u16 count,
452 +@@ -1857,10 +1896,15 @@ static netdev_tx_t atl1e_xmit_frame(struct sk_buff *skb,
453 + return NETDEV_TX_OK;
454 + }
455 +
456 +- atl1e_tx_map(adapter, skb, tpd);
457 ++ if (atl1e_tx_map(adapter, skb, tpd)) {
458 ++ dev_kfree_skb_any(skb);
459 ++ goto out;
460 ++ }
461 ++
462 + atl1e_tx_queue(adapter, tpd_req, tpd);
463 +
464 + netdev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */
465 ++out:
466 + spin_unlock_irqrestore(&adapter->tx_lock, flags);
467 + return NETDEV_TX_OK;
468 + }
469 +diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
470 +index d63e09b..16caeba 100644
471 +--- a/drivers/net/ethernet/renesas/sh_eth.c
472 ++++ b/drivers/net/ethernet/renesas/sh_eth.c
473 +@@ -137,8 +137,9 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
474 + .rmcr_value = 0x00000001,
475 +
476 + .tx_check = EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO,
477 +- .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RDE |
478 +- EESR_RFRMER | EESR_TFE | EESR_TDE | EESR_ECI,
479 ++ .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE |
480 ++ EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE |
481 ++ EESR_ECI,
482 + .tx_error_check = EESR_TWB | EESR_TABT | EESR_TDE | EESR_TFE,
483 +
484 + .apr = 1,
485 +@@ -252,9 +253,9 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data_giga = {
486 + .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
487 +
488 + .tx_check = EESR_TC1 | EESR_FTC,
489 +- .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT | \
490 +- EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE | \
491 +- EESR_ECI,
492 ++ .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT |
493 ++ EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE |
494 ++ EESR_TDE | EESR_ECI,
495 + .tx_error_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_TDE | \
496 + EESR_TFE,
497 + .fdr_value = 0x0000072f,
498 +@@ -361,9 +362,9 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
499 + .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
500 +
501 + .tx_check = EESR_TC1 | EESR_FTC,
502 +- .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT | \
503 +- EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE | \
504 +- EESR_ECI,
505 ++ .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT |
506 ++ EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE |
507 ++ EESR_TDE | EESR_ECI,
508 + .tx_error_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_TDE | \
509 + EESR_TFE,
510 +
511 +diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h
512 +index 0fa14afc..c49097f 100644
513 +--- a/drivers/net/ethernet/renesas/sh_eth.h
514 ++++ b/drivers/net/ethernet/renesas/sh_eth.h
515 +@@ -467,7 +467,7 @@ enum EESR_BIT {
516 +
517 + #define DEFAULT_TX_CHECK (EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | \
518 + EESR_RTO)
519 +-#define DEFAULT_EESR_ERR_CHECK (EESR_TWB | EESR_TABT | EESR_RABT | \
520 ++#define DEFAULT_EESR_ERR_CHECK (EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE | \
521 + EESR_RDE | EESR_RFRMER | EESR_ADE | \
522 + EESR_TFE | EESR_TDE | EESR_ECI)
523 + #define DEFAULT_TX_ERROR_CHECK (EESR_TWB | EESR_TABT | EESR_ADE | EESR_TDE | \
524 +diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
525 +index 38e3ae9..8e2ac64 100644
526 +--- a/drivers/net/ethernet/sun/sunvnet.c
527 ++++ b/drivers/net/ethernet/sun/sunvnet.c
528 +@@ -1243,6 +1243,8 @@ static int vnet_port_remove(struct vio_dev *vdev)
529 + dev_set_drvdata(&vdev->dev, NULL);
530 +
531 + kfree(port);
532 ++
533 ++ unregister_netdev(vp->dev);
534 + }
535 + return 0;
536 + }
537 +diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
538 +index 344dceb..635d01c 100644
539 +--- a/drivers/net/ifb.c
540 ++++ b/drivers/net/ifb.c
541 +@@ -290,11 +290,17 @@ static int __init ifb_init_module(void)
542 +
543 + rtnl_lock();
544 + err = __rtnl_link_register(&ifb_link_ops);
545 ++ if (err < 0)
546 ++ goto out;
547 +
548 +- for (i = 0; i < numifbs && !err; i++)
549 ++ for (i = 0; i < numifbs && !err; i++) {
550 + err = ifb_init_one(i);
551 ++ cond_resched();
552 ++ }
553 + if (err)
554 + __rtnl_link_unregister(&ifb_link_ops);
555 ++
556 ++out:
557 + rtnl_unlock();
558 +
559 + return err;
560 +diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
561 +index b99c418..5151f06 100644
562 +--- a/drivers/net/macvtap.c
563 ++++ b/drivers/net/macvtap.c
564 +@@ -534,8 +534,10 @@ static int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from,
565 + return -EMSGSIZE;
566 + num_pages = get_user_pages_fast(base, size, 0, &page[i]);
567 + if (num_pages != size) {
568 +- for (i = 0; i < num_pages; i++)
569 +- put_page(page[i]);
570 ++ int j;
571 ++
572 ++ for (j = 0; j < num_pages; j++)
573 ++ put_page(page[i + j]);
574 + }
575 + truesize = size * PAGE_SIZE;
576 + skb->data_len += len;
577 +@@ -654,6 +656,7 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m,
578 + int vnet_hdr_len = 0;
579 + int copylen = 0;
580 + bool zerocopy = false;
581 ++ size_t linear;
582 +
583 + if (q->flags & IFF_VNET_HDR) {
584 + vnet_hdr_len = q->vnet_hdr_sz;
585 +@@ -708,11 +711,14 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m,
586 + copylen = vnet_hdr.hdr_len;
587 + if (!copylen)
588 + copylen = GOODCOPY_LEN;
589 +- } else
590 ++ linear = copylen;
591 ++ } else {
592 + copylen = len;
593 ++ linear = vnet_hdr.hdr_len;
594 ++ }
595 +
596 + skb = macvtap_alloc_skb(&q->sk, NET_IP_ALIGN, copylen,
597 +- vnet_hdr.hdr_len, noblock, &err);
598 ++ linear, noblock, &err);
599 + if (!skb)
600 + goto err;
601 +
602 +diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
603 +index bbd249d..85e7453 100644
604 +--- a/drivers/net/wireless/ath/ath9k/calib.c
605 ++++ b/drivers/net/wireless/ath/ath9k/calib.c
606 +@@ -389,7 +389,6 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan)
607 +
608 + if (!caldata) {
609 + chan->noisefloor = nf;
610 +- ah->noise = ath9k_hw_getchan_noise(ah, chan);
611 + return false;
612 + }
613 +
614 +diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
615 +index 2ce6bf5..72cb121 100644
616 +--- a/drivers/net/wireless/rt2x00/rt2800lib.c
617 ++++ b/drivers/net/wireless/rt2x00/rt2800lib.c
618 +@@ -4627,8 +4627,8 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
619 + default_power2 = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A2);
620 +
621 + for (i = 14; i < spec->num_channels; i++) {
622 +- info[i].default_power1 = default_power1[i];
623 +- info[i].default_power2 = default_power2[i];
624 ++ info[i].default_power1 = default_power1[i - 14];
625 ++ info[i].default_power2 = default_power2[i - 14];
626 + }
627 + }
628 +
629 +diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
630 +index bdaba3f..0cb0eec 100644
631 +--- a/drivers/net/wireless/rt2x00/rt61pci.c
632 ++++ b/drivers/net/wireless/rt2x00/rt61pci.c
633 +@@ -2822,7 +2822,8 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
634 + tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START);
635 + for (i = 14; i < spec->num_channels; i++) {
636 + info[i].max_power = MAX_TXPOWER;
637 +- info[i].default_power1 = TXPOWER_FROM_DEV(tx_power[i]);
638 ++ info[i].default_power1 =
639 ++ TXPOWER_FROM_DEV(tx_power[i - 14]);
640 + }
641 + }
642 +
643 +diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
644 +index fda8671..ffdd32e 100644
645 +--- a/drivers/net/wireless/rt2x00/rt73usb.c
646 ++++ b/drivers/net/wireless/rt2x00/rt73usb.c
647 +@@ -2167,7 +2167,8 @@ static int rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
648 + tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START);
649 + for (i = 14; i < spec->num_channels; i++) {
650 + info[i].max_power = MAX_TXPOWER;
651 +- info[i].default_power1 = TXPOWER_FROM_DEV(tx_power[i]);
652 ++ info[i].default_power1 =
653 ++ TXPOWER_FROM_DEV(tx_power[i - 14]);
654 + }
655 + }
656 +
657 +diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
658 +index 2136fc2..5fdf70b 100644
659 +--- a/drivers/s390/scsi/zfcp_fsf.c
660 ++++ b/drivers/s390/scsi/zfcp_fsf.c
661 +@@ -563,6 +563,10 @@ static void zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *req)
662 + fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN;
663 + adapter->hydra_version = 0;
664 +
665 ++ /* avoids adapter shutdown to be able to recognize
666 ++ * events such as LINK UP */
667 ++ atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK,
668 ++ &adapter->status);
669 + zfcp_fsf_link_down_info_eval(req,
670 + &qtcb->header.fsf_status_qual.link_down_info);
671 + break;
672 +diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
673 +index b79576b..7b35364 100644
674 +--- a/drivers/s390/scsi/zfcp_scsi.c
675 ++++ b/drivers/s390/scsi/zfcp_scsi.c
676 +@@ -3,7 +3,7 @@
677 + *
678 + * Interface to Linux SCSI midlayer.
679 + *
680 +- * Copyright IBM Corporation 2002, 2010
681 ++ * Copyright IBM Corp. 2002, 2013
682 + */
683 +
684 + #define KMSG_COMPONENT "zfcp"
685 +@@ -311,8 +311,12 @@ static struct scsi_host_template zfcp_scsi_host_template = {
686 + .proc_name = "zfcp",
687 + .can_queue = 4096,
688 + .this_id = -1,
689 +- .sg_tablesize = 1, /* adjusted later */
690 +- .max_sectors = 8, /* adjusted later */
691 ++ .sg_tablesize = (((QDIO_MAX_ELEMENTS_PER_BUFFER - 1)
692 ++ * ZFCP_QDIO_MAX_SBALS_PER_REQ) - 2),
693 ++ /* GCD, adjusted later */
694 ++ .max_sectors = (((QDIO_MAX_ELEMENTS_PER_BUFFER - 1)
695 ++ * ZFCP_QDIO_MAX_SBALS_PER_REQ) - 2) * 8,
696 ++ /* GCD, adjusted later */
697 + .dma_boundary = ZFCP_QDIO_SBALE_LEN - 1,
698 + .cmd_per_lun = 1,
699 + .use_clustering = 1,
700 +diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
701 +index e897ce9..f8a2d12 100644
702 +--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
703 ++++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
704 +@@ -1786,7 +1786,7 @@ static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req,
705 + fcp_sns_len = SCSI_SENSE_BUFFERSIZE;
706 + }
707 +
708 +- memset(sc_cmd->sense_buffer, 0, sizeof(sc_cmd->sense_buffer));
709 ++ memset(sc_cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
710 + if (fcp_sns_len)
711 + memcpy(sc_cmd->sense_buffer, rq_data, fcp_sns_len);
712 +
713 +diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
714 +index 6308a8d..073d5ad 100644
715 +--- a/drivers/scsi/megaraid/megaraid_sas_base.c
716 ++++ b/drivers/scsi/megaraid/megaraid_sas_base.c
717 +@@ -4817,10 +4817,12 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
718 + sense, sense_handle);
719 + }
720 +
721 +- for (i = 0; i < ioc->sge_count && kbuff_arr[i]; i++) {
722 +- dma_free_coherent(&instance->pdev->dev,
723 +- kern_sge32[i].length,
724 +- kbuff_arr[i], kern_sge32[i].phys_addr);
725 ++ for (i = 0; i < ioc->sge_count; i++) {
726 ++ if (kbuff_arr[i])
727 ++ dma_free_coherent(&instance->pdev->dev,
728 ++ kern_sge32[i].length,
729 ++ kbuff_arr[i],
730 ++ kern_sge32[i].phys_addr);
731 + }
732 +
733 + megasas_return_cmd(instance, cmd);
734 +diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
735 +index d953a57..35a05d1 100644
736 +--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
737 ++++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
738 +@@ -3963,11 +3963,7 @@ _scsih_qcmd_lck(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *))
739 + else
740 + mpi_control |= MPI2_SCSIIO_CONTROL_SIMPLEQ;
741 + } else
742 +-/* MPI Revision I (UNIT = 0xA) - removed MPI2_SCSIIO_CONTROL_UNTAGGED */
743 +-/* mpi_control |= MPI2_SCSIIO_CONTROL_UNTAGGED;
744 +- */
745 +- mpi_control |= (0x500);
746 +-
747 ++ mpi_control |= MPI2_SCSIIO_CONTROL_SIMPLEQ;
748 + } else
749 + mpi_control |= MPI2_SCSIIO_CONTROL_SIMPLEQ;
750 + /* Make sure Device is not raid volume.
751 +diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
752 +index d9811e4..b53065b 100644
753 +--- a/drivers/usb/serial/cp210x.c
754 ++++ b/drivers/usb/serial/cp210x.c
755 +@@ -60,6 +60,7 @@ static const struct usb_device_id id_table[] = {
756 + { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
757 + { USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
758 + { USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */
759 ++ { USB_DEVICE(0x0846, 0x1100) }, /* NetGear Managed Switch M4100 series, M5300 series, M7100 series */
760 + { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
761 + { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */
762 + { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */
763 +@@ -124,6 +125,8 @@ static const struct usb_device_id id_table[] = {
764 + { USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */
765 + { USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */
766 + { USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */
767 ++ { USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */
768 ++ { USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */
769 + { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
770 + { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
771 + { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
772 +@@ -154,6 +157,7 @@ static const struct usb_device_id id_table[] = {
773 + { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
774 + { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
775 + { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
776 ++ { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
777 + { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
778 + { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */
779 + { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */
780 +diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
781 +index 33e20e4..a37f14c 100644
782 +--- a/drivers/usb/serial/option.c
783 ++++ b/drivers/usb/serial/option.c
784 +@@ -347,17 +347,12 @@ static void option_instat_callback(struct urb *urb);
785 + #define OLIVETTI_VENDOR_ID 0x0b3c
786 + #define OLIVETTI_PRODUCT_OLICARD100 0xc000
787 + #define OLIVETTI_PRODUCT_OLICARD145 0xc003
788 ++#define OLIVETTI_PRODUCT_OLICARD200 0xc005
789 +
790 + /* Celot products */
791 + #define CELOT_VENDOR_ID 0x211f
792 + #define CELOT_PRODUCT_CT680M 0x6801
793 +
794 +-/* ONDA Communication vendor id */
795 +-#define ONDA_VENDOR_ID 0x1ee8
796 +-
797 +-/* ONDA MT825UP HSDPA 14.2 modem */
798 +-#define ONDA_MT825UP 0x000b
799 +-
800 + /* Samsung products */
801 + #define SAMSUNG_VENDOR_ID 0x04e8
802 + #define SAMSUNG_PRODUCT_GT_B3730 0x6889
803 +@@ -450,7 +445,8 @@ static void option_instat_callback(struct urb *urb);
804 +
805 + /* Hyundai Petatel Inc. products */
806 + #define PETATEL_VENDOR_ID 0x1ff4
807 +-#define PETATEL_PRODUCT_NP10T 0x600e
808 ++#define PETATEL_PRODUCT_NP10T_600A 0x600a
809 ++#define PETATEL_PRODUCT_NP10T_600E 0x600e
810 +
811 + /* TP-LINK Incorporated products */
812 + #define TPLINK_VENDOR_ID 0x2357
813 +@@ -797,6 +793,7 @@ static const struct usb_device_id option_ids[] = {
814 + { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
815 + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
816 + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
817 ++ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
818 + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */
819 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */
820 + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) },
821 +@@ -832,7 +829,8 @@ static const struct usb_device_id option_ids[] = {
822 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff),
823 + .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
824 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0018, 0xff, 0xff, 0xff) },
825 +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff) },
826 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff),
827 ++ .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
828 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0020, 0xff, 0xff, 0xff) },
829 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0021, 0xff, 0xff, 0xff),
830 + .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
831 +@@ -1278,8 +1276,8 @@ static const struct usb_device_id option_ids[] = {
832 +
833 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) },
834 + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) },
835 ++ { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200) },
836 + { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */
837 +- { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */
838 + { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/
839 + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) },
840 + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM610) },
841 +@@ -1351,9 +1349,12 @@ static const struct usb_device_id option_ids[] = {
842 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) },
843 + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) },
844 + { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
845 +- { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) },
846 ++ { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) },
847 ++ { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) },
848 + { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180),
849 + .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
850 ++ { USB_DEVICE(TPLINK_VENDOR_ID, 0x9000), /* TP-Link MA260 */
851 ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
852 + { USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) },
853 + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x02, 0x01) }, /* D-Link DWM-156 (variant) */
854 + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x00, 0x00) }, /* D-Link DWM-156 (variant) */
855 +@@ -1361,6 +1362,8 @@ static const struct usb_device_id option_ids[] = {
856 + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) },
857 + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) },
858 + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) },
859 ++ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */
860 ++ { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */
861 + { } /* Terminating entry */
862 + };
863 + MODULE_DEVICE_TABLE(usb, option_ids);
864 +diff --git a/fs/block_dev.c b/fs/block_dev.c
865 +index 2f3879c..319d9c7 100644
866 +--- a/fs/block_dev.c
867 ++++ b/fs/block_dev.c
868 +@@ -57,17 +57,24 @@ static void bdev_inode_switch_bdi(struct inode *inode,
869 + struct backing_dev_info *dst)
870 + {
871 + struct backing_dev_info *old = inode->i_data.backing_dev_info;
872 ++ bool wakeup_bdi = false;
873 +
874 + if (unlikely(dst == old)) /* deadlock avoidance */
875 + return;
876 + bdi_lock_two(&old->wb, &dst->wb);
877 + spin_lock(&inode->i_lock);
878 + inode->i_data.backing_dev_info = dst;
879 +- if (inode->i_state & I_DIRTY)
880 ++ if (inode->i_state & I_DIRTY) {
881 ++ if (bdi_cap_writeback_dirty(dst) && !wb_has_dirty_io(&dst->wb))
882 ++ wakeup_bdi = true;
883 + list_move(&inode->i_wb_list, &dst->wb.b_dirty);
884 ++ }
885 + spin_unlock(&inode->i_lock);
886 + spin_unlock(&old->wb.list_lock);
887 + spin_unlock(&dst->wb.list_lock);
888 ++
889 ++ if (wakeup_bdi)
890 ++ bdi_wakeup_thread_delayed(dst);
891 + }
892 +
893 + sector_t blkdev_max_block(struct block_device *bdev)
894 +diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
895 +index 0752817..aad0f39 100644
896 +--- a/fs/ext3/inode.c
897 ++++ b/fs/ext3/inode.c
898 +@@ -218,7 +218,8 @@ void ext3_evict_inode (struct inode *inode)
899 + */
900 + if (inode->i_nlink && ext3_should_journal_data(inode) &&
901 + EXT3_SB(inode->i_sb)->s_journal &&
902 +- (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode))) {
903 ++ (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode)) &&
904 ++ inode->i_ino != EXT3_JOURNAL_INO) {
905 + tid_t commit_tid = atomic_read(&ei->i_datasync_tid);
906 + journal_t *journal = EXT3_SB(inode->i_sb)->s_journal;
907 +
908 +diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
909 +index e46353f..aff1c61 100644
910 +--- a/fs/lockd/svclock.c
911 ++++ b/fs/lockd/svclock.c
912 +@@ -941,6 +941,7 @@ nlmsvc_retry_blocked(void)
913 + unsigned long timeout = MAX_SCHEDULE_TIMEOUT;
914 + struct nlm_block *block;
915 +
916 ++ spin_lock(&nlm_blocked_lock);
917 + while (!list_empty(&nlm_blocked) && !kthread_should_stop()) {
918 + block = list_entry(nlm_blocked.next, struct nlm_block, b_list);
919 +
920 +@@ -950,6 +951,7 @@ nlmsvc_retry_blocked(void)
921 + timeout = block->b_when - jiffies;
922 + break;
923 + }
924 ++ spin_unlock(&nlm_blocked_lock);
925 +
926 + dprintk("nlmsvc_retry_blocked(%p, when=%ld)\n",
927 + block, block->b_when);
928 +@@ -959,7 +961,9 @@ nlmsvc_retry_blocked(void)
929 + retry_deferred_block(block);
930 + } else
931 + nlmsvc_grant_blocked(block);
932 ++ spin_lock(&nlm_blocked_lock);
933 + }
934 ++ spin_unlock(&nlm_blocked_lock);
935 +
936 + return timeout;
937 + }
938 +diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
939 +index b5f927f..732c962 100644
940 +--- a/include/linux/if_pppox.h
941 ++++ b/include/linux/if_pppox.h
942 +@@ -128,11 +128,11 @@ struct pppoe_tag {
943 +
944 + struct pppoe_hdr {
945 + #if defined(__LITTLE_ENDIAN_BITFIELD)
946 +- __u8 ver : 4;
947 + __u8 type : 4;
948 ++ __u8 ver : 4;
949 + #elif defined(__BIG_ENDIAN_BITFIELD)
950 +- __u8 type : 4;
951 + __u8 ver : 4;
952 ++ __u8 type : 4;
953 + #else
954 + #error "Please fix <asm/byteorder.h>"
955 + #endif
956 +diff --git a/include/net/addrconf.h b/include/net/addrconf.h
957 +index 757a176..1a77dbb 100644
958 +--- a/include/net/addrconf.h
959 ++++ b/include/net/addrconf.h
960 +@@ -81,6 +81,9 @@ extern int ipv6_dev_get_saddr(struct net *net,
961 + const struct in6_addr *daddr,
962 + unsigned int srcprefs,
963 + struct in6_addr *saddr);
964 ++extern int __ipv6_get_lladdr(struct inet6_dev *idev,
965 ++ struct in6_addr *addr,
966 ++ unsigned char banned_flags);
967 + extern int ipv6_get_lladdr(struct net_device *dev,
968 + struct in6_addr *addr,
969 + unsigned char banned_flags);
970 +diff --git a/include/net/udp.h b/include/net/udp.h
971 +index 5d606d9..d0bf5b6 100644
972 +--- a/include/net/udp.h
973 ++++ b/include/net/udp.h
974 +@@ -181,6 +181,7 @@ extern int udp_get_port(struct sock *sk, unsigned short snum,
975 + extern void udp_err(struct sk_buff *, u32);
976 + extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk,
977 + struct msghdr *msg, size_t len);
978 ++extern int udp_push_pending_frames(struct sock *sk);
979 + extern void udp_flush_pending_frames(struct sock *sk);
980 + extern int udp_rcv(struct sk_buff *skb);
981 + extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg);
982 +diff --git a/kernel/events/core.c b/kernel/events/core.c
983 +index 7ceb270..d074cf0 100644
984 +--- a/kernel/events/core.c
985 ++++ b/kernel/events/core.c
986 +@@ -719,8 +719,18 @@ perf_lock_task_context(struct task_struct *task, int ctxn, unsigned long *flags)
987 + {
988 + struct perf_event_context *ctx;
989 +
990 +- rcu_read_lock();
991 + retry:
992 ++ /*
993 ++ * One of the few rules of preemptible RCU is that one cannot do
994 ++ * rcu_read_unlock() while holding a scheduler (or nested) lock when
995 ++ * part of the read side critical section was preemptible -- see
996 ++ * rcu_read_unlock_special().
997 ++ *
998 ++ * Since ctx->lock nests under rq->lock we must ensure the entire read
999 ++ * side critical section is non-preemptible.
1000 ++ */
1001 ++ preempt_disable();
1002 ++ rcu_read_lock();
1003 + ctx = rcu_dereference(task->perf_event_ctxp[ctxn]);
1004 + if (ctx) {
1005 + /*
1006 +@@ -736,6 +746,8 @@ retry:
1007 + raw_spin_lock_irqsave(&ctx->lock, *flags);
1008 + if (ctx != rcu_dereference(task->perf_event_ctxp[ctxn])) {
1009 + raw_spin_unlock_irqrestore(&ctx->lock, *flags);
1010 ++ rcu_read_unlock();
1011 ++ preempt_enable();
1012 + goto retry;
1013 + }
1014 +
1015 +@@ -745,6 +757,7 @@ retry:
1016 + }
1017 + }
1018 + rcu_read_unlock();
1019 ++ preempt_enable();
1020 + return ctx;
1021 + }
1022 +
1023 +@@ -1702,7 +1715,16 @@ static int __perf_event_enable(void *info)
1024 + struct perf_cpu_context *cpuctx = __get_cpu_context(ctx);
1025 + int err;
1026 +
1027 +- if (WARN_ON_ONCE(!ctx->is_active))
1028 ++ /*
1029 ++ * There's a time window between 'ctx->is_active' check
1030 ++ * in perf_event_enable function and this place having:
1031 ++ * - IRQs on
1032 ++ * - ctx->lock unlocked
1033 ++ *
1034 ++ * where the task could be killed and 'ctx' deactivated
1035 ++ * by perf_event_exit_task.
1036 ++ */
1037 ++ if (!ctx->is_active)
1038 + return -EINVAL;
1039 +
1040 + raw_spin_lock(&ctx->lock);
1041 +@@ -6933,7 +6955,7 @@ inherit_task_group(struct perf_event *event, struct task_struct *parent,
1042 + * child.
1043 + */
1044 +
1045 +- child_ctx = alloc_perf_context(event->pmu, child);
1046 ++ child_ctx = alloc_perf_context(parent_ctx->pmu, child);
1047 + if (!child_ctx)
1048 + return -ENOMEM;
1049 +
1050 +diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
1051 +index 60f7e32..a57ef25 100644
1052 +--- a/kernel/hrtimer.c
1053 ++++ b/kernel/hrtimer.c
1054 +@@ -707,17 +707,20 @@ static int hrtimer_switch_to_hres(void)
1055 + return 1;
1056 + }
1057 +
1058 ++static void clock_was_set_work(struct work_struct *work)
1059 ++{
1060 ++ clock_was_set();
1061 ++}
1062 ++
1063 ++static DECLARE_WORK(hrtimer_work, clock_was_set_work);
1064 ++
1065 + /*
1066 +- * Called from timekeeping code to reprogramm the hrtimer interrupt
1067 +- * device. If called from the timer interrupt context we defer it to
1068 +- * softirq context.
1069 ++ * Called from timekeeping and resume code to reprogramm the hrtimer
1070 ++ * interrupt device on all cpus.
1071 + */
1072 + void clock_was_set_delayed(void)
1073 + {
1074 +- struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases);
1075 +-
1076 +- cpu_base->clock_was_set = 1;
1077 +- __raise_softirq_irqoff(HRTIMER_SOFTIRQ);
1078 ++ schedule_work(&hrtimer_work);
1079 + }
1080 +
1081 + #else
1082 +@@ -766,8 +769,10 @@ void hrtimers_resume(void)
1083 + WARN_ONCE(!irqs_disabled(),
1084 + KERN_INFO "hrtimers_resume() called with IRQs enabled!");
1085 +
1086 ++ /* Retrigger on the local CPU */
1087 + retrigger_next_event(NULL);
1088 +- timerfd_clock_was_set();
1089 ++ /* And schedule a retrigger for all others */
1090 ++ clock_was_set_delayed();
1091 + }
1092 +
1093 + static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer)
1094 +@@ -1416,13 +1421,6 @@ void hrtimer_peek_ahead_timers(void)
1095 +
1096 + static void run_hrtimer_softirq(struct softirq_action *h)
1097 + {
1098 +- struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases);
1099 +-
1100 +- if (cpu_base->clock_was_set) {
1101 +- cpu_base->clock_was_set = 0;
1102 +- clock_was_set();
1103 +- }
1104 +-
1105 + hrtimer_peek_ahead_timers();
1106 + }
1107 +
1108 +diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
1109 +index 239a323..f8961bf 100644
1110 +--- a/kernel/time/tick-broadcast.c
1111 ++++ b/kernel/time/tick-broadcast.c
1112 +@@ -400,7 +400,15 @@ void tick_check_oneshot_broadcast(int cpu)
1113 + if (cpumask_test_cpu(cpu, to_cpumask(tick_broadcast_oneshot_mask))) {
1114 + struct tick_device *td = &per_cpu(tick_cpu_device, cpu);
1115 +
1116 +- clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_ONESHOT);
1117 ++ /*
1118 ++ * We might be in the middle of switching over from
1119 ++ * periodic to oneshot. If the CPU has not yet
1120 ++ * switched over, leave the device alone.
1121 ++ */
1122 ++ if (td->mode == TICKDEV_MODE_ONESHOT) {
1123 ++ clockevents_set_mode(td->evtdev,
1124 ++ CLOCK_EVT_MODE_ONESHOT);
1125 ++ }
1126 + }
1127 + }
1128 +
1129 +diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
1130 +index 75c11bf..13cd224 100644
1131 +--- a/kernel/trace/trace.c
1132 ++++ b/kernel/trace/trace.c
1133 +@@ -687,7 +687,15 @@ __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
1134 +
1135 + memcpy(max_data->comm, tsk->comm, TASK_COMM_LEN);
1136 + max_data->pid = tsk->pid;
1137 +- max_data->uid = task_uid(tsk);
1138 ++ /*
1139 ++ * If tsk == current, then use current_uid(), as that does not use
1140 ++ * RCU. The irq tracer can be called out of RCU scope.
1141 ++ */
1142 ++ if (tsk == current)
1143 ++ max_data->uid = current_uid();
1144 ++ else
1145 ++ max_data->uid = task_uid(tsk);
1146 ++
1147 + max_data->nice = tsk->static_prio - 20 - MAX_RT_PRIO;
1148 + max_data->policy = tsk->policy;
1149 + max_data->rt_priority = tsk->rt_priority;
1150 +diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
1151 +index 96fc733..e675182 100644
1152 +--- a/kernel/trace/trace_syscalls.c
1153 ++++ b/kernel/trace/trace_syscalls.c
1154 +@@ -305,6 +305,8 @@ void ftrace_syscall_enter(void *ignore, struct pt_regs *regs, long id)
1155 + struct ring_buffer *buffer;
1156 + int size;
1157 + int syscall_nr;
1158 ++ unsigned long irq_flags;
1159 ++ int pc;
1160 +
1161 + syscall_nr = syscall_get_nr(current, regs);
1162 + if (syscall_nr < 0)
1163 +@@ -318,8 +320,11 @@ void ftrace_syscall_enter(void *ignore, struct pt_regs *regs, long id)
1164 +
1165 + size = sizeof(*entry) + sizeof(unsigned long) * sys_data->nb_args;
1166 +
1167 ++ local_save_flags(irq_flags);
1168 ++ pc = preempt_count();
1169 ++
1170 + event = trace_current_buffer_lock_reserve(&buffer,
1171 +- sys_data->enter_event->event.type, size, 0, 0);
1172 ++ sys_data->enter_event->event.type, size, irq_flags, pc);
1173 + if (!event)
1174 + return;
1175 +
1176 +@@ -329,7 +334,8 @@ void ftrace_syscall_enter(void *ignore, struct pt_regs *regs, long id)
1177 +
1178 + if (!filter_current_check_discard(buffer, sys_data->enter_event,
1179 + entry, event))
1180 +- trace_current_buffer_unlock_commit(buffer, event, 0, 0);
1181 ++ trace_current_buffer_unlock_commit(buffer, event,
1182 ++ irq_flags, pc);
1183 + }
1184 +
1185 + void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
1186 +@@ -339,6 +345,8 @@ void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
1187 + struct ring_buffer_event *event;
1188 + struct ring_buffer *buffer;
1189 + int syscall_nr;
1190 ++ unsigned long irq_flags;
1191 ++ int pc;
1192 +
1193 + syscall_nr = syscall_get_nr(current, regs);
1194 + if (syscall_nr < 0)
1195 +@@ -351,7 +359,8 @@ void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
1196 + return;
1197 +
1198 + event = trace_current_buffer_lock_reserve(&buffer,
1199 +- sys_data->exit_event->event.type, sizeof(*entry), 0, 0);
1200 ++ sys_data->exit_event->event.type, sizeof(*entry),
1201 ++ irq_flags, pc);
1202 + if (!event)
1203 + return;
1204 +
1205 +@@ -361,7 +370,8 @@ void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
1206 +
1207 + if (!filter_current_check_discard(buffer, sys_data->exit_event,
1208 + entry, event))
1209 +- trace_current_buffer_unlock_commit(buffer, event, 0, 0);
1210 ++ trace_current_buffer_unlock_commit(buffer, event,
1211 ++ irq_flags, pc);
1212 + }
1213 +
1214 + int reg_event_syscall_enter(struct ftrace_event_call *call)
1215 +diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
1216 +index daeb19d..8f45392 100644
1217 +--- a/net/8021q/vlan_dev.c
1218 ++++ b/net/8021q/vlan_dev.c
1219 +@@ -73,6 +73,8 @@ vlan_dev_get_egress_qos_mask(struct net_device *dev, struct sk_buff *skb)
1220 + {
1221 + struct vlan_priority_tci_mapping *mp;
1222 +
1223 ++ smp_rmb(); /* coupled with smp_wmb() in vlan_dev_set_egress_priority() */
1224 ++
1225 + mp = vlan_dev_priv(dev)->egress_priority_map[(skb->priority & 0xF)];
1226 + while (mp) {
1227 + if (mp->priority == skb->priority) {
1228 +@@ -235,6 +237,11 @@ int vlan_dev_set_egress_priority(const struct net_device *dev,
1229 + np->next = mp;
1230 + np->priority = skb_prio;
1231 + np->vlan_qos = vlan_qos;
1232 ++ /* Before inserting this element in hash table, make sure all its fields
1233 ++ * are committed to memory.
1234 ++ * coupled with smp_rmb() in vlan_dev_get_egress_qos_mask()
1235 ++ */
1236 ++ smp_wmb();
1237 + vlan->egress_priority_map[skb_prio & 0xF] = np;
1238 + if (vlan_qos)
1239 + vlan->nr_egress_mappings++;
1240 +diff --git a/net/9p/trans_common.c b/net/9p/trans_common.c
1241 +index de8df95..2ee3879 100644
1242 +--- a/net/9p/trans_common.c
1243 ++++ b/net/9p/trans_common.c
1244 +@@ -24,11 +24,11 @@
1245 + */
1246 + void p9_release_pages(struct page **pages, int nr_pages)
1247 + {
1248 +- int i = 0;
1249 +- while (pages[i] && nr_pages--) {
1250 +- put_page(pages[i]);
1251 +- i++;
1252 +- }
1253 ++ int i;
1254 ++
1255 ++ for (i = 0; i < nr_pages; i++)
1256 ++ if (pages[i])
1257 ++ put_page(pages[i]);
1258 + }
1259 + EXPORT_SYMBOL(p9_release_pages);
1260 +
1261 +diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
1262 +index 27ca25e..9069071 100644
1263 +--- a/net/bridge/br_multicast.c
1264 ++++ b/net/bridge/br_multicast.c
1265 +@@ -467,8 +467,9 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br,
1266 + skb_set_transport_header(skb, skb->len);
1267 + mldq = (struct mld_msg *) icmp6_hdr(skb);
1268 +
1269 +- interval = ipv6_addr_any(group) ? br->multicast_last_member_interval :
1270 +- br->multicast_query_response_interval;
1271 ++ interval = ipv6_addr_any(group) ?
1272 ++ br->multicast_query_response_interval :
1273 ++ br->multicast_last_member_interval;
1274 +
1275 + mldq->mld_type = ICMPV6_MGM_QUERY;
1276 + mldq->mld_code = 0;
1277 +diff --git a/net/core/neighbour.c b/net/core/neighbour.c
1278 +index ac88107..69b7ca3 100644
1279 +--- a/net/core/neighbour.c
1280 ++++ b/net/core/neighbour.c
1281 +@@ -237,7 +237,7 @@ static void neigh_flush_dev(struct neigh_table *tbl, struct net_device *dev)
1282 + we must kill timers etc. and move
1283 + it to safe state.
1284 + */
1285 +- skb_queue_purge(&n->arp_queue);
1286 ++ __skb_queue_purge(&n->arp_queue);
1287 + n->arp_queue_len_bytes = 0;
1288 + n->output = neigh_blackhole;
1289 + if (n->nud_state & NUD_VALID)
1290 +@@ -300,7 +300,7 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl, struct net_device
1291 + if (!n)
1292 + goto out_entries;
1293 +
1294 +- skb_queue_head_init(&n->arp_queue);
1295 ++ __skb_queue_head_init(&n->arp_queue);
1296 + rwlock_init(&n->lock);
1297 + seqlock_init(&n->ha_lock);
1298 + n->updated = n->used = now;
1299 +@@ -721,7 +721,9 @@ void neigh_destroy(struct neighbour *neigh)
1300 + if (neigh_del_timer(neigh))
1301 + printk(KERN_WARNING "Impossible event.\n");
1302 +
1303 +- skb_queue_purge(&neigh->arp_queue);
1304 ++ write_lock_bh(&neigh->lock);
1305 ++ __skb_queue_purge(&neigh->arp_queue);
1306 ++ write_unlock_bh(&neigh->lock);
1307 + neigh->arp_queue_len_bytes = 0;
1308 +
1309 + if (dev->netdev_ops->ndo_neigh_destroy)
1310 +@@ -867,7 +869,7 @@ static void neigh_invalidate(struct neighbour *neigh)
1311 + neigh->ops->error_report(neigh, skb);
1312 + write_lock(&neigh->lock);
1313 + }
1314 +- skb_queue_purge(&neigh->arp_queue);
1315 ++ __skb_queue_purge(&neigh->arp_queue);
1316 + neigh->arp_queue_len_bytes = 0;
1317 + }
1318 +
1319 +@@ -1206,7 +1208,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
1320 +
1321 + write_lock_bh(&neigh->lock);
1322 + }
1323 +- skb_queue_purge(&neigh->arp_queue);
1324 ++ __skb_queue_purge(&neigh->arp_queue);
1325 + neigh->arp_queue_len_bytes = 0;
1326 + }
1327 + out:
1328 +diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
1329 +index 76f50e1..ae03b7b 100644
1330 +--- a/net/ipv4/tcp_ipv4.c
1331 ++++ b/net/ipv4/tcp_ipv4.c
1332 +@@ -974,7 +974,7 @@ int tcp_md5_do_add(struct sock *sk, const union tcp_md5_addr *addr,
1333 + struct tcp_sock *tp = tcp_sk(sk);
1334 + struct tcp_md5sig_info *md5sig;
1335 +
1336 +- key = tcp_md5_do_lookup(sk, (union tcp_md5_addr *)&addr, AF_INET);
1337 ++ key = tcp_md5_do_lookup(sk, addr, family);
1338 + if (key) {
1339 + /* Pre-existing entry - just update that one. */
1340 + memcpy(key->key, newkey, newkeylen);
1341 +@@ -1019,7 +1019,7 @@ int tcp_md5_do_del(struct sock *sk, const union tcp_md5_addr *addr, int family)
1342 + struct tcp_md5sig_key *key;
1343 + struct tcp_md5sig_info *md5sig;
1344 +
1345 +- key = tcp_md5_do_lookup(sk, (union tcp_md5_addr *)&addr, AF_INET);
1346 ++ key = tcp_md5_do_lookup(sk, addr, family);
1347 + if (!key)
1348 + return -ENOENT;
1349 + hlist_del_rcu(&key->node);
1350 +diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
1351 +index fe14105..0b6136d 100644
1352 +--- a/net/ipv4/udp.c
1353 ++++ b/net/ipv4/udp.c
1354 +@@ -768,7 +768,7 @@ send:
1355 + /*
1356 + * Push out all pending data as one UDP datagram. Socket is locked.
1357 + */
1358 +-static int udp_push_pending_frames(struct sock *sk)
1359 ++int udp_push_pending_frames(struct sock *sk)
1360 + {
1361 + struct udp_sock *up = udp_sk(sk);
1362 + struct inet_sock *inet = inet_sk(sk);
1363 +@@ -787,6 +787,7 @@ out:
1364 + up->pending = 0;
1365 + return err;
1366 + }
1367 ++EXPORT_SYMBOL(udp_push_pending_frames);
1368 +
1369 + int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
1370 + size_t len)
1371 +diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
1372 +index f4fe3c0..d427f1b 100644
1373 +--- a/net/ipv6/addrconf.c
1374 ++++ b/net/ipv6/addrconf.c
1375 +@@ -1233,6 +1233,23 @@ try_nextdev:
1376 + }
1377 + EXPORT_SYMBOL(ipv6_dev_get_saddr);
1378 +
1379 ++int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr,
1380 ++ unsigned char banned_flags)
1381 ++{
1382 ++ struct inet6_ifaddr *ifp;
1383 ++ int err = -EADDRNOTAVAIL;
1384 ++
1385 ++ list_for_each_entry(ifp, &idev->addr_list, if_list) {
1386 ++ if (ifp->scope == IFA_LINK &&
1387 ++ !(ifp->flags & banned_flags)) {
1388 ++ *addr = ifp->addr;
1389 ++ err = 0;
1390 ++ break;
1391 ++ }
1392 ++ }
1393 ++ return err;
1394 ++}
1395 ++
1396 + int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr,
1397 + unsigned char banned_flags)
1398 + {
1399 +@@ -1242,17 +1259,8 @@ int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr,
1400 + rcu_read_lock();
1401 + idev = __in6_dev_get(dev);
1402 + if (idev) {
1403 +- struct inet6_ifaddr *ifp;
1404 +-
1405 + read_lock_bh(&idev->lock);
1406 +- list_for_each_entry(ifp, &idev->addr_list, if_list) {
1407 +- if (ifp->scope == IFA_LINK &&
1408 +- !(ifp->flags & banned_flags)) {
1409 +- *addr = ifp->addr;
1410 +- err = 0;
1411 +- break;
1412 +- }
1413 +- }
1414 ++ err = __ipv6_get_lladdr(idev, addr, banned_flags);
1415 + read_unlock_bh(&idev->lock);
1416 + }
1417 + rcu_read_unlock();
1418 +@@ -2429,6 +2437,9 @@ static void init_loopback(struct net_device *dev)
1419 + if (sp_ifa->flags & (IFA_F_DADFAILED | IFA_F_TENTATIVE))
1420 + continue;
1421 +
1422 ++ if (sp_ifa->rt)
1423 ++ continue;
1424 ++
1425 + sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, 0);
1426 +
1427 + /* Failure cases are ignored */
1428 +diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
1429 +index bf290ce..d6b9d56 100644
1430 +--- a/net/ipv6/ip6_output.c
1431 ++++ b/net/ipv6/ip6_output.c
1432 +@@ -912,11 +912,17 @@ static struct dst_entry *ip6_sk_dst_check(struct sock *sk,
1433 + const struct flowi6 *fl6)
1434 + {
1435 + struct ipv6_pinfo *np = inet6_sk(sk);
1436 +- struct rt6_info *rt = (struct rt6_info *)dst;
1437 ++ struct rt6_info *rt;
1438 +
1439 + if (!dst)
1440 + goto out;
1441 +
1442 ++ if (dst->ops->family != AF_INET6) {
1443 ++ dst_release(dst);
1444 ++ return NULL;
1445 ++ }
1446 ++
1447 ++ rt = (struct rt6_info *)dst;
1448 + /* Yes, checking route validity in not connected
1449 + * case is not very simple. Take into account,
1450 + * that we do not support routing by source, TOS,
1451 +@@ -1181,11 +1187,12 @@ static inline struct ipv6_rt_hdr *ip6_rthdr_dup(struct ipv6_rt_hdr *src,
1452 + return src ? kmemdup(src, (src->hdrlen + 1) * 8, gfp) : NULL;
1453 + }
1454 +
1455 +-static void ip6_append_data_mtu(int *mtu,
1456 ++static void ip6_append_data_mtu(unsigned int *mtu,
1457 + int *maxfraglen,
1458 + unsigned int fragheaderlen,
1459 + struct sk_buff *skb,
1460 +- struct rt6_info *rt)
1461 ++ struct rt6_info *rt,
1462 ++ bool pmtuprobe)
1463 + {
1464 + if (!(rt->dst.flags & DST_XFRM_TUNNEL)) {
1465 + if (skb == NULL) {
1466 +@@ -1197,7 +1204,9 @@ static void ip6_append_data_mtu(int *mtu,
1467 + * this fragment is not first, the headers
1468 + * space is regarded as data space.
1469 + */
1470 +- *mtu = dst_mtu(rt->dst.path);
1471 ++ *mtu = min(*mtu, pmtuprobe ?
1472 ++ rt->dst.dev->mtu :
1473 ++ dst_mtu(rt->dst.path));
1474 + }
1475 + *maxfraglen = ((*mtu - fragheaderlen) & ~7)
1476 + + fragheaderlen - sizeof(struct frag_hdr);
1477 +@@ -1214,11 +1223,10 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
1478 + struct ipv6_pinfo *np = inet6_sk(sk);
1479 + struct inet_cork *cork;
1480 + struct sk_buff *skb, *skb_prev = NULL;
1481 +- unsigned int maxfraglen, fragheaderlen;
1482 ++ unsigned int maxfraglen, fragheaderlen, mtu;
1483 + int exthdrlen;
1484 + int dst_exthdrlen;
1485 + int hh_len;
1486 +- int mtu;
1487 + int copy;
1488 + int err;
1489 + int offset = 0;
1490 +@@ -1381,7 +1389,9 @@ alloc_new_skb:
1491 + /* update mtu and maxfraglen if necessary */
1492 + if (skb == NULL || skb_prev == NULL)
1493 + ip6_append_data_mtu(&mtu, &maxfraglen,
1494 +- fragheaderlen, skb, rt);
1495 ++ fragheaderlen, skb, rt,
1496 ++ np->pmtudisc ==
1497 ++ IPV6_PMTUDISC_PROBE);
1498 +
1499 + skb_prev = skb;
1500 +
1501 +diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
1502 +index b2869ca..6a4ab24 100644
1503 +--- a/net/ipv6/mcast.c
1504 ++++ b/net/ipv6/mcast.c
1505 +@@ -1334,8 +1334,9 @@ mld_scount(struct ifmcaddr6 *pmc, int type, int gdeleted, int sdeleted)
1506 + return scount;
1507 + }
1508 +
1509 +-static struct sk_buff *mld_newpack(struct net_device *dev, int size)
1510 ++static struct sk_buff *mld_newpack(struct inet6_dev *idev, int size)
1511 + {
1512 ++ struct net_device *dev = idev->dev;
1513 + struct net *net = dev_net(dev);
1514 + struct sock *sk = net->ipv6.igmp_sk;
1515 + struct sk_buff *skb;
1516 +@@ -1360,7 +1361,7 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size)
1517 +
1518 + skb_reserve(skb, hlen);
1519 +
1520 +- if (ipv6_get_lladdr(dev, &addr_buf, IFA_F_TENTATIVE)) {
1521 ++ if (__ipv6_get_lladdr(idev, &addr_buf, IFA_F_TENTATIVE)) {
1522 + /* <draft-ietf-magma-mld-source-05.txt>:
1523 + * use unspecified address as the source address
1524 + * when a valid link-local address is not available.
1525 +@@ -1456,7 +1457,7 @@ static struct sk_buff *add_grhead(struct sk_buff *skb, struct ifmcaddr6 *pmc,
1526 + struct mld2_grec *pgr;
1527 +
1528 + if (!skb)
1529 +- skb = mld_newpack(dev, dev->mtu);
1530 ++ skb = mld_newpack(pmc->idev, dev->mtu);
1531 + if (!skb)
1532 + return NULL;
1533 + pgr = (struct mld2_grec *)skb_put(skb, sizeof(struct mld2_grec));
1534 +@@ -1476,7 +1477,8 @@ static struct sk_buff *add_grhead(struct sk_buff *skb, struct ifmcaddr6 *pmc,
1535 + static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
1536 + int type, int gdeleted, int sdeleted)
1537 + {
1538 +- struct net_device *dev = pmc->idev->dev;
1539 ++ struct inet6_dev *idev = pmc->idev;
1540 ++ struct net_device *dev = idev->dev;
1541 + struct mld2_report *pmr;
1542 + struct mld2_grec *pgr = NULL;
1543 + struct ip6_sf_list *psf, *psf_next, *psf_prev, **psf_list;
1544 +@@ -1505,7 +1507,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
1545 + AVAILABLE(skb) < grec_size(pmc, type, gdeleted, sdeleted)) {
1546 + if (skb)
1547 + mld_sendpack(skb);
1548 +- skb = mld_newpack(dev, dev->mtu);
1549 ++ skb = mld_newpack(idev, dev->mtu);
1550 + }
1551 + }
1552 + first = 1;
1553 +@@ -1532,7 +1534,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
1554 + pgr->grec_nsrcs = htons(scount);
1555 + if (skb)
1556 + mld_sendpack(skb);
1557 +- skb = mld_newpack(dev, dev->mtu);
1558 ++ skb = mld_newpack(idev, dev->mtu);
1559 + first = 1;
1560 + scount = 0;
1561 + }
1562 +@@ -1587,8 +1589,8 @@ static void mld_send_report(struct inet6_dev *idev, struct ifmcaddr6 *pmc)
1563 + struct sk_buff *skb = NULL;
1564 + int type;
1565 +
1566 ++ read_lock_bh(&idev->lock);
1567 + if (!pmc) {
1568 +- read_lock_bh(&idev->lock);
1569 + for (pmc=idev->mc_list; pmc; pmc=pmc->next) {
1570 + if (pmc->mca_flags & MAF_NOREPORT)
1571 + continue;
1572 +@@ -1600,7 +1602,6 @@ static void mld_send_report(struct inet6_dev *idev, struct ifmcaddr6 *pmc)
1573 + skb = add_grec(skb, pmc, type, 0, 0);
1574 + spin_unlock_bh(&pmc->mca_lock);
1575 + }
1576 +- read_unlock_bh(&idev->lock);
1577 + } else {
1578 + spin_lock_bh(&pmc->mca_lock);
1579 + if (pmc->mca_sfcount[MCAST_EXCLUDE])
1580 +@@ -1610,6 +1611,7 @@ static void mld_send_report(struct inet6_dev *idev, struct ifmcaddr6 *pmc)
1581 + skb = add_grec(skb, pmc, type, 0, 0);
1582 + spin_unlock_bh(&pmc->mca_lock);
1583 + }
1584 ++ read_unlock_bh(&idev->lock);
1585 + if (skb)
1586 + mld_sendpack(skb);
1587 + }
1588 +diff --git a/net/ipv6/route.c b/net/ipv6/route.c
1589 +index 5a272c6..016ed7c 100644
1590 +--- a/net/ipv6/route.c
1591 ++++ b/net/ipv6/route.c
1592 +@@ -1032,10 +1032,13 @@ static void ip6_link_failure(struct sk_buff *skb)
1593 +
1594 + rt = (struct rt6_info *) skb_dst(skb);
1595 + if (rt) {
1596 +- if (rt->rt6i_flags & RTF_CACHE)
1597 +- rt6_update_expires(rt, 0);
1598 +- else if (rt->rt6i_node && (rt->rt6i_flags & RTF_DEFAULT))
1599 ++ if (rt->rt6i_flags & RTF_CACHE) {
1600 ++ dst_hold(&rt->dst);
1601 ++ if (ip6_del_rt(rt))
1602 ++ dst_free(&rt->dst);
1603 ++ } else if (rt->rt6i_node && (rt->rt6i_flags & RTF_DEFAULT)) {
1604 + rt->rt6i_node->fn_sernum = -1;
1605 ++ }
1606 + }
1607 + }
1608 +
1609 +diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
1610 +index aa2f18b..f79bfdb 100644
1611 +--- a/net/ipv6/udp.c
1612 ++++ b/net/ipv6/udp.c
1613 +@@ -895,11 +895,16 @@ static int udp_v6_push_pending_frames(struct sock *sk)
1614 + struct udphdr *uh;
1615 + struct udp_sock *up = udp_sk(sk);
1616 + struct inet_sock *inet = inet_sk(sk);
1617 +- struct flowi6 *fl6 = &inet->cork.fl.u.ip6;
1618 ++ struct flowi6 *fl6;
1619 + int err = 0;
1620 + int is_udplite = IS_UDPLITE(sk);
1621 + __wsum csum = 0;
1622 +
1623 ++ if (up->pending == AF_INET)
1624 ++ return udp_push_pending_frames(sk);
1625 ++
1626 ++ fl6 = &inet->cork.fl.u.ip6;
1627 ++
1628 + /* Grab the skbuff where UDP header space exists. */
1629 + if ((skb = skb_peek(&sk->sk_write_queue)) == NULL)
1630 + goto out;
1631 +diff --git a/net/key/af_key.c b/net/key/af_key.c
1632 +index 7e5d927..5bbab6a 100644
1633 +--- a/net/key/af_key.c
1634 ++++ b/net/key/af_key.c
1635 +@@ -1705,6 +1705,7 @@ static int key_notify_sa_flush(const struct km_event *c)
1636 + hdr->sadb_msg_version = PF_KEY_V2;
1637 + hdr->sadb_msg_errno = (uint8_t) 0;
1638 + hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t));
1639 ++ hdr->sadb_msg_reserved = 0;
1640 +
1641 + pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ALL, NULL, c->net);
1642 +
1643 +@@ -2686,6 +2687,7 @@ static int key_notify_policy_flush(const struct km_event *c)
1644 + hdr->sadb_msg_version = PF_KEY_V2;
1645 + hdr->sadb_msg_errno = (uint8_t) 0;
1646 + hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t));
1647 ++ hdr->sadb_msg_reserved = 0;
1648 + pfkey_broadcast(skb_out, GFP_ATOMIC, BROADCAST_ALL, NULL, c->net);
1649 + return 0;
1650 +
1651 +diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
1652 +index c6dee80..b2982f4 100644
1653 +--- a/net/l2tp/l2tp_ppp.c
1654 ++++ b/net/l2tp/l2tp_ppp.c
1655 +@@ -1778,7 +1778,8 @@ static const struct proto_ops pppol2tp_ops = {
1656 +
1657 + static const struct pppox_proto pppol2tp_proto = {
1658 + .create = pppol2tp_create,
1659 +- .ioctl = pppol2tp_ioctl
1660 ++ .ioctl = pppol2tp_ioctl,
1661 ++ .owner = THIS_MODULE,
1662 + };
1663 +
1664 + #ifdef CONFIG_L2TP_V3
1665 +diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
1666 +index a306bc6..b943e3e 100644
1667 +--- a/net/x25/af_x25.c
1668 ++++ b/net/x25/af_x25.c
1669 +@@ -1586,11 +1586,11 @@ out_cud_release:
1670 + case SIOCX25CALLACCPTAPPRV: {
1671 + rc = -EINVAL;
1672 + lock_sock(sk);
1673 +- if (sk->sk_state != TCP_CLOSE)
1674 +- break;
1675 +- clear_bit(X25_ACCPT_APPRV_FLAG, &x25->flags);
1676 ++ if (sk->sk_state == TCP_CLOSE) {
1677 ++ clear_bit(X25_ACCPT_APPRV_FLAG, &x25->flags);
1678 ++ rc = 0;
1679 ++ }
1680 + release_sock(sk);
1681 +- rc = 0;
1682 + break;
1683 + }
1684 +
1685 +@@ -1598,14 +1598,15 @@ out_cud_release:
1686 + rc = -EINVAL;
1687 + lock_sock(sk);
1688 + if (sk->sk_state != TCP_ESTABLISHED)
1689 +- break;
1690 ++ goto out_sendcallaccpt_release;
1691 + /* must call accptapprv above */
1692 + if (test_bit(X25_ACCPT_APPRV_FLAG, &x25->flags))
1693 +- break;
1694 ++ goto out_sendcallaccpt_release;
1695 + x25_write_internal(sk, X25_CALL_ACCEPTED);
1696 + x25->state = X25_STATE_3;
1697 +- release_sock(sk);
1698 + rc = 0;
1699 ++out_sendcallaccpt_release:
1700 ++ release_sock(sk);
1701 + break;
1702 + }
1703 +
1704 +diff --git a/sound/soc/codecs/sgtl5000.h b/sound/soc/codecs/sgtl5000.h
1705 +index 8a9f435..d3a68bb 100644
1706 +--- a/sound/soc/codecs/sgtl5000.h
1707 ++++ b/sound/soc/codecs/sgtl5000.h
1708 +@@ -347,7 +347,7 @@
1709 + #define SGTL5000_PLL_INT_DIV_MASK 0xf800
1710 + #define SGTL5000_PLL_INT_DIV_SHIFT 11
1711 + #define SGTL5000_PLL_INT_DIV_WIDTH 5
1712 +-#define SGTL5000_PLL_FRAC_DIV_MASK 0x0700
1713 ++#define SGTL5000_PLL_FRAC_DIV_MASK 0x07ff
1714 + #define SGTL5000_PLL_FRAC_DIV_SHIFT 0
1715 + #define SGTL5000_PLL_FRAC_DIV_WIDTH 11
1716 +
1717 +diff --git a/sound/usb/6fire/pcm.c b/sound/usb/6fire/pcm.c
1718 +index c97d05f..4da9ca9 100644
1719 +--- a/sound/usb/6fire/pcm.c
1720 ++++ b/sound/usb/6fire/pcm.c
1721 +@@ -540,7 +540,7 @@ static snd_pcm_uframes_t usb6fire_pcm_pointer(
1722 + snd_pcm_uframes_t ret;
1723 +
1724 + if (rt->panic || !sub)
1725 +- return SNDRV_PCM_STATE_XRUN;
1726 ++ return SNDRV_PCM_POS_XRUN;
1727 +
1728 + spin_lock_irqsave(&sub->lock, flags);
1729 + ret = sub->dma_off;