Contents of /trunk/kernel26-alx/patches-3.10/0150-3.10.51-all-fixes.patch
Parent Directory | Revision Log
Revision 2672 -
(show annotations)
(download)
Tue Jul 21 16:46:35 2015 UTC (9 years, 2 months ago) by niro
File size: 22355 byte(s)
Tue Jul 21 16:46:35 2015 UTC (9 years, 2 months ago) by niro
File size: 22355 byte(s)
-3.10.84-alx-r1
1 | diff --git a/Makefile b/Makefile |
2 | index 8d891c66803c..f9f6ee59c61a 100644 |
3 | --- a/Makefile |
4 | +++ b/Makefile |
5 | @@ -1,6 +1,6 @@ |
6 | VERSION = 3 |
7 | PATCHLEVEL = 10 |
8 | -SUBLEVEL = 50 |
9 | +SUBLEVEL = 51 |
10 | EXTRAVERSION = |
11 | NAME = TOSSUG Baby Fish |
12 | |
13 | @@ -614,6 +614,8 @@ KBUILD_CFLAGS += -fomit-frame-pointer |
14 | endif |
15 | endif |
16 | |
17 | +KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments) |
18 | + |
19 | ifdef CONFIG_DEBUG_INFO |
20 | KBUILD_CFLAGS += -g |
21 | KBUILD_AFLAGS += -gdwarf-2 |
22 | diff --git a/arch/parisc/include/uapi/asm/signal.h b/arch/parisc/include/uapi/asm/signal.h |
23 | index a2fa297196bc..f5645d6a89f2 100644 |
24 | --- a/arch/parisc/include/uapi/asm/signal.h |
25 | +++ b/arch/parisc/include/uapi/asm/signal.h |
26 | @@ -69,8 +69,6 @@ |
27 | #define SA_NOMASK SA_NODEFER |
28 | #define SA_ONESHOT SA_RESETHAND |
29 | |
30 | -#define SA_RESTORER 0x04000000 /* obsolete -- ignored */ |
31 | - |
32 | #define MINSIGSTKSZ 2048 |
33 | #define SIGSTKSZ 8192 |
34 | |
35 | diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c |
36 | index a314c57f4e94..9677d935583c 100644 |
37 | --- a/arch/s390/kernel/ptrace.c |
38 | +++ b/arch/s390/kernel/ptrace.c |
39 | @@ -314,7 +314,9 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data) |
40 | * psw and gprs are stored on the stack |
41 | */ |
42 | if (addr == (addr_t) &dummy->regs.psw.mask && |
43 | - ((data & ~PSW_MASK_USER) != psw_user_bits || |
44 | + (((data^psw_user_bits) & ~PSW_MASK_USER) || |
45 | + (((data^psw_user_bits) & PSW_MASK_ASC) && |
46 | + ((data|psw_user_bits) & PSW_MASK_ASC) == PSW_MASK_ASC) || |
47 | ((data & PSW_MASK_EA) && !(data & PSW_MASK_BA)))) |
48 | /* Invalid psw mask. */ |
49 | return -EINVAL; |
50 | @@ -627,7 +629,10 @@ static int __poke_user_compat(struct task_struct *child, |
51 | */ |
52 | if (addr == (addr_t) &dummy32->regs.psw.mask) { |
53 | /* Build a 64 bit psw mask from 31 bit mask. */ |
54 | - if ((tmp & ~PSW32_MASK_USER) != psw32_user_bits) |
55 | + if (((tmp^psw32_user_bits) & ~PSW32_MASK_USER) || |
56 | + (((tmp^psw32_user_bits) & PSW32_MASK_ASC) && |
57 | + ((tmp|psw32_user_bits) & PSW32_MASK_ASC) |
58 | + == PSW32_MASK_ASC)) |
59 | /* Invalid psw mask. */ |
60 | return -EINVAL; |
61 | regs->psw.mask = (regs->psw.mask & ~PSW_MASK_USER) | |
62 | diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S |
63 | index 9ec06a1f6d61..425712462178 100644 |
64 | --- a/arch/x86/boot/header.S |
65 | +++ b/arch/x86/boot/header.S |
66 | @@ -91,10 +91,9 @@ bs_die: |
67 | |
68 | .section ".bsdata", "a" |
69 | bugger_off_msg: |
70 | - .ascii "Direct floppy boot is not supported. " |
71 | - .ascii "Use a boot loader program instead.\r\n" |
72 | + .ascii "Use a boot loader.\r\n" |
73 | .ascii "\n" |
74 | - .ascii "Remove disk and press any key to reboot ...\r\n" |
75 | + .ascii "Remove disk and press any key to reboot...\r\n" |
76 | .byte 0 |
77 | |
78 | #ifdef CONFIG_EFI_STUB |
79 | @@ -108,7 +107,7 @@ coff_header: |
80 | #else |
81 | .word 0x8664 # x86-64 |
82 | #endif |
83 | - .word 3 # nr_sections |
84 | + .word 4 # nr_sections |
85 | .long 0 # TimeDateStamp |
86 | .long 0 # PointerToSymbolTable |
87 | .long 1 # NumberOfSymbols |
88 | @@ -250,6 +249,25 @@ section_table: |
89 | .word 0 # NumberOfLineNumbers |
90 | .long 0x60500020 # Characteristics (section flags) |
91 | |
92 | + # |
93 | + # The offset & size fields are filled in by build.c. |
94 | + # |
95 | + .ascii ".bss" |
96 | + .byte 0 |
97 | + .byte 0 |
98 | + .byte 0 |
99 | + .byte 0 |
100 | + .long 0 |
101 | + .long 0x0 |
102 | + .long 0 # Size of initialized data |
103 | + # on disk |
104 | + .long 0x0 |
105 | + .long 0 # PointerToRelocations |
106 | + .long 0 # PointerToLineNumbers |
107 | + .word 0 # NumberOfRelocations |
108 | + .word 0 # NumberOfLineNumbers |
109 | + .long 0xc8000080 # Characteristics (section flags) |
110 | + |
111 | #endif /* CONFIG_EFI_STUB */ |
112 | |
113 | # Kernel attributes; used by setup. This is part 1 of the |
114 | diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c |
115 | index 94c544650020..971a0ce062aa 100644 |
116 | --- a/arch/x86/boot/tools/build.c |
117 | +++ b/arch/x86/boot/tools/build.c |
118 | @@ -141,7 +141,7 @@ static void usage(void) |
119 | |
120 | #ifdef CONFIG_EFI_STUB |
121 | |
122 | -static void update_pecoff_section_header(char *section_name, u32 offset, u32 size) |
123 | +static void update_pecoff_section_header_fields(char *section_name, u32 vma, u32 size, u32 datasz, u32 offset) |
124 | { |
125 | unsigned int pe_header; |
126 | unsigned short num_sections; |
127 | @@ -162,10 +162,10 @@ static void update_pecoff_section_header(char *section_name, u32 offset, u32 siz |
128 | put_unaligned_le32(size, section + 0x8); |
129 | |
130 | /* section header vma field */ |
131 | - put_unaligned_le32(offset, section + 0xc); |
132 | + put_unaligned_le32(vma, section + 0xc); |
133 | |
134 | /* section header 'size of initialised data' field */ |
135 | - put_unaligned_le32(size, section + 0x10); |
136 | + put_unaligned_le32(datasz, section + 0x10); |
137 | |
138 | /* section header 'file offset' field */ |
139 | put_unaligned_le32(offset, section + 0x14); |
140 | @@ -177,6 +177,11 @@ static void update_pecoff_section_header(char *section_name, u32 offset, u32 siz |
141 | } |
142 | } |
143 | |
144 | +static void update_pecoff_section_header(char *section_name, u32 offset, u32 size) |
145 | +{ |
146 | + update_pecoff_section_header_fields(section_name, offset, size, size, offset); |
147 | +} |
148 | + |
149 | static void update_pecoff_setup_and_reloc(unsigned int size) |
150 | { |
151 | u32 setup_offset = 0x200; |
152 | @@ -201,9 +206,6 @@ static void update_pecoff_text(unsigned int text_start, unsigned int file_sz) |
153 | |
154 | pe_header = get_unaligned_le32(&buf[0x3c]); |
155 | |
156 | - /* Size of image */ |
157 | - put_unaligned_le32(file_sz, &buf[pe_header + 0x50]); |
158 | - |
159 | /* |
160 | * Size of code: Subtract the size of the first sector (512 bytes) |
161 | * which includes the header. |
162 | @@ -218,6 +220,22 @@ static void update_pecoff_text(unsigned int text_start, unsigned int file_sz) |
163 | update_pecoff_section_header(".text", text_start, text_sz); |
164 | } |
165 | |
166 | +static void update_pecoff_bss(unsigned int file_sz, unsigned int init_sz) |
167 | +{ |
168 | + unsigned int pe_header; |
169 | + unsigned int bss_sz = init_sz - file_sz; |
170 | + |
171 | + pe_header = get_unaligned_le32(&buf[0x3c]); |
172 | + |
173 | + /* Size of uninitialized data */ |
174 | + put_unaligned_le32(bss_sz, &buf[pe_header + 0x24]); |
175 | + |
176 | + /* Size of image */ |
177 | + put_unaligned_le32(init_sz, &buf[pe_header + 0x50]); |
178 | + |
179 | + update_pecoff_section_header_fields(".bss", file_sz, bss_sz, 0, 0); |
180 | +} |
181 | + |
182 | #endif /* CONFIG_EFI_STUB */ |
183 | |
184 | |
185 | @@ -268,6 +286,9 @@ int main(int argc, char ** argv) |
186 | int fd; |
187 | void *kernel; |
188 | u32 crc = 0xffffffffUL; |
189 | +#ifdef CONFIG_EFI_STUB |
190 | + unsigned int init_sz; |
191 | +#endif |
192 | |
193 | /* Defaults for old kernel */ |
194 | #ifdef CONFIG_X86_32 |
195 | @@ -338,7 +359,9 @@ int main(int argc, char ** argv) |
196 | put_unaligned_le32(sys_size, &buf[0x1f4]); |
197 | |
198 | #ifdef CONFIG_EFI_STUB |
199 | - update_pecoff_text(setup_sectors * 512, sz + i + ((sys_size * 16) - sz)); |
200 | + update_pecoff_text(setup_sectors * 512, i + (sys_size * 16)); |
201 | + init_sz = get_unaligned_le32(&buf[0x260]); |
202 | + update_pecoff_bss(i + (sys_size * 16), init_sz); |
203 | |
204 | #ifdef CONFIG_X86_64 /* Yes, this is really how we defined it :( */ |
205 | efi_stub_entry -= 0x200; |
206 | diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S |
207 | index ac6328176097..08fa44443a01 100644 |
208 | --- a/arch/x86/kernel/entry_32.S |
209 | +++ b/arch/x86/kernel/entry_32.S |
210 | @@ -436,8 +436,8 @@ sysenter_do_call: |
211 | cmpl $(NR_syscalls), %eax |
212 | jae sysenter_badsys |
213 | call *sys_call_table(,%eax,4) |
214 | - movl %eax,PT_EAX(%esp) |
215 | sysenter_after_call: |
216 | + movl %eax,PT_EAX(%esp) |
217 | LOCKDEP_SYS_EXIT |
218 | DISABLE_INTERRUPTS(CLBR_ANY) |
219 | TRACE_IRQS_OFF |
220 | @@ -517,6 +517,7 @@ ENTRY(system_call) |
221 | jae syscall_badsys |
222 | syscall_call: |
223 | call *sys_call_table(,%eax,4) |
224 | +syscall_after_call: |
225 | movl %eax,PT_EAX(%esp) # store the return value |
226 | syscall_exit: |
227 | LOCKDEP_SYS_EXIT |
228 | @@ -686,12 +687,12 @@ syscall_fault: |
229 | END(syscall_fault) |
230 | |
231 | syscall_badsys: |
232 | - movl $-ENOSYS,PT_EAX(%esp) |
233 | - jmp syscall_exit |
234 | + movl $-ENOSYS,%eax |
235 | + jmp syscall_after_call |
236 | END(syscall_badsys) |
237 | |
238 | sysenter_badsys: |
239 | - movl $-ENOSYS,PT_EAX(%esp) |
240 | + movl $-ENOSYS,%eax |
241 | jmp sysenter_after_call |
242 | END(syscall_badsys) |
243 | CFI_ENDPROC |
244 | diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c |
245 | index e8918ffaf96d..b95219d2168d 100644 |
246 | --- a/block/blk-cgroup.c |
247 | +++ b/block/blk-cgroup.c |
248 | @@ -876,6 +876,13 @@ void blkcg_drain_queue(struct request_queue *q) |
249 | { |
250 | lockdep_assert_held(q->queue_lock); |
251 | |
252 | + /* |
253 | + * @q could be exiting and already have destroyed all blkgs as |
254 | + * indicated by NULL root_blkg. If so, don't confuse policies. |
255 | + */ |
256 | + if (!q->root_blkg) |
257 | + return; |
258 | + |
259 | blk_throtl_drain(q); |
260 | } |
261 | |
262 | diff --git a/block/blk-tag.c b/block/blk-tag.c |
263 | index cc345e1d8d4e..0c51b4b34f47 100644 |
264 | --- a/block/blk-tag.c |
265 | +++ b/block/blk-tag.c |
266 | @@ -27,18 +27,15 @@ struct request *blk_queue_find_tag(struct request_queue *q, int tag) |
267 | EXPORT_SYMBOL(blk_queue_find_tag); |
268 | |
269 | /** |
270 | - * __blk_free_tags - release a given set of tag maintenance info |
271 | + * blk_free_tags - release a given set of tag maintenance info |
272 | * @bqt: the tag map to free |
273 | * |
274 | - * Tries to free the specified @bqt. Returns true if it was |
275 | - * actually freed and false if there are still references using it |
276 | + * Drop the reference count on @bqt and frees it when the last reference |
277 | + * is dropped. |
278 | */ |
279 | -static int __blk_free_tags(struct blk_queue_tag *bqt) |
280 | +void blk_free_tags(struct blk_queue_tag *bqt) |
281 | { |
282 | - int retval; |
283 | - |
284 | - retval = atomic_dec_and_test(&bqt->refcnt); |
285 | - if (retval) { |
286 | + if (atomic_dec_and_test(&bqt->refcnt)) { |
287 | BUG_ON(find_first_bit(bqt->tag_map, bqt->max_depth) < |
288 | bqt->max_depth); |
289 | |
290 | @@ -50,9 +47,8 @@ static int __blk_free_tags(struct blk_queue_tag *bqt) |
291 | |
292 | kfree(bqt); |
293 | } |
294 | - |
295 | - return retval; |
296 | } |
297 | +EXPORT_SYMBOL(blk_free_tags); |
298 | |
299 | /** |
300 | * __blk_queue_free_tags - release tag maintenance info |
301 | @@ -69,28 +65,13 @@ void __blk_queue_free_tags(struct request_queue *q) |
302 | if (!bqt) |
303 | return; |
304 | |
305 | - __blk_free_tags(bqt); |
306 | + blk_free_tags(bqt); |
307 | |
308 | q->queue_tags = NULL; |
309 | queue_flag_clear_unlocked(QUEUE_FLAG_QUEUED, q); |
310 | } |
311 | |
312 | /** |
313 | - * blk_free_tags - release a given set of tag maintenance info |
314 | - * @bqt: the tag map to free |
315 | - * |
316 | - * For externally managed @bqt frees the map. Callers of this |
317 | - * function must guarantee to have released all the queues that |
318 | - * might have been using this tag map. |
319 | - */ |
320 | -void blk_free_tags(struct blk_queue_tag *bqt) |
321 | -{ |
322 | - if (unlikely(!__blk_free_tags(bqt))) |
323 | - BUG(); |
324 | -} |
325 | -EXPORT_SYMBOL(blk_free_tags); |
326 | - |
327 | -/** |
328 | * blk_queue_free_tags - release tag maintenance info |
329 | * @q: the request queue for the device |
330 | * |
331 | diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c |
332 | index 7c668c8a6f95..21ad6869a5ce 100644 |
333 | --- a/block/compat_ioctl.c |
334 | +++ b/block/compat_ioctl.c |
335 | @@ -689,6 +689,7 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg) |
336 | case BLKROSET: |
337 | case BLKDISCARD: |
338 | case BLKSECDISCARD: |
339 | + case BLKZEROOUT: |
340 | /* |
341 | * the ones below are implemented in blkdev_locked_ioctl, |
342 | * but we call blkdev_ioctl, which gets the lock for us |
343 | diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c |
344 | index b0d33d9533aa..3b39687c6336 100644 |
345 | --- a/drivers/ata/ahci.c |
346 | +++ b/drivers/ata/ahci.c |
347 | @@ -455,6 +455,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { |
348 | |
349 | /* Promise */ |
350 | { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ |
351 | + { PCI_VDEVICE(PROMISE, 0x3781), board_ahci }, /* FastTrak TX8660 ahci-mode */ |
352 | |
353 | /* Asmedia */ |
354 | { PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */ |
355 | diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c |
356 | index bf00fbcde8ad..ca7c23d58a03 100644 |
357 | --- a/drivers/ata/libata-core.c |
358 | +++ b/drivers/ata/libata-core.c |
359 | @@ -4758,6 +4758,10 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words) |
360 | * ata_qc_new - Request an available ATA command, for queueing |
361 | * @ap: target port |
362 | * |
363 | + * Some ATA host controllers may implement a queue depth which is less |
364 | + * than ATA_MAX_QUEUE. So we shouldn't allocate a tag which is beyond |
365 | + * the hardware limitation. |
366 | + * |
367 | * LOCKING: |
368 | * None. |
369 | */ |
370 | @@ -4765,14 +4769,15 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words) |
371 | static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap) |
372 | { |
373 | struct ata_queued_cmd *qc = NULL; |
374 | + unsigned int max_queue = ap->host->n_tags; |
375 | unsigned int i, tag; |
376 | |
377 | /* no command while frozen */ |
378 | if (unlikely(ap->pflags & ATA_PFLAG_FROZEN)) |
379 | return NULL; |
380 | |
381 | - for (i = 0; i < ATA_MAX_QUEUE; i++) { |
382 | - tag = (i + ap->last_tag + 1) % ATA_MAX_QUEUE; |
383 | + for (i = 0, tag = ap->last_tag + 1; i < max_queue; i++, tag++) { |
384 | + tag = tag < max_queue ? tag : 0; |
385 | |
386 | /* the last tag is reserved for internal command. */ |
387 | if (tag == ATA_TAG_INTERNAL) |
388 | @@ -6073,6 +6078,7 @@ void ata_host_init(struct ata_host *host, struct device *dev, |
389 | { |
390 | spin_lock_init(&host->lock); |
391 | mutex_init(&host->eh_mutex); |
392 | + host->n_tags = ATA_MAX_QUEUE - 1; |
393 | host->dev = dev; |
394 | host->ops = ops; |
395 | } |
396 | @@ -6154,6 +6160,8 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) |
397 | { |
398 | int i, rc; |
399 | |
400 | + host->n_tags = clamp(sht->can_queue, 1, ATA_MAX_QUEUE - 1); |
401 | + |
402 | /* host must have been started */ |
403 | if (!(host->flags & ATA_HOST_STARTED)) { |
404 | dev_err(host->dev, "BUG: trying to register unstarted host\n"); |
405 | diff --git a/drivers/hwmon/smsc47m192.c b/drivers/hwmon/smsc47m192.c |
406 | index efee4c59239f..34b9a601ad07 100644 |
407 | --- a/drivers/hwmon/smsc47m192.c |
408 | +++ b/drivers/hwmon/smsc47m192.c |
409 | @@ -86,7 +86,7 @@ static inline u8 IN_TO_REG(unsigned long val, int n) |
410 | */ |
411 | static inline s8 TEMP_TO_REG(int val) |
412 | { |
413 | - return clamp_val(SCALE(val, 1, 1000), -128000, 127000); |
414 | + return SCALE(clamp_val(val, -128000, 127000), 1, 1000); |
415 | } |
416 | |
417 | static inline int TEMP_FROM_REG(s8 val) |
418 | @@ -384,6 +384,8 @@ static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, |
419 | err = kstrtoul(buf, 10, &val); |
420 | if (err) |
421 | return err; |
422 | + if (val > 255) |
423 | + return -EINVAL; |
424 | |
425 | data->vrm = val; |
426 | return count; |
427 | diff --git a/drivers/input/input.c b/drivers/input/input.c |
428 | index 66984e272c45..a161021c4526 100644 |
429 | --- a/drivers/input/input.c |
430 | +++ b/drivers/input/input.c |
431 | @@ -257,9 +257,10 @@ static int input_handle_abs_event(struct input_dev *dev, |
432 | } |
433 | |
434 | static int input_get_disposition(struct input_dev *dev, |
435 | - unsigned int type, unsigned int code, int value) |
436 | + unsigned int type, unsigned int code, int *pval) |
437 | { |
438 | int disposition = INPUT_IGNORE_EVENT; |
439 | + int value = *pval; |
440 | |
441 | switch (type) { |
442 | |
443 | @@ -357,6 +358,7 @@ static int input_get_disposition(struct input_dev *dev, |
444 | break; |
445 | } |
446 | |
447 | + *pval = value; |
448 | return disposition; |
449 | } |
450 | |
451 | @@ -365,7 +367,7 @@ static void input_handle_event(struct input_dev *dev, |
452 | { |
453 | int disposition; |
454 | |
455 | - disposition = input_get_disposition(dev, type, code, value); |
456 | + disposition = input_get_disposition(dev, type, code, &value); |
457 | |
458 | if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event) |
459 | dev->event(dev, type, code, value); |
460 | diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c |
461 | index 36eb27d3fdf1..def7812d7b22 100644 |
462 | --- a/drivers/media/dvb-frontends/tda10071.c |
463 | +++ b/drivers/media/dvb-frontends/tda10071.c |
464 | @@ -667,6 +667,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe) |
465 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; |
466 | int ret, i; |
467 | u8 mode, rolloff, pilot, inversion, div; |
468 | + fe_modulation_t modulation; |
469 | |
470 | dev_dbg(&priv->i2c->dev, "%s: delivery_system=%d modulation=%d " \ |
471 | "frequency=%d symbol_rate=%d inversion=%d pilot=%d " \ |
472 | @@ -701,10 +702,13 @@ static int tda10071_set_frontend(struct dvb_frontend *fe) |
473 | |
474 | switch (c->delivery_system) { |
475 | case SYS_DVBS: |
476 | + modulation = QPSK; |
477 | rolloff = 0; |
478 | pilot = 2; |
479 | break; |
480 | case SYS_DVBS2: |
481 | + modulation = c->modulation; |
482 | + |
483 | switch (c->rolloff) { |
484 | case ROLLOFF_20: |
485 | rolloff = 2; |
486 | @@ -749,7 +753,7 @@ static int tda10071_set_frontend(struct dvb_frontend *fe) |
487 | |
488 | for (i = 0, mode = 0xff; i < ARRAY_SIZE(TDA10071_MODCOD); i++) { |
489 | if (c->delivery_system == TDA10071_MODCOD[i].delivery_system && |
490 | - c->modulation == TDA10071_MODCOD[i].modulation && |
491 | + modulation == TDA10071_MODCOD[i].modulation && |
492 | c->fec_inner == TDA10071_MODCOD[i].fec) { |
493 | mode = TDA10071_MODCOD[i].val; |
494 | dev_dbg(&priv->i2c->dev, "%s: mode found=%02x\n", |
495 | diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c |
496 | index 774ba0e820be..eed70a4d24e6 100644 |
497 | --- a/drivers/media/usb/hdpvr/hdpvr-video.c |
498 | +++ b/drivers/media/usb/hdpvr/hdpvr-video.c |
499 | @@ -81,7 +81,7 @@ static void hdpvr_read_bulk_callback(struct urb *urb) |
500 | } |
501 | |
502 | /*=========================================================================*/ |
503 | -/* bufffer bits */ |
504 | +/* buffer bits */ |
505 | |
506 | /* function expects dev->io_mutex to be hold by caller */ |
507 | int hdpvr_cancel_queue(struct hdpvr_device *dev) |
508 | @@ -921,7 +921,7 @@ static int hdpvr_s_ctrl(struct v4l2_ctrl *ctrl) |
509 | case V4L2_CID_MPEG_AUDIO_ENCODING: |
510 | if (dev->flags & HDPVR_FLAG_AC3_CAP) { |
511 | opt->audio_codec = ctrl->val; |
512 | - return hdpvr_set_audio(dev, opt->audio_input, |
513 | + return hdpvr_set_audio(dev, opt->audio_input + 1, |
514 | opt->audio_codec); |
515 | } |
516 | return 0; |
517 | @@ -1191,7 +1191,7 @@ int hdpvr_register_videodev(struct hdpvr_device *dev, struct device *parent, |
518 | v4l2_ctrl_new_std_menu(hdl, &hdpvr_ctrl_ops, |
519 | V4L2_CID_MPEG_AUDIO_ENCODING, |
520 | ac3 ? V4L2_MPEG_AUDIO_ENCODING_AC3 : V4L2_MPEG_AUDIO_ENCODING_AAC, |
521 | - 0x7, V4L2_MPEG_AUDIO_ENCODING_AAC); |
522 | + 0x7, ac3 ? dev->options.audio_codec : V4L2_MPEG_AUDIO_ENCODING_AAC); |
523 | v4l2_ctrl_new_std_menu(hdl, &hdpvr_ctrl_ops, |
524 | V4L2_CID_MPEG_VIDEO_ENCODING, |
525 | V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC, 0x3, |
526 | diff --git a/fs/coredump.c b/fs/coredump.c |
527 | index dafafbafa731..1d402ce5b72f 100644 |
528 | --- a/fs/coredump.c |
529 | +++ b/fs/coredump.c |
530 | @@ -299,7 +299,7 @@ static int zap_threads(struct task_struct *tsk, struct mm_struct *mm, |
531 | if (unlikely(nr < 0)) |
532 | return nr; |
533 | |
534 | - tsk->flags = PF_DUMPCORE; |
535 | + tsk->flags |= PF_DUMPCORE; |
536 | if (atomic_read(&mm->mm_users) == nr + 1) |
537 | goto done; |
538 | /* |
539 | diff --git a/include/linux/libata.h b/include/linux/libata.h |
540 | index eec130af2dfa..cc82cfb66259 100644 |
541 | --- a/include/linux/libata.h |
542 | +++ b/include/linux/libata.h |
543 | @@ -547,6 +547,7 @@ struct ata_host { |
544 | struct device *dev; |
545 | void __iomem * const *iomap; |
546 | unsigned int n_ports; |
547 | + unsigned int n_tags; /* nr of NCQ tags */ |
548 | void *private_data; |
549 | struct ata_port_operations *ops; |
550 | unsigned long flags; |
551 | diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c |
552 | index 98a830d079b9..18cdf91b2f85 100644 |
553 | --- a/kernel/trace/trace.c |
554 | +++ b/kernel/trace/trace.c |
555 | @@ -741,7 +741,7 @@ static struct { |
556 | { trace_clock_local, "local", 1 }, |
557 | { trace_clock_global, "global", 1 }, |
558 | { trace_clock_counter, "counter", 0 }, |
559 | - { trace_clock_jiffies, "uptime", 1 }, |
560 | + { trace_clock_jiffies, "uptime", 0 }, |
561 | { trace_clock, "perf", 1 }, |
562 | ARCH_TRACE_CLOCKS |
563 | }; |
564 | diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c |
565 | index 26dc348332b7..57b67b1f24d1 100644 |
566 | --- a/kernel/trace/trace_clock.c |
567 | +++ b/kernel/trace/trace_clock.c |
568 | @@ -59,13 +59,14 @@ u64 notrace trace_clock(void) |
569 | |
570 | /* |
571 | * trace_jiffy_clock(): Simply use jiffies as a clock counter. |
572 | + * Note that this use of jiffies_64 is not completely safe on |
573 | + * 32-bit systems. But the window is tiny, and the effect if |
574 | + * we are affected is that we will have an obviously bogus |
575 | + * timestamp on a trace event - i.e. not life threatening. |
576 | */ |
577 | u64 notrace trace_clock_jiffies(void) |
578 | { |
579 | - u64 jiffy = jiffies - INITIAL_JIFFIES; |
580 | - |
581 | - /* Return nsecs */ |
582 | - return (u64)jiffies_to_usecs(jiffy) * 1000ULL; |
583 | + return jiffies_64_to_clock_t(jiffies_64 - INITIAL_JIFFIES); |
584 | } |
585 | |
586 | /* |
587 | diff --git a/mm/hugetlb.c b/mm/hugetlb.c |
588 | index dbc949c409c7..7de4f67c81fe 100644 |
589 | --- a/mm/hugetlb.c |
590 | +++ b/mm/hugetlb.c |
591 | @@ -2400,6 +2400,7 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, |
592 | } else { |
593 | if (cow) |
594 | huge_ptep_set_wrprotect(src, addr, src_pte); |
595 | + entry = huge_ptep_get(src_pte); |
596 | ptepage = pte_page(entry); |
597 | get_page(ptepage); |
598 | page_dup_rmap(ptepage); |
599 | diff --git a/mm/slab_common.c b/mm/slab_common.c |
600 | index 2d414508e9ec..7d21d3fddbf0 100644 |
601 | --- a/mm/slab_common.c |
602 | +++ b/mm/slab_common.c |
603 | @@ -55,6 +55,7 @@ static int kmem_cache_sanity_check(struct mem_cgroup *memcg, const char *name, |
604 | continue; |
605 | } |
606 | |
607 | +#if !defined(CONFIG_SLUB) |
608 | /* |
609 | * For simplicity, we won't check this in the list of memcg |
610 | * caches. We have control over memcg naming, and if there |
611 | @@ -68,6 +69,7 @@ static int kmem_cache_sanity_check(struct mem_cgroup *memcg, const char *name, |
612 | s = NULL; |
613 | return -EINVAL; |
614 | } |
615 | +#endif |
616 | } |
617 | |
618 | WARN_ON(strchr(name, ' ')); /* It confuses parsers */ |
619 | diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c |
620 | index 5352b2d2d5bf..2b8199f68785 100644 |
621 | --- a/net/netfilter/nfnetlink_queue_core.c |
622 | +++ b/net/netfilter/nfnetlink_queue_core.c |
623 | @@ -227,22 +227,23 @@ nfqnl_flush(struct nfqnl_instance *queue, nfqnl_cmpfn cmpfn, unsigned long data) |
624 | spin_unlock_bh(&queue->lock); |
625 | } |
626 | |
627 | -static void |
628 | +static int |
629 | nfqnl_zcopy(struct sk_buff *to, const struct sk_buff *from, int len, int hlen) |
630 | { |
631 | int i, j = 0; |
632 | int plen = 0; /* length of skb->head fragment */ |
633 | + int ret; |
634 | struct page *page; |
635 | unsigned int offset; |
636 | |
637 | /* dont bother with small payloads */ |
638 | - if (len <= skb_tailroom(to)) { |
639 | - skb_copy_bits(from, 0, skb_put(to, len), len); |
640 | - return; |
641 | - } |
642 | + if (len <= skb_tailroom(to)) |
643 | + return skb_copy_bits(from, 0, skb_put(to, len), len); |
644 | |
645 | if (hlen) { |
646 | - skb_copy_bits(from, 0, skb_put(to, hlen), hlen); |
647 | + ret = skb_copy_bits(from, 0, skb_put(to, hlen), hlen); |
648 | + if (unlikely(ret)) |
649 | + return ret; |
650 | len -= hlen; |
651 | } else { |
652 | plen = min_t(int, skb_headlen(from), len); |
653 | @@ -260,6 +261,11 @@ nfqnl_zcopy(struct sk_buff *to, const struct sk_buff *from, int len, int hlen) |
654 | to->len += len + plen; |
655 | to->data_len += len + plen; |
656 | |
657 | + if (unlikely(skb_orphan_frags(from, GFP_ATOMIC))) { |
658 | + skb_tx_error(from); |
659 | + return -ENOMEM; |
660 | + } |
661 | + |
662 | for (i = 0; i < skb_shinfo(from)->nr_frags; i++) { |
663 | if (!len) |
664 | break; |
665 | @@ -270,6 +276,8 @@ nfqnl_zcopy(struct sk_buff *to, const struct sk_buff *from, int len, int hlen) |
666 | j++; |
667 | } |
668 | skb_shinfo(to)->nr_frags = j; |
669 | + |
670 | + return 0; |
671 | } |
672 | |
673 | static int nfqnl_put_packet_info(struct sk_buff *nlskb, struct sk_buff *packet) |
674 | @@ -355,13 +363,16 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue, |
675 | |
676 | skb = nfnetlink_alloc_skb(&init_net, size, queue->peer_portid, |
677 | GFP_ATOMIC); |
678 | - if (!skb) |
679 | + if (!skb) { |
680 | + skb_tx_error(entskb); |
681 | return NULL; |
682 | + } |
683 | |
684 | nlh = nlmsg_put(skb, 0, 0, |
685 | NFNL_SUBSYS_QUEUE << 8 | NFQNL_MSG_PACKET, |
686 | sizeof(struct nfgenmsg), 0); |
687 | if (!nlh) { |
688 | + skb_tx_error(entskb); |
689 | kfree_skb(skb); |
690 | return NULL; |
691 | } |
692 | @@ -481,13 +492,15 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue, |
693 | nla->nla_type = NFQA_PAYLOAD; |
694 | nla->nla_len = nla_attr_size(data_len); |
695 | |
696 | - nfqnl_zcopy(skb, entskb, data_len, hlen); |
697 | + if (nfqnl_zcopy(skb, entskb, data_len, hlen)) |
698 | + goto nla_put_failure; |
699 | } |
700 | |
701 | nlh->nlmsg_len = skb->len; |
702 | return skb; |
703 | |
704 | nla_put_failure: |
705 | + skb_tx_error(entskb); |
706 | kfree_skb(skb); |
707 | net_err_ratelimited("nf_queue: error creating packet message\n"); |
708 | return NULL; |