Annotation of /trunk/kernel26-alx/patches-3.10/0183-3.10.84-all-fixes.patch
Parent Directory | Revision Log
Revision 2672 -
(hide annotations)
(download)
Tue Jul 21 16:46:35 2015 UTC (9 years, 2 months ago) by niro
File size: 11843 byte(s)
Tue Jul 21 16:46:35 2015 UTC (9 years, 2 months ago) by niro
File size: 11843 byte(s)
-3.10.84-alx-r1
1 | niro | 2672 | diff --git a/Makefile b/Makefile |
2 | index 21529dbcc11d..f7b10bb56737 100644 | ||
3 | --- a/Makefile | ||
4 | +++ b/Makefile | ||
5 | @@ -1,6 +1,6 @@ | ||
6 | VERSION = 3 | ||
7 | PATCHLEVEL = 10 | ||
8 | -SUBLEVEL = 83 | ||
9 | +SUBLEVEL = 84 | ||
10 | EXTRAVERSION = | ||
11 | NAME = TOSSUG Baby Fish | ||
12 | |||
13 | diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S | ||
14 | index 16cd4ba5d7fd..bb117abb1b3b 100644 | ||
15 | --- a/arch/arm/kvm/interrupts.S | ||
16 | +++ b/arch/arm/kvm/interrupts.S | ||
17 | @@ -159,13 +159,9 @@ __kvm_vcpu_return: | ||
18 | @ Don't trap coprocessor accesses for host kernel | ||
19 | set_hstr vmexit | ||
20 | set_hdcr vmexit | ||
21 | - set_hcptr vmexit, (HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11)) | ||
22 | + set_hcptr vmexit, (HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11)), after_vfp_restore | ||
23 | |||
24 | #ifdef CONFIG_VFPv3 | ||
25 | - @ Save floating point registers we if let guest use them. | ||
26 | - tst r2, #(HCPTR_TCP(10) | HCPTR_TCP(11)) | ||
27 | - bne after_vfp_restore | ||
28 | - | ||
29 | @ Switch VFP/NEON hardware state to the host's | ||
30 | add r7, vcpu, #VCPU_VFP_GUEST | ||
31 | store_vfp_state r7 | ||
32 | @@ -177,6 +173,8 @@ after_vfp_restore: | ||
33 | @ Restore FPEXC_EN which we clobbered on entry | ||
34 | pop {r2} | ||
35 | VFPFMXR FPEXC, r2 | ||
36 | +#else | ||
37 | +after_vfp_restore: | ||
38 | #endif | ||
39 | |||
40 | @ Reset Hyp-role | ||
41 | @@ -458,7 +456,7 @@ switch_to_guest_vfp: | ||
42 | push {r3-r7} | ||
43 | |||
44 | @ NEON/VFP used. Turn on VFP access. | ||
45 | - set_hcptr vmexit, (HCPTR_TCP(10) | HCPTR_TCP(11)) | ||
46 | + set_hcptr vmtrap, (HCPTR_TCP(10) | HCPTR_TCP(11)) | ||
47 | |||
48 | @ Switch VFP/NEON hardware state to the guest's | ||
49 | add r7, r0, #VCPU_VFP_HOST | ||
50 | diff --git a/arch/arm/kvm/interrupts_head.S b/arch/arm/kvm/interrupts_head.S | ||
51 | index 6f18695a09cb..b6f6137f5984 100644 | ||
52 | --- a/arch/arm/kvm/interrupts_head.S | ||
53 | +++ b/arch/arm/kvm/interrupts_head.S | ||
54 | @@ -570,8 +570,13 @@ vcpu .req r0 @ vcpu pointer always in r0 | ||
55 | .endm | ||
56 | |||
57 | /* Configures the HCPTR (Hyp Coprocessor Trap Register) on entry/return | ||
58 | - * (hardware reset value is 0). Keep previous value in r2. */ | ||
59 | -.macro set_hcptr operation, mask | ||
60 | + * (hardware reset value is 0). Keep previous value in r2. | ||
61 | + * An ISB is emited on vmexit/vmtrap, but executed on vmexit only if | ||
62 | + * VFP wasn't already enabled (always executed on vmtrap). | ||
63 | + * If a label is specified with vmexit, it is branched to if VFP wasn't | ||
64 | + * enabled. | ||
65 | + */ | ||
66 | +.macro set_hcptr operation, mask, label = none | ||
67 | mrc p15, 4, r2, c1, c1, 2 | ||
68 | ldr r3, =\mask | ||
69 | .if \operation == vmentry | ||
70 | @@ -580,6 +585,17 @@ vcpu .req r0 @ vcpu pointer always in r0 | ||
71 | bic r3, r2, r3 @ Don't trap defined coproc-accesses | ||
72 | .endif | ||
73 | mcr p15, 4, r3, c1, c1, 2 | ||
74 | + .if \operation != vmentry | ||
75 | + .if \operation == vmexit | ||
76 | + tst r2, #(HCPTR_TCP(10) | HCPTR_TCP(11)) | ||
77 | + beq 1f | ||
78 | + .endif | ||
79 | + isb | ||
80 | + .if \label != none | ||
81 | + b \label | ||
82 | + .endif | ||
83 | +1: | ||
84 | + .endif | ||
85 | .endm | ||
86 | |||
87 | /* Configures the HDCR (Hyp Debug Configuration Register) on entry/return | ||
88 | diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h | ||
89 | index 5b2f2e68e57f..503eb6ca5802 100644 | ||
90 | --- a/arch/mips/include/asm/mach-generic/spaces.h | ||
91 | +++ b/arch/mips/include/asm/mach-generic/spaces.h | ||
92 | @@ -90,7 +90,11 @@ | ||
93 | #endif | ||
94 | |||
95 | #ifndef FIXADDR_TOP | ||
96 | +#ifdef CONFIG_KVM_GUEST | ||
97 | +#define FIXADDR_TOP ((unsigned long)(long)(int)0x7ffe0000) | ||
98 | +#else | ||
99 | #define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000) | ||
100 | #endif | ||
101 | +#endif | ||
102 | |||
103 | #endif /* __ASM_MACH_GENERIC_SPACES_H */ | ||
104 | diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c | ||
105 | index 846861a20b07..b63dc809596d 100644 | ||
106 | --- a/arch/powerpc/perf/core-book3s.c | ||
107 | +++ b/arch/powerpc/perf/core-book3s.c | ||
108 | @@ -112,7 +112,16 @@ static inline void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw) {} | ||
109 | |||
110 | static bool regs_use_siar(struct pt_regs *regs) | ||
111 | { | ||
112 | - return !!regs->result; | ||
113 | + /* | ||
114 | + * When we take a performance monitor exception the regs are setup | ||
115 | + * using perf_read_regs() which overloads some fields, in particular | ||
116 | + * regs->result to tell us whether to use SIAR. | ||
117 | + * | ||
118 | + * However if the regs are from another exception, eg. a syscall, then | ||
119 | + * they have not been setup using perf_read_regs() and so regs->result | ||
120 | + * is something random. | ||
121 | + */ | ||
122 | + return ((TRAP(regs) == 0xf00) && regs->result); | ||
123 | } | ||
124 | |||
125 | /* | ||
126 | diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c | ||
127 | index fa4c900a0d1f..62983d77455e 100644 | ||
128 | --- a/arch/sparc/kernel/ldc.c | ||
129 | +++ b/arch/sparc/kernel/ldc.c | ||
130 | @@ -2306,7 +2306,7 @@ void *ldc_alloc_exp_dring(struct ldc_channel *lp, unsigned int len, | ||
131 | if (len & (8UL - 1)) | ||
132 | return ERR_PTR(-EINVAL); | ||
133 | |||
134 | - buf = kzalloc(len, GFP_KERNEL); | ||
135 | + buf = kzalloc(len, GFP_ATOMIC); | ||
136 | if (!buf) | ||
137 | return ERR_PTR(-ENOMEM); | ||
138 | |||
139 | diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h | ||
140 | index 4c481e751e8e..98b68c2f1a1c 100644 | ||
141 | --- a/arch/x86/include/asm/kvm_host.h | ||
142 | +++ b/arch/x86/include/asm/kvm_host.h | ||
143 | @@ -541,7 +541,7 @@ struct kvm_arch { | ||
144 | struct kvm_pic *vpic; | ||
145 | struct kvm_ioapic *vioapic; | ||
146 | struct kvm_pit *vpit; | ||
147 | - int vapics_in_nmi_mode; | ||
148 | + atomic_t vapics_in_nmi_mode; | ||
149 | struct mutex apic_map_lock; | ||
150 | struct kvm_apic_map *apic_map; | ||
151 | |||
152 | diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c | ||
153 | index 298781d4cfb4..1406ffde3e35 100644 | ||
154 | --- a/arch/x86/kvm/i8254.c | ||
155 | +++ b/arch/x86/kvm/i8254.c | ||
156 | @@ -305,7 +305,7 @@ static void pit_do_work(struct kthread_work *work) | ||
157 | * LVT0 to NMI delivery. Other PIC interrupts are just sent to | ||
158 | * VCPU0, and only if its LVT0 is in EXTINT mode. | ||
159 | */ | ||
160 | - if (kvm->arch.vapics_in_nmi_mode > 0) | ||
161 | + if (atomic_read(&kvm->arch.vapics_in_nmi_mode) > 0) | ||
162 | kvm_for_each_vcpu(i, vcpu, kvm) | ||
163 | kvm_apic_nmi_wd_deliver(vcpu); | ||
164 | } | ||
165 | diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c | ||
166 | index 681e4e251f00..ff280209d7de 100644 | ||
167 | --- a/arch/x86/kvm/lapic.c | ||
168 | +++ b/arch/x86/kvm/lapic.c | ||
169 | @@ -1123,10 +1123,10 @@ static void apic_manage_nmi_watchdog(struct kvm_lapic *apic, u32 lvt0_val) | ||
170 | if (!nmi_wd_enabled) { | ||
171 | apic_debug("Receive NMI setting on APIC_LVT0 " | ||
172 | "for cpu %d\n", apic->vcpu->vcpu_id); | ||
173 | - apic->vcpu->kvm->arch.vapics_in_nmi_mode++; | ||
174 | + atomic_inc(&apic->vcpu->kvm->arch.vapics_in_nmi_mode); | ||
175 | } | ||
176 | } else if (nmi_wd_enabled) | ||
177 | - apic->vcpu->kvm->arch.vapics_in_nmi_mode--; | ||
178 | + atomic_dec(&apic->vcpu->kvm->arch.vapics_in_nmi_mode); | ||
179 | } | ||
180 | |||
181 | static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val) | ||
182 | diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c | ||
183 | index 3e724256dbee..a3b0265c2ca7 100644 | ||
184 | --- a/arch/x86/pci/acpi.c | ||
185 | +++ b/arch/x86/pci/acpi.c | ||
186 | @@ -84,6 +84,17 @@ static const struct dmi_system_id pci_crs_quirks[] __initconst = { | ||
187 | DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"), | ||
188 | }, | ||
189 | }, | ||
190 | + /* https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/931368 */ | ||
191 | + /* https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1033299 */ | ||
192 | + { | ||
193 | + .callback = set_use_crs, | ||
194 | + .ident = "Foxconn K8M890-8237A", | ||
195 | + .matches = { | ||
196 | + DMI_MATCH(DMI_BOARD_VENDOR, "Foxconn"), | ||
197 | + DMI_MATCH(DMI_BOARD_NAME, "K8M890-8237A"), | ||
198 | + DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"), | ||
199 | + }, | ||
200 | + }, | ||
201 | |||
202 | /* Now for the blacklist.. */ | ||
203 | |||
204 | diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c | ||
205 | index 5b2b5e61e4f9..057d894eee66 100644 | ||
206 | --- a/drivers/crypto/talitos.c | ||
207 | +++ b/drivers/crypto/talitos.c | ||
208 | @@ -935,7 +935,8 @@ static int sg_to_link_tbl(struct scatterlist *sg, int sg_count, | ||
209 | sg_count--; | ||
210 | link_tbl_ptr--; | ||
211 | } | ||
212 | - be16_add_cpu(&link_tbl_ptr->len, cryptlen); | ||
213 | + link_tbl_ptr->len = cpu_to_be16(be16_to_cpu(link_tbl_ptr->len) | ||
214 | + + cryptlen); | ||
215 | |||
216 | /* tag end of link table */ | ||
217 | link_tbl_ptr->j_extent = DESC_PTR_LNKTBL_RETURN; | ||
218 | @@ -2621,6 +2622,7 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev, | ||
219 | break; | ||
220 | default: | ||
221 | dev_err(dev, "unknown algorithm type %d\n", t_alg->algt.type); | ||
222 | + kfree(t_alg); | ||
223 | return ERR_PTR(-EINVAL); | ||
224 | } | ||
225 | |||
226 | diff --git a/fs/inode.c b/fs/inode.c | ||
227 | index 1b300a06b8be..17f95b417955 100644 | ||
228 | --- a/fs/inode.c | ||
229 | +++ b/fs/inode.c | ||
230 | @@ -1628,8 +1628,8 @@ int file_remove_suid(struct file *file) | ||
231 | error = security_inode_killpriv(dentry); | ||
232 | if (!error && killsuid) | ||
233 | error = __remove_suid(dentry, killsuid); | ||
234 | - if (!error && (inode->i_sb->s_flags & MS_NOSEC)) | ||
235 | - inode->i_flags |= S_NOSEC; | ||
236 | + if (!error) | ||
237 | + inode_has_no_xattr(inode); | ||
238 | |||
239 | return error; | ||
240 | } | ||
241 | diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c | ||
242 | index cd8c3a44ab7d..b73eaba85667 100644 | ||
243 | --- a/net/bridge/br_ioctl.c | ||
244 | +++ b/net/bridge/br_ioctl.c | ||
245 | @@ -247,9 +247,7 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | ||
246 | if (!ns_capable(dev_net(dev)->user_ns, CAP_NET_ADMIN)) | ||
247 | return -EPERM; | ||
248 | |||
249 | - spin_lock_bh(&br->lock); | ||
250 | br_stp_set_bridge_priority(br, args[1]); | ||
251 | - spin_unlock_bh(&br->lock); | ||
252 | return 0; | ||
253 | |||
254 | case BRCTL_SET_PORT_PRIORITY: | ||
255 | diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c | ||
256 | index 49b4a82d3f86..a09ea178348c 100644 | ||
257 | --- a/net/bridge/br_multicast.c | ||
258 | +++ b/net/bridge/br_multicast.c | ||
259 | @@ -1026,6 +1026,9 @@ static void br_multicast_add_router(struct net_bridge *br, | ||
260 | struct net_bridge_port *p; | ||
261 | struct hlist_node *slot = NULL; | ||
262 | |||
263 | + if (!hlist_unhashed(&port->rlist)) | ||
264 | + return; | ||
265 | + | ||
266 | hlist_for_each_entry(p, &br->router_list, rlist) { | ||
267 | if ((unsigned long) port >= (unsigned long) p) | ||
268 | break; | ||
269 | @@ -1053,12 +1056,8 @@ static void br_multicast_mark_router(struct net_bridge *br, | ||
270 | if (port->multicast_router != 1) | ||
271 | return; | ||
272 | |||
273 | - if (!hlist_unhashed(&port->rlist)) | ||
274 | - goto timer; | ||
275 | - | ||
276 | br_multicast_add_router(br, port); | ||
277 | |||
278 | -timer: | ||
279 | mod_timer(&port->multicast_router_timer, | ||
280 | now + br->multicast_querier_interval); | ||
281 | } | ||
282 | diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c | ||
283 | index 656a6f3e40de..886f6d6dc48a 100644 | ||
284 | --- a/net/bridge/br_stp_if.c | ||
285 | +++ b/net/bridge/br_stp_if.c | ||
286 | @@ -241,12 +241,13 @@ bool br_stp_recalculate_bridge_id(struct net_bridge *br) | ||
287 | return true; | ||
288 | } | ||
289 | |||
290 | -/* called under bridge lock */ | ||
291 | +/* Acquires and releases bridge lock */ | ||
292 | void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio) | ||
293 | { | ||
294 | struct net_bridge_port *p; | ||
295 | int wasroot; | ||
296 | |||
297 | + spin_lock_bh(&br->lock); | ||
298 | wasroot = br_is_root_bridge(br); | ||
299 | |||
300 | list_for_each_entry(p, &br->port_list, list) { | ||
301 | @@ -264,6 +265,7 @@ void br_stp_set_bridge_priority(struct net_bridge *br, u16 newprio) | ||
302 | br_port_state_selection(br); | ||
303 | if (br_is_root_bridge(br) && !wasroot) | ||
304 | br_become_root_bridge(br); | ||
305 | + spin_unlock_bh(&br->lock); | ||
306 | } | ||
307 | |||
308 | /* called under bridge lock */ | ||
309 | diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c | ||
310 | index 81b4b816f131..39fa33969b09 100644 | ||
311 | --- a/net/packet/af_packet.c | ||
312 | +++ b/net/packet/af_packet.c | ||
313 | @@ -1150,16 +1150,6 @@ static void packet_sock_destruct(struct sock *sk) | ||
314 | sk_refcnt_debug_dec(sk); | ||
315 | } | ||
316 | |||
317 | -static int fanout_rr_next(struct packet_fanout *f, unsigned int num) | ||
318 | -{ | ||
319 | - int x = atomic_read(&f->rr_cur) + 1; | ||
320 | - | ||
321 | - if (x >= num) | ||
322 | - x = 0; | ||
323 | - | ||
324 | - return x; | ||
325 | -} | ||
326 | - | ||
327 | static unsigned int fanout_demux_hash(struct packet_fanout *f, | ||
328 | struct sk_buff *skb, | ||
329 | unsigned int num) | ||
330 | @@ -1171,13 +1161,9 @@ static unsigned int fanout_demux_lb(struct packet_fanout *f, | ||
331 | struct sk_buff *skb, | ||
332 | unsigned int num) | ||
333 | { | ||
334 | - int cur, old; | ||
335 | + unsigned int val = atomic_inc_return(&f->rr_cur); | ||
336 | |||
337 | - cur = atomic_read(&f->rr_cur); | ||
338 | - while ((old = atomic_cmpxchg(&f->rr_cur, cur, | ||
339 | - fanout_rr_next(f, num))) != cur) | ||
340 | - cur = old; | ||
341 | - return cur; | ||
342 | + return val % num; | ||
343 | } | ||
344 | |||
345 | static unsigned int fanout_demux_cpu(struct packet_fanout *f, | ||
346 | @@ -1217,7 +1203,7 @@ static int packet_rcv_fanout(struct sk_buff *skb, struct net_device *dev, | ||
347 | struct packet_type *pt, struct net_device *orig_dev) | ||
348 | { | ||
349 | struct packet_fanout *f = pt->af_packet_priv; | ||
350 | - unsigned int num = f->num_members; | ||
351 | + unsigned int num = ACCESS_ONCE(f->num_members); | ||
352 | struct packet_sock *po; | ||
353 | unsigned int idx; | ||
354 | |||
355 | diff --git a/net/sctp/output.c b/net/sctp/output.c | ||
356 | index 73b8ca51ba14..2d9689333fe4 100644 | ||
357 | --- a/net/sctp/output.c | ||
358 | +++ b/net/sctp/output.c | ||
359 | @@ -618,7 +618,9 @@ out: | ||
360 | return err; | ||
361 | no_route: | ||
362 | kfree_skb(nskb); | ||
363 | - IP_INC_STATS(sock_net(asoc->base.sk), IPSTATS_MIB_OUTNOROUTES); | ||
364 | + | ||
365 | + if (asoc) | ||
366 | + IP_INC_STATS(sock_net(asoc->base.sk), IPSTATS_MIB_OUTNOROUTES); | ||
367 | |||
368 | /* FIXME: Returning the 'err' will effect all the associations | ||
369 | * associated with a socket, although only one of the paths of the |