Contents of /trunk/kernel-alx/patches-3.10/0162-3.10.63-all-fixes.patch
Parent Directory | Revision Log
Revision 2650 -
(show annotations)
(download)
Tue Jul 21 16:20:21 2015 UTC (9 years, 2 months ago) by niro
File size: 16564 byte(s)
Tue Jul 21 16:20:21 2015 UTC (9 years, 2 months ago) by niro
File size: 16564 byte(s)
-linux-3.10.63
1 | diff --git a/Makefile b/Makefile |
2 | index a0b86250d6ca..9383fe24baa9 100644 |
3 | --- a/Makefile |
4 | +++ b/Makefile |
5 | @@ -1,6 +1,6 @@ |
6 | VERSION = 3 |
7 | PATCHLEVEL = 10 |
8 | -SUBLEVEL = 62 |
9 | +SUBLEVEL = 63 |
10 | EXTRAVERSION = |
11 | NAME = TOSSUG Baby Fish |
12 | |
13 | diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c |
14 | index e8edcaa0e432..a57cc5d33540 100644 |
15 | --- a/arch/arm/kernel/sched_clock.c |
16 | +++ b/arch/arm/kernel/sched_clock.c |
17 | @@ -51,10 +51,11 @@ static inline u64 notrace cyc_to_ns(u64 cyc, u32 mult, u32 shift) |
18 | return (cyc * mult) >> shift; |
19 | } |
20 | |
21 | -static unsigned long long notrace cyc_to_sched_clock(u32 cyc, u32 mask) |
22 | +static unsigned long long notrace sched_clock_32(void) |
23 | { |
24 | u64 epoch_ns; |
25 | u32 epoch_cyc; |
26 | + u32 cyc; |
27 | |
28 | if (cd.suspended) |
29 | return cd.epoch_ns; |
30 | @@ -73,7 +74,9 @@ static unsigned long long notrace cyc_to_sched_clock(u32 cyc, u32 mask) |
31 | smp_rmb(); |
32 | } while (epoch_cyc != cd.epoch_cyc_copy); |
33 | |
34 | - return epoch_ns + cyc_to_ns((cyc - epoch_cyc) & mask, cd.mult, cd.shift); |
35 | + cyc = read_sched_clock(); |
36 | + cyc = (cyc - epoch_cyc) & sched_clock_mask; |
37 | + return epoch_ns + cyc_to_ns(cyc, cd.mult, cd.shift); |
38 | } |
39 | |
40 | /* |
41 | @@ -165,12 +168,6 @@ void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate) |
42 | pr_debug("Registered %pF as sched_clock source\n", read); |
43 | } |
44 | |
45 | -static unsigned long long notrace sched_clock_32(void) |
46 | -{ |
47 | - u32 cyc = read_sched_clock(); |
48 | - return cyc_to_sched_clock(cyc, sched_clock_mask); |
49 | -} |
50 | - |
51 | unsigned long long __read_mostly (*sched_clock_func)(void) = sched_clock_32; |
52 | |
53 | unsigned long long notrace sched_clock(void) |
54 | diff --git a/arch/powerpc/kernel/vdso32/getcpu.S b/arch/powerpc/kernel/vdso32/getcpu.S |
55 | index 47afd08c90f7..fe7e97a1aad9 100644 |
56 | --- a/arch/powerpc/kernel/vdso32/getcpu.S |
57 | +++ b/arch/powerpc/kernel/vdso32/getcpu.S |
58 | @@ -30,8 +30,8 @@ |
59 | V_FUNCTION_BEGIN(__kernel_getcpu) |
60 | .cfi_startproc |
61 | mfspr r5,SPRN_USPRG3 |
62 | - cmpdi cr0,r3,0 |
63 | - cmpdi cr1,r4,0 |
64 | + cmpwi cr0,r3,0 |
65 | + cmpwi cr1,r4,0 |
66 | clrlwi r6,r5,16 |
67 | rlwinm r7,r5,16,31-15,31-0 |
68 | beq cr0,1f |
69 | diff --git a/arch/x86/include/uapi/asm/vmx.h b/arch/x86/include/uapi/asm/vmx.h |
70 | index d651082c7cf7..7a34e8fe54bd 100644 |
71 | --- a/arch/x86/include/uapi/asm/vmx.h |
72 | +++ b/arch/x86/include/uapi/asm/vmx.h |
73 | @@ -65,6 +65,7 @@ |
74 | #define EXIT_REASON_EOI_INDUCED 45 |
75 | #define EXIT_REASON_EPT_VIOLATION 48 |
76 | #define EXIT_REASON_EPT_MISCONFIG 49 |
77 | +#define EXIT_REASON_INVEPT 50 |
78 | #define EXIT_REASON_PREEMPTION_TIMER 52 |
79 | #define EXIT_REASON_WBINVD 54 |
80 | #define EXIT_REASON_XSETBV 55 |
81 | diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c |
82 | index 51139ff34917..7112be5f1eaf 100644 |
83 | --- a/arch/x86/kvm/vmx.c |
84 | +++ b/arch/x86/kvm/vmx.c |
85 | @@ -6242,6 +6242,12 @@ static int handle_vmptrst(struct kvm_vcpu *vcpu) |
86 | return 1; |
87 | } |
88 | |
89 | +static int handle_invept(struct kvm_vcpu *vcpu) |
90 | +{ |
91 | + kvm_queue_exception(vcpu, UD_VECTOR); |
92 | + return 1; |
93 | +} |
94 | + |
95 | /* |
96 | * The exit handlers return 1 if the exit was handled fully and guest execution |
97 | * may resume. Otherwise they set the kvm_run parameter to indicate what needs |
98 | @@ -6286,6 +6292,7 @@ static int (*const kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu) = { |
99 | [EXIT_REASON_PAUSE_INSTRUCTION] = handle_pause, |
100 | [EXIT_REASON_MWAIT_INSTRUCTION] = handle_invalid_op, |
101 | [EXIT_REASON_MONITOR_INSTRUCTION] = handle_invalid_op, |
102 | + [EXIT_REASON_INVEPT] = handle_invept, |
103 | }; |
104 | |
105 | static const int kvm_vmx_max_exit_handlers = |
106 | @@ -6512,6 +6519,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu) |
107 | case EXIT_REASON_VMPTRST: case EXIT_REASON_VMREAD: |
108 | case EXIT_REASON_VMRESUME: case EXIT_REASON_VMWRITE: |
109 | case EXIT_REASON_VMOFF: case EXIT_REASON_VMON: |
110 | + case EXIT_REASON_INVEPT: |
111 | /* |
112 | * VMX instructions trap unconditionally. This allows L1 to |
113 | * emulate them for its L2 guest, i.e., allows 3-level nesting! |
114 | diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c |
115 | index 64150a9ffff3..9064a2f2760c 100644 |
116 | --- a/drivers/ata/ahci.c |
117 | +++ b/drivers/ata/ahci.c |
118 | @@ -320,6 +320,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { |
119 | { PCI_VDEVICE(INTEL, 0x8c87), board_ahci }, /* 9 Series RAID */ |
120 | { PCI_VDEVICE(INTEL, 0x8c8e), board_ahci }, /* 9 Series RAID */ |
121 | { PCI_VDEVICE(INTEL, 0x8c8f), board_ahci }, /* 9 Series RAID */ |
122 | + { PCI_VDEVICE(INTEL, 0x9d03), board_ahci }, /* Sunrise Point-LP AHCI */ |
123 | + { PCI_VDEVICE(INTEL, 0x9d05), board_ahci }, /* Sunrise Point-LP RAID */ |
124 | + { PCI_VDEVICE(INTEL, 0x9d07), board_ahci }, /* Sunrise Point-LP RAID */ |
125 | { PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H AHCI */ |
126 | { PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H RAID */ |
127 | { PCI_VDEVICE(INTEL, 0xa105), board_ahci }, /* Sunrise Point-H RAID */ |
128 | @@ -491,6 +494,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { |
129 | * enabled. https://bugzilla.kernel.org/show_bug.cgi?id=60731 |
130 | */ |
131 | { PCI_VDEVICE(SAMSUNG, 0x1600), board_ahci_nomsi }, |
132 | + { PCI_VDEVICE(SAMSUNG, 0xa800), board_ahci_nomsi }, |
133 | |
134 | /* Enmotus */ |
135 | { PCI_DEVICE(0x1c44, 0x8000), board_ahci }, |
136 | diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c |
137 | index 8401061b4040..38a2389f5b1b 100644 |
138 | --- a/drivers/ata/sata_fsl.c |
139 | +++ b/drivers/ata/sata_fsl.c |
140 | @@ -1501,7 +1501,7 @@ static int sata_fsl_probe(struct platform_device *ofdev) |
141 | host_priv->csr_base = csr_base; |
142 | |
143 | irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); |
144 | - if (irq < 0) { |
145 | + if (!irq) { |
146 | dev_err(&ofdev->dev, "invalid irq from platform\n"); |
147 | goto error_exit_with_cleanup; |
148 | } |
149 | diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c |
150 | index 08e8e18b3f85..f5d1dc5b5563 100644 |
151 | --- a/drivers/gpu/drm/i915/intel_lvds.c |
152 | +++ b/drivers/gpu/drm/i915/intel_lvds.c |
153 | @@ -1097,6 +1097,17 @@ bool intel_lvds_init(struct drm_device *dev) |
154 | int pipe; |
155 | u8 pin; |
156 | |
157 | + /* |
158 | + * Unlock registers and just leave them unlocked. Do this before |
159 | + * checking quirk lists to avoid bogus WARNINGs. |
160 | + */ |
161 | + if (HAS_PCH_SPLIT(dev)) { |
162 | + I915_WRITE(PCH_PP_CONTROL, |
163 | + I915_READ(PCH_PP_CONTROL) | PANEL_UNLOCK_REGS); |
164 | + } else { |
165 | + I915_WRITE(PP_CONTROL, |
166 | + I915_READ(PP_CONTROL) | PANEL_UNLOCK_REGS); |
167 | + } |
168 | if (!intel_lvds_supported(dev)) |
169 | return false; |
170 | |
171 | @@ -1280,17 +1291,6 @@ out: |
172 | DRM_DEBUG_KMS("detected %s-link lvds configuration\n", |
173 | lvds_encoder->is_dual_link ? "dual" : "single"); |
174 | |
175 | - /* |
176 | - * Unlock registers and just |
177 | - * leave them unlocked |
178 | - */ |
179 | - if (HAS_PCH_SPLIT(dev)) { |
180 | - I915_WRITE(PCH_PP_CONTROL, |
181 | - I915_READ(PCH_PP_CONTROL) | PANEL_UNLOCK_REGS); |
182 | - } else { |
183 | - I915_WRITE(PP_CONTROL, |
184 | - I915_READ(PP_CONTROL) | PANEL_UNLOCK_REGS); |
185 | - } |
186 | lvds_connector->lid_notifier.notifier_call = intel_lid_notify; |
187 | if (acpi_lid_notifier_register(&lvds_connector->lid_notifier)) { |
188 | DRM_DEBUG_KMS("lid notifier registration failed\n"); |
189 | diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c |
190 | index 1113e8f69137..2c3c4c58a765 100644 |
191 | --- a/drivers/gpu/drm/radeon/radeon_kms.c |
192 | +++ b/drivers/gpu/drm/radeon/radeon_kms.c |
193 | @@ -666,6 +666,8 @@ int radeon_get_vblank_timestamp_kms(struct drm_device *dev, int crtc, |
194 | |
195 | /* Get associated drm_crtc: */ |
196 | drmcrtc = &rdev->mode_info.crtcs[crtc]->base; |
197 | + if (!drmcrtc) |
198 | + return -EINVAL; |
199 | |
200 | /* Helper routine in DRM core does all the work: */ |
201 | return drm_calc_vbltimestamp_from_scanoutpos(dev, crtc, max_error, |
202 | diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c |
203 | index cf20e06a88e1..09f29e92095a 100644 |
204 | --- a/drivers/i2c/busses/i2c-davinci.c |
205 | +++ b/drivers/i2c/busses/i2c-davinci.c |
206 | @@ -414,11 +414,9 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop) |
207 | if (dev->cmd_err & DAVINCI_I2C_STR_NACK) { |
208 | if (msg->flags & I2C_M_IGNORE_NAK) |
209 | return msg->len; |
210 | - if (stop) { |
211 | - w = davinci_i2c_read_reg(dev, DAVINCI_I2C_MDR_REG); |
212 | - w |= DAVINCI_I2C_MDR_STP; |
213 | - davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, w); |
214 | - } |
215 | + w = davinci_i2c_read_reg(dev, DAVINCI_I2C_MDR_REG); |
216 | + w |= DAVINCI_I2C_MDR_STP; |
217 | + davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, w); |
218 | return -EREMOTEIO; |
219 | } |
220 | return -EIO; |
221 | diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c |
222 | index b06be8e3bb76..7645924f9f8b 100644 |
223 | --- a/drivers/i2c/busses/i2c-omap.c |
224 | +++ b/drivers/i2c/busses/i2c-omap.c |
225 | @@ -928,14 +928,12 @@ omap_i2c_isr_thread(int this_irq, void *dev_id) |
226 | if (stat & OMAP_I2C_STAT_NACK) { |
227 | err |= OMAP_I2C_STAT_NACK; |
228 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_NACK); |
229 | - break; |
230 | } |
231 | |
232 | if (stat & OMAP_I2C_STAT_AL) { |
233 | dev_err(dev->dev, "Arbitration lost\n"); |
234 | err |= OMAP_I2C_STAT_AL; |
235 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_AL); |
236 | - break; |
237 | } |
238 | |
239 | /* |
240 | @@ -960,11 +958,13 @@ omap_i2c_isr_thread(int this_irq, void *dev_id) |
241 | if (dev->fifo_size) |
242 | num_bytes = dev->buf_len; |
243 | |
244 | - omap_i2c_receive_data(dev, num_bytes, true); |
245 | - |
246 | - if (dev->errata & I2C_OMAP_ERRATA_I207) |
247 | + if (dev->errata & I2C_OMAP_ERRATA_I207) { |
248 | i2c_omap_errata_i207(dev, stat); |
249 | + num_bytes = (omap_i2c_read_reg(dev, |
250 | + OMAP_I2C_BUFSTAT_REG) >> 8) & 0x3F; |
251 | + } |
252 | |
253 | + omap_i2c_receive_data(dev, num_bytes, true); |
254 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RDR); |
255 | continue; |
256 | } |
257 | diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c |
258 | index cae4f4683851..b280216de31b 100644 |
259 | --- a/drivers/media/i2c/smiapp/smiapp-core.c |
260 | +++ b/drivers/media/i2c/smiapp/smiapp-core.c |
261 | @@ -2139,7 +2139,7 @@ static int smiapp_set_selection(struct v4l2_subdev *subdev, |
262 | ret = smiapp_set_compose(subdev, fh, sel); |
263 | break; |
264 | default: |
265 | - BUG(); |
266 | + ret = -EINVAL; |
267 | } |
268 | |
269 | mutex_unlock(&sensor->mutex); |
270 | diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c |
271 | index 3de4069f020e..5501cad30cfa 100644 |
272 | --- a/drivers/net/ethernet/broadcom/tg3.c |
273 | +++ b/drivers/net/ethernet/broadcom/tg3.c |
274 | @@ -8392,7 +8392,8 @@ static int tg3_init_rings(struct tg3 *tp) |
275 | if (tnapi->rx_rcb) |
276 | memset(tnapi->rx_rcb, 0, TG3_RX_RCB_RING_BYTES(tp)); |
277 | |
278 | - if (tg3_rx_prodring_alloc(tp, &tnapi->prodring)) { |
279 | + if (tnapi->prodring.rx_std && |
280 | + tg3_rx_prodring_alloc(tp, &tnapi->prodring)) { |
281 | tg3_free_rings(tp); |
282 | return -ENOMEM; |
283 | } |
284 | diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c |
285 | index 4d3c8122e2aa..3f342fbe9ccf 100644 |
286 | --- a/drivers/net/ethernet/intel/igb/igb_main.c |
287 | +++ b/drivers/net/ethernet/intel/igb/igb_main.c |
288 | @@ -1584,6 +1584,8 @@ void igb_power_up_link(struct igb_adapter *adapter) |
289 | igb_power_up_phy_copper(&adapter->hw); |
290 | else |
291 | igb_power_up_serdes_link_82575(&adapter->hw); |
292 | + |
293 | + igb_setup_link(&adapter->hw); |
294 | } |
295 | |
296 | /** |
297 | diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c |
298 | index f8821ce27802..8b6c9237eda4 100644 |
299 | --- a/drivers/net/ethernet/marvell/mvneta.c |
300 | +++ b/drivers/net/ethernet/marvell/mvneta.c |
301 | @@ -210,7 +210,7 @@ |
302 | /* Various constants */ |
303 | |
304 | /* Coalescing */ |
305 | -#define MVNETA_TXDONE_COAL_PKTS 16 |
306 | +#define MVNETA_TXDONE_COAL_PKTS 1 |
307 | #define MVNETA_RX_COAL_PKTS 32 |
308 | #define MVNETA_RX_COAL_USEC 100 |
309 | |
310 | diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c |
311 | index 1157f028a90f..6cc808865e95 100644 |
312 | --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c |
313 | +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c |
314 | @@ -1207,7 +1207,7 @@ static int qp_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd, |
315 | |
316 | switch (op) { |
317 | case RES_OP_RESERVE: |
318 | - count = get_param_l(&in_param); |
319 | + count = get_param_l(&in_param) & 0xffffff; |
320 | align = get_param_h(&in_param); |
321 | err = __mlx4_qp_reserve_range(dev, count, align, &base); |
322 | if (err) |
323 | diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c |
324 | index 82e0f1fd2254..a1db958df4a4 100644 |
325 | --- a/drivers/net/xen-netfront.c |
326 | +++ b/drivers/net/xen-netfront.c |
327 | @@ -459,9 +459,6 @@ static void xennet_make_frags(struct sk_buff *skb, struct net_device *dev, |
328 | len = skb_frag_size(frag); |
329 | offset = frag->page_offset; |
330 | |
331 | - /* Data must not cross a page boundary. */ |
332 | - BUG_ON(len + offset > PAGE_SIZE<<compound_order(page)); |
333 | - |
334 | /* Skip unused frames from start of page */ |
335 | page += offset >> PAGE_SHIFT; |
336 | offset &= ~PAGE_MASK; |
337 | @@ -469,8 +466,6 @@ static void xennet_make_frags(struct sk_buff *skb, struct net_device *dev, |
338 | while (len > 0) { |
339 | unsigned long bytes; |
340 | |
341 | - BUG_ON(offset >= PAGE_SIZE); |
342 | - |
343 | bytes = PAGE_SIZE - offset; |
344 | if (bytes > len) |
345 | bytes = len; |
346 | diff --git a/fs/ext2/super.c b/fs/ext2/super.c |
347 | index 288534920fe5..20d6697bd638 100644 |
348 | --- a/fs/ext2/super.c |
349 | +++ b/fs/ext2/super.c |
350 | @@ -1493,6 +1493,7 @@ static ssize_t ext2_quota_write(struct super_block *sb, int type, |
351 | sb->s_blocksize - offset : towrite; |
352 | |
353 | tmp_bh.b_state = 0; |
354 | + tmp_bh.b_size = sb->s_blocksize; |
355 | err = ext2_get_block(inode, blk, &tmp_bh, 1); |
356 | if (err < 0) |
357 | goto out; |
358 | diff --git a/mm/frontswap.c b/mm/frontswap.c |
359 | index 1b24bdcb3197..a55036a68487 100644 |
360 | --- a/mm/frontswap.c |
361 | +++ b/mm/frontswap.c |
362 | @@ -244,8 +244,10 @@ int __frontswap_store(struct page *page) |
363 | the (older) page from frontswap |
364 | */ |
365 | inc_frontswap_failed_stores(); |
366 | - if (dup) |
367 | + if (dup) { |
368 | __frontswap_clear(sis, offset); |
369 | + frontswap_ops->invalidate_page(type, offset); |
370 | + } |
371 | } |
372 | if (frontswap_writethrough_enabled) |
373 | /* report failure so swap also writes to swap device */ |
374 | diff --git a/mm/memory.c b/mm/memory.c |
375 | index 0984f398d746..0926ccd04d7a 100644 |
376 | --- a/mm/memory.c |
377 | +++ b/mm/memory.c |
378 | @@ -834,20 +834,20 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm, |
379 | if (!pte_file(pte)) { |
380 | swp_entry_t entry = pte_to_swp_entry(pte); |
381 | |
382 | - if (swap_duplicate(entry) < 0) |
383 | - return entry.val; |
384 | - |
385 | - /* make sure dst_mm is on swapoff's mmlist. */ |
386 | - if (unlikely(list_empty(&dst_mm->mmlist))) { |
387 | - spin_lock(&mmlist_lock); |
388 | - if (list_empty(&dst_mm->mmlist)) |
389 | - list_add(&dst_mm->mmlist, |
390 | - &src_mm->mmlist); |
391 | - spin_unlock(&mmlist_lock); |
392 | - } |
393 | - if (likely(!non_swap_entry(entry))) |
394 | + if (likely(!non_swap_entry(entry))) { |
395 | + if (swap_duplicate(entry) < 0) |
396 | + return entry.val; |
397 | + |
398 | + /* make sure dst_mm is on swapoff's mmlist. */ |
399 | + if (unlikely(list_empty(&dst_mm->mmlist))) { |
400 | + spin_lock(&mmlist_lock); |
401 | + if (list_empty(&dst_mm->mmlist)) |
402 | + list_add(&dst_mm->mmlist, |
403 | + &src_mm->mmlist); |
404 | + spin_unlock(&mmlist_lock); |
405 | + } |
406 | rss[MM_SWAPENTS]++; |
407 | - else if (is_migration_entry(entry)) { |
408 | + } else if (is_migration_entry(entry)) { |
409 | page = migration_entry_to_page(entry); |
410 | |
411 | if (PageAnon(page)) |
412 | diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c |
413 | index ae43dd807bb2..25c4dd563a79 100644 |
414 | --- a/net/core/rtnetlink.c |
415 | +++ b/net/core/rtnetlink.c |
416 | @@ -1318,6 +1318,7 @@ static int do_setlink(const struct sk_buff *skb, |
417 | goto errout; |
418 | } |
419 | if (!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) { |
420 | + put_net(net); |
421 | err = -EPERM; |
422 | goto errout; |
423 | } |
424 | diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c |
425 | index 6c20f4731f1a..65156a73b3f3 100644 |
426 | --- a/net/ipv6/ip6_gre.c |
427 | +++ b/net/ipv6/ip6_gre.c |
428 | @@ -512,11 +512,11 @@ static int ip6gre_rcv(struct sk_buff *skb) |
429 | |
430 | skb->protocol = gre_proto; |
431 | /* WCCP version 1 and 2 protocol decoding. |
432 | - * - Change protocol to IP |
433 | + * - Change protocol to IPv6 |
434 | * - When dealing with WCCPv2, Skip extra 4 bytes in GRE header |
435 | */ |
436 | if (flags == 0 && gre_proto == htons(ETH_P_WCCP)) { |
437 | - skb->protocol = htons(ETH_P_IP); |
438 | + skb->protocol = htons(ETH_P_IPV6); |
439 | if ((*(h + offset) & 0xF0) != 0x40) |
440 | offset += 4; |
441 | } |
442 | diff --git a/net/sctp/output.c b/net/sctp/output.c |
443 | index b6f5fc3127b9..73b8ca51ba14 100644 |
444 | --- a/net/sctp/output.c |
445 | +++ b/net/sctp/output.c |
446 | @@ -413,12 +413,12 @@ int sctp_packet_transmit(struct sctp_packet *packet) |
447 | sk = chunk->skb->sk; |
448 | |
449 | /* Allocate the new skb. */ |
450 | - nskb = alloc_skb(packet->size + LL_MAX_HEADER, GFP_ATOMIC); |
451 | + nskb = alloc_skb(packet->size + MAX_HEADER, GFP_ATOMIC); |
452 | if (!nskb) |
453 | goto nomem; |
454 | |
455 | /* Make sure the outbound skb has enough header room reserved. */ |
456 | - skb_reserve(nskb, packet->overhead + LL_MAX_HEADER); |
457 | + skb_reserve(nskb, packet->overhead + MAX_HEADER); |
458 | |
459 | /* Set the owning socket so that we know where to get the |
460 | * destination IP address. |
461 | diff --git a/sound/usb/midi.c b/sound/usb/midi.c |
462 | index 8e01fa4991c5..93249133aeec 100644 |
463 | --- a/sound/usb/midi.c |
464 | +++ b/sound/usb/midi.c |
465 | @@ -364,6 +364,8 @@ static void snd_usbmidi_error_timer(unsigned long data) |
466 | if (in && in->error_resubmit) { |
467 | in->error_resubmit = 0; |
468 | for (j = 0; j < INPUT_URBS; ++j) { |
469 | + if (atomic_read(&in->urbs[j]->use_count)) |
470 | + continue; |
471 | in->urbs[j]->dev = umidi->dev; |
472 | snd_usbmidi_submit_urb(in->urbs[j], GFP_ATOMIC); |
473 | } |