diff options
50 files changed, 250 insertions, 207 deletions
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index cd9cec9e39e9..6bfbbed0897e 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -6,7 +6,7 @@ extra-y := head.o init_task.o vmlinux.lds | |||
6 | 6 | ||
7 | obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \ | 7 | obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \ |
8 | ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \ | 8 | ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \ |
9 | time.o traps.o unaligned.o | 9 | time.o topology.o traps.o unaligned.o |
10 | 10 | ||
11 | binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ | 11 | binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ |
12 | irix5sys.o sysirix.o | 12 | irix5sys.o sysirix.o |
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index db80957ada89..49db516789e0 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
@@ -463,28 +463,5 @@ void flush_tlb_one(unsigned long vaddr) | |||
463 | smp_on_each_tlb(flush_tlb_one_ipi, (void *) vaddr); | 463 | smp_on_each_tlb(flush_tlb_one_ipi, (void *) vaddr); |
464 | } | 464 | } |
465 | 465 | ||
466 | static DEFINE_PER_CPU(struct cpu, cpu_devices); | ||
467 | |||
468 | static int __init topology_init(void) | ||
469 | { | ||
470 | int i, ret; | ||
471 | |||
472 | #ifdef CONFIG_NUMA | ||
473 | for_each_online_node(i) | ||
474 | register_one_node(i); | ||
475 | #endif /* CONFIG_NUMA */ | ||
476 | |||
477 | for_each_present_cpu(i) { | ||
478 | ret = register_cpu(&per_cpu(cpu_devices, i), i); | ||
479 | if (ret) | ||
480 | printk(KERN_WARNING "topology_init: register_cpu %d " | ||
481 | "failed (%d)\n", i, ret); | ||
482 | } | ||
483 | |||
484 | return 0; | ||
485 | } | ||
486 | |||
487 | subsys_initcall(topology_init); | ||
488 | |||
489 | EXPORT_SYMBOL(flush_tlb_page); | 466 | EXPORT_SYMBOL(flush_tlb_page); |
490 | EXPORT_SYMBOL(flush_tlb_one); | 467 | EXPORT_SYMBOL(flush_tlb_one); |
diff --git a/arch/mips/kernel/topology.c b/arch/mips/kernel/topology.c new file mode 100644 index 000000000000..660e44ed44d7 --- /dev/null +++ b/arch/mips/kernel/topology.c | |||
@@ -0,0 +1,29 @@ | |||
1 | #include <linux/cpu.h> | ||
2 | #include <linux/cpumask.h> | ||
3 | #include <linux/init.h> | ||
4 | #include <linux/node.h> | ||
5 | #include <linux/nodemask.h> | ||
6 | #include <linux/percpu.h> | ||
7 | |||
8 | static DEFINE_PER_CPU(struct cpu, cpu_devices); | ||
9 | |||
10 | static int __init topology_init(void) | ||
11 | { | ||
12 | int i, ret; | ||
13 | |||
14 | #ifdef CONFIG_NUMA | ||
15 | for_each_online_node(i) | ||
16 | register_one_node(i); | ||
17 | #endif /* CONFIG_NUMA */ | ||
18 | |||
19 | for_each_present_cpu(i) { | ||
20 | ret = register_cpu(&per_cpu(cpu_devices, i), i); | ||
21 | if (ret) | ||
22 | printk(KERN_WARNING "topology_init: register_cpu %d " | ||
23 | "failed (%d)\n", i, ret); | ||
24 | } | ||
25 | |||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | subsys_initcall(topology_init); | ||
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index ab460f805bef..282f3e52eea3 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c | |||
@@ -159,7 +159,7 @@ void __init plat_mem_setup(void) | |||
159 | BONITO_PCIMEMBASECFG |= | 159 | BONITO_PCIMEMBASECFG |= |
160 | (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED | | 160 | (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED | |
161 | BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); | 161 | BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); |
162 | printk("Disabled Bonito IOBC coherency\n"); | 162 | printk("Enabled Bonito IOBC coherency\n"); |
163 | } | 163 | } |
164 | } | 164 | } |
165 | else | 165 | else |
diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c index e22ecd54870d..47b6d90349da 100644 --- a/arch/x86_64/kernel/early_printk.c +++ b/arch/x86_64/kernel/early_printk.c | |||
@@ -224,7 +224,7 @@ static int __init setup_early_printk(char *buf) | |||
224 | return 0; | 224 | return 0; |
225 | early_console_initialized = 1; | 225 | early_console_initialized = 1; |
226 | 226 | ||
227 | if (!strcmp(buf,"keep")) | 227 | if (strstr(buf, "keep")) |
228 | keep_early = 1; | 228 | keep_early = 1; |
229 | 229 | ||
230 | if (!strncmp(buf, "serial", 6)) { | 230 | if (!strncmp(buf, "serial", 6)) { |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 14654e682411..c80081a6ba41 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -754,10 +754,8 @@ void __setup_vector_irq(int cpu) | |||
754 | { | 754 | { |
755 | /* Initialize vector_irq on a new cpu */ | 755 | /* Initialize vector_irq on a new cpu */ |
756 | /* This function must be called with vector_lock held */ | 756 | /* This function must be called with vector_lock held */ |
757 | unsigned long flags; | ||
758 | int irq, vector; | 757 | int irq, vector; |
759 | 758 | ||
760 | |||
761 | /* Mark the inuse vectors */ | 759 | /* Mark the inuse vectors */ |
762 | for (irq = 0; irq < NR_IRQ_VECTORS; ++irq) { | 760 | for (irq = 0; irq < NR_IRQ_VECTORS; ++irq) { |
763 | if (!cpu_isset(cpu, irq_domain[irq])) | 761 | if (!cpu_isset(cpu, irq_domain[irq])) |
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index a153d0a01b72..0d65b22f229c 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -242,12 +242,19 @@ static int dump_trace_unwind(struct unwind_frame_info *info, void *context) | |||
242 | * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack | 242 | * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack |
243 | */ | 243 | */ |
244 | 244 | ||
245 | static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) | ||
246 | { | ||
247 | void *t = (void *)tinfo; | ||
248 | return p > t && p < t + THREAD_SIZE - 3; | ||
249 | } | ||
250 | |||
245 | void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack, | 251 | void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack, |
246 | struct stacktrace_ops *ops, void *data) | 252 | struct stacktrace_ops *ops, void *data) |
247 | { | 253 | { |
248 | const unsigned cpu = smp_processor_id(); | 254 | const unsigned cpu = smp_processor_id(); |
249 | unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; | 255 | unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; |
250 | unsigned used = 0; | 256 | unsigned used = 0; |
257 | struct thread_info *tinfo; | ||
251 | 258 | ||
252 | if (!tsk) | 259 | if (!tsk) |
253 | tsk = current; | 260 | tsk = current; |
@@ -370,7 +377,8 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * s | |||
370 | /* | 377 | /* |
371 | * This handles the process stack: | 378 | * This handles the process stack: |
372 | */ | 379 | */ |
373 | HANDLE_STACK (((long) stack & (THREAD_SIZE-1)) != 0); | 380 | tinfo = current_thread_info(); |
381 | HANDLE_STACK (valid_stack_ptr(tinfo, stack)); | ||
374 | #undef HANDLE_STACK | 382 | #undef HANDLE_STACK |
375 | } | 383 | } |
376 | EXPORT_SYMBOL(dump_trace); | 384 | EXPORT_SYMBOL(dump_trace); |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 234197e57e9e..f510e1196dc6 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -314,6 +314,17 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
314 | { PCI_VDEVICE(INTEL, 0x2824), board_ahci }, /* ICH8 */ | 314 | { PCI_VDEVICE(INTEL, 0x2824), board_ahci }, /* ICH8 */ |
315 | { PCI_VDEVICE(INTEL, 0x2829), board_ahci }, /* ICH8M */ | 315 | { PCI_VDEVICE(INTEL, 0x2829), board_ahci }, /* ICH8M */ |
316 | { PCI_VDEVICE(INTEL, 0x282a), board_ahci }, /* ICH8M */ | 316 | { PCI_VDEVICE(INTEL, 0x282a), board_ahci }, /* ICH8M */ |
317 | { PCI_VDEVICE(INTEL, 0x2922), board_ahci }, /* ICH9 */ | ||
318 | { PCI_VDEVICE(INTEL, 0x2923), board_ahci }, /* ICH9 */ | ||
319 | { PCI_VDEVICE(INTEL, 0x2924), board_ahci }, /* ICH9 */ | ||
320 | { PCI_VDEVICE(INTEL, 0x2925), board_ahci }, /* ICH9 */ | ||
321 | { PCI_VDEVICE(INTEL, 0x2927), board_ahci }, /* ICH9 */ | ||
322 | { PCI_VDEVICE(INTEL, 0x2929), board_ahci }, /* ICH9M */ | ||
323 | { PCI_VDEVICE(INTEL, 0x292a), board_ahci }, /* ICH9M */ | ||
324 | { PCI_VDEVICE(INTEL, 0x292b), board_ahci }, /* ICH9M */ | ||
325 | { PCI_VDEVICE(INTEL, 0x292f), board_ahci }, /* ICH9M */ | ||
326 | { PCI_VDEVICE(INTEL, 0x294d), board_ahci }, /* ICH9 */ | ||
327 | { PCI_VDEVICE(INTEL, 0x294e), board_ahci }, /* ICH9M */ | ||
317 | 328 | ||
318 | /* JMicron */ | 329 | /* JMicron */ |
319 | { PCI_VDEVICE(JMICRON, 0x2360), board_ahci }, /* JMicron JMB360 */ | 330 | { PCI_VDEVICE(JMICRON, 0x2360), board_ahci }, /* JMicron JMB360 */ |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 5c1fc467fc7f..47ea111d5ace 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1451,6 +1451,7 @@ nothing_to_do: | |||
1451 | 1451 | ||
1452 | static void ata_scsi_qc_complete(struct ata_queued_cmd *qc) | 1452 | static void ata_scsi_qc_complete(struct ata_queued_cmd *qc) |
1453 | { | 1453 | { |
1454 | struct ata_port *ap = qc->ap; | ||
1454 | struct scsi_cmnd *cmd = qc->scsicmd; | 1455 | struct scsi_cmnd *cmd = qc->scsicmd; |
1455 | u8 *cdb = cmd->cmnd; | 1456 | u8 *cdb = cmd->cmnd; |
1456 | int need_sense = (qc->err_mask != 0); | 1457 | int need_sense = (qc->err_mask != 0); |
@@ -1459,11 +1460,12 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc) | |||
1459 | * schedule EH_REVALIDATE operation to update the IDENTIFY DEVICE | 1460 | * schedule EH_REVALIDATE operation to update the IDENTIFY DEVICE |
1460 | * cache | 1461 | * cache |
1461 | */ | 1462 | */ |
1462 | if (!need_sense && (qc->tf.command == ATA_CMD_SET_FEATURES) && | 1463 | if (ap->ops->error_handler && |
1464 | !need_sense && (qc->tf.command == ATA_CMD_SET_FEATURES) && | ||
1463 | ((qc->tf.feature == SETFEATURES_WC_ON) || | 1465 | ((qc->tf.feature == SETFEATURES_WC_ON) || |
1464 | (qc->tf.feature == SETFEATURES_WC_OFF))) { | 1466 | (qc->tf.feature == SETFEATURES_WC_OFF))) { |
1465 | qc->ap->eh_info.action |= ATA_EH_REVALIDATE; | 1467 | ap->eh_info.action |= ATA_EH_REVALIDATE; |
1466 | ata_port_schedule_eh(qc->ap); | 1468 | ata_port_schedule_eh(ap); |
1467 | } | 1469 | } |
1468 | 1470 | ||
1469 | /* For ATA pass thru (SAT) commands, generate a sense block if | 1471 | /* For ATA pass thru (SAT) commands, generate a sense block if |
@@ -1490,8 +1492,8 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc) | |||
1490 | } | 1492 | } |
1491 | } | 1493 | } |
1492 | 1494 | ||
1493 | if (need_sense && !qc->ap->ops->error_handler) | 1495 | if (need_sense && !ap->ops->error_handler) |
1494 | ata_dump_status(qc->ap->id, &qc->result_tf); | 1496 | ata_dump_status(ap->id, &qc->result_tf); |
1495 | 1497 | ||
1496 | qc->scsidone(cmd); | 1498 | qc->scsidone(cmd); |
1497 | 1499 | ||
@@ -3345,20 +3347,23 @@ EXPORT_SYMBOL_GPL(ata_sas_slave_configure); | |||
3345 | * @ap: ATA port to which the command is being sent | 3347 | * @ap: ATA port to which the command is being sent |
3346 | * | 3348 | * |
3347 | * RETURNS: | 3349 | * RETURNS: |
3348 | * Zero. | 3350 | * Return value from __ata_scsi_queuecmd() if @cmd can be queued, |
3351 | * 0 otherwise. | ||
3349 | */ | 3352 | */ |
3350 | 3353 | ||
3351 | int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), | 3354 | int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), |
3352 | struct ata_port *ap) | 3355 | struct ata_port *ap) |
3353 | { | 3356 | { |
3357 | int rc = 0; | ||
3358 | |||
3354 | ata_scsi_dump_cdb(ap, cmd); | 3359 | ata_scsi_dump_cdb(ap, cmd); |
3355 | 3360 | ||
3356 | if (likely(ata_scsi_dev_enabled(ap->device))) | 3361 | if (likely(ata_scsi_dev_enabled(ap->device))) |
3357 | __ata_scsi_queuecmd(cmd, done, ap->device); | 3362 | rc = __ata_scsi_queuecmd(cmd, done, ap->device); |
3358 | else { | 3363 | else { |
3359 | cmd->result = (DID_BAD_TARGET << 16); | 3364 | cmd->result = (DID_BAD_TARGET << 16); |
3360 | done(cmd); | 3365 | done(cmd); |
3361 | } | 3366 | } |
3362 | return 0; | 3367 | return rc; |
3363 | } | 3368 | } |
3364 | EXPORT_SYMBOL_GPL(ata_sas_queuecmd); | 3369 | EXPORT_SYMBOL_GPL(ata_sas_queuecmd); |
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 53304e6991ac..a2ab2eebfc68 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -348,7 +348,7 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra | |||
348 | 348 | ||
349 | static void dvb_frontend_swzigzag(struct dvb_frontend *fe) | 349 | static void dvb_frontend_swzigzag(struct dvb_frontend *fe) |
350 | { | 350 | { |
351 | fe_status_t s; | 351 | fe_status_t s = 0; |
352 | struct dvb_frontend_private *fepriv = fe->frontend_priv; | 352 | struct dvb_frontend_private *fepriv = fe->frontend_priv; |
353 | 353 | ||
354 | /* if we've got no parameters, just keep idling */ | 354 | /* if we've got no parameters, just keep idling */ |
diff --git a/drivers/media/dvb/frontends/tda10086.c b/drivers/media/dvb/frontends/tda10086.c index 7456b0b9976b..4c27a2d90a38 100644 --- a/drivers/media/dvb/frontends/tda10086.c +++ b/drivers/media/dvb/frontends/tda10086.c | |||
@@ -441,6 +441,10 @@ static int tda10086_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_pa | |||
441 | 441 | ||
442 | dprintk ("%s\n", __FUNCTION__); | 442 | dprintk ("%s\n", __FUNCTION__); |
443 | 443 | ||
444 | // check for invalid symbol rate | ||
445 | if (fe_params->u.qpsk.symbol_rate < 500000) | ||
446 | return -EINVAL; | ||
447 | |||
444 | // calculate the updated frequency (note: we convert from Hz->kHz) | 448 | // calculate the updated frequency (note: we convert from Hz->kHz) |
445 | tmp64 = tda10086_read_byte(state, 0x52); | 449 | tmp64 = tda10086_read_byte(state, 0x52); |
446 | tmp64 |= (tda10086_read_byte(state, 0x51) << 8); | 450 | tmp64 |= (tda10086_read_byte(state, 0x51) << 8); |
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index e58f0391e9d1..56f1c80defc6 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c | |||
@@ -46,6 +46,10 @@ | |||
46 | #include "lnbp21.h" | 46 | #include "lnbp21.h" |
47 | #include "bsru6.h" | 47 | #include "bsru6.h" |
48 | 48 | ||
49 | static int diseqc_method; | ||
50 | module_param(diseqc_method, int, 0444); | ||
51 | MODULE_PARM_DESC(diseqc_method, "Select DiSEqC method for subsystem id 13c2:1003, 0: default, 1: more reliable (for newer revisions only)"); | ||
52 | |||
49 | static void Set22K (struct budget *budget, int state) | 53 | static void Set22K (struct budget *budget, int state) |
50 | { | 54 | { |
51 | struct saa7146_dev *dev=budget->dev; | 55 | struct saa7146_dev *dev=budget->dev; |
@@ -382,6 +386,11 @@ static void frontend_init(struct budget *budget) | |||
382 | if (budget->dvb_frontend) { | 386 | if (budget->dvb_frontend) { |
383 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; | 387 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; |
384 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; | 388 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; |
389 | if (budget->dev->pci->subsystem_device == 0x1003 && diseqc_method == 0) { | ||
390 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; | ||
391 | budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst; | ||
392 | budget->dvb_frontend->ops.set_tone = budget_set_tone; | ||
393 | } | ||
385 | break; | 394 | break; |
386 | } | 395 | } |
387 | break; | 396 | break; |
diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c index f786ab11d2cd..86e353b26b53 100644 --- a/drivers/media/video/et61x251/et61x251_core.c +++ b/drivers/media/video/et61x251/et61x251_core.c | |||
@@ -1182,8 +1182,6 @@ static void et61x251_release_resources(struct et61x251_device* cam) | |||
1182 | video_set_drvdata(cam->v4ldev, NULL); | 1182 | video_set_drvdata(cam->v4ldev, NULL); |
1183 | video_unregister_device(cam->v4ldev); | 1183 | video_unregister_device(cam->v4ldev); |
1184 | 1184 | ||
1185 | usb_put_dev(cam->usbdev); | ||
1186 | |||
1187 | mutex_unlock(&et61x251_sysfs_lock); | 1185 | mutex_unlock(&et61x251_sysfs_lock); |
1188 | 1186 | ||
1189 | kfree(cam->control_buffer); | 1187 | kfree(cam->control_buffer); |
@@ -1275,6 +1273,7 @@ static int et61x251_release(struct inode* inode, struct file* filp) | |||
1275 | 1273 | ||
1276 | if (cam->state & DEV_DISCONNECTED) { | 1274 | if (cam->state & DEV_DISCONNECTED) { |
1277 | et61x251_release_resources(cam); | 1275 | et61x251_release_resources(cam); |
1276 | usb_put_dev(cam->usbdev); | ||
1278 | mutex_unlock(&cam->dev_mutex); | 1277 | mutex_unlock(&cam->dev_mutex); |
1279 | kfree(cam); | 1278 | kfree(cam); |
1280 | return 0; | 1279 | return 0; |
diff --git a/drivers/media/video/saa6588.c b/drivers/media/video/saa6588.c index a81285ca7d5b..7b9859c33018 100644 --- a/drivers/media/video/saa6588.c +++ b/drivers/media/video/saa6588.c | |||
@@ -212,8 +212,10 @@ static void read_from_buf(struct saa6588 *s, struct rds_command *a) | |||
212 | if (rd_blocks > s->block_count) | 212 | if (rd_blocks > s->block_count) |
213 | rd_blocks = s->block_count; | 213 | rd_blocks = s->block_count; |
214 | 214 | ||
215 | if (!rd_blocks) | 215 | if (!rd_blocks) { |
216 | spin_unlock_irqrestore(&s->lock, flags); | ||
216 | return; | 217 | return; |
218 | } | ||
217 | 219 | ||
218 | for (i = 0; i < rd_blocks; i++) { | 220 | for (i = 0; i < rd_blocks; i++) { |
219 | if (block_to_user_buf(s, buf_ptr)) { | 221 | if (block_to_user_buf(s, buf_ptr)) { |
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index c5719f7bd1ac..f28398dd9d93 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -1464,8 +1464,6 @@ static int saa711x_attach(struct i2c_adapter *adapter, int address, int kind) | |||
1464 | client->driver = &i2c_driver_saa711x; | 1464 | client->driver = &i2c_driver_saa711x; |
1465 | snprintf(client->name, sizeof(client->name) - 1, "saa7115"); | 1465 | snprintf(client->name, sizeof(client->name) - 1, "saa7115"); |
1466 | 1466 | ||
1467 | v4l_dbg(1, debug, client, "detecting saa7115 client on address 0x%x\n", address << 1); | ||
1468 | |||
1469 | for (i=0;i<0x0f;i++) { | 1467 | for (i=0;i<0x0f;i++) { |
1470 | saa711x_write(client, 0, i); | 1468 | saa711x_write(client, 0, i); |
1471 | name[i] = (saa711x_read(client, 0) &0x0f) +'0'; | 1469 | name[i] = (saa711x_read(client, 0) &0x0f) +'0'; |
@@ -1477,6 +1475,13 @@ static int saa711x_attach(struct i2c_adapter *adapter, int address, int kind) | |||
1477 | saa711x_write(client, 0, 5); | 1475 | saa711x_write(client, 0, 5); |
1478 | chip_id = saa711x_read(client, 0) & 0x0f; | 1476 | chip_id = saa711x_read(client, 0) & 0x0f; |
1479 | 1477 | ||
1478 | /* Check whether this chip is part of the saa711x series */ | ||
1479 | if (memcmp(name, "1f711", 5)) { | ||
1480 | v4l_dbg(1, debug, client, "chip found @ 0x%x (ID %s) does not match a known saa711x chip.\n", | ||
1481 | address << 1, name); | ||
1482 | return 0; | ||
1483 | } | ||
1484 | |||
1480 | snprintf(client->name, sizeof(client->name) - 1, "saa711%d",chip_id); | 1485 | snprintf(client->name, sizeof(client->name) - 1, "saa711%d",chip_id); |
1481 | v4l_info(client, "saa711%d found (%s) @ 0x%x (%s)\n", chip_id, name, address << 1, adapter->name); | 1486 | v4l_info(client, "saa711%d found (%s) @ 0x%x (%s)\n", chip_id, name, address << 1, adapter->name); |
1482 | 1487 | ||
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c index a4702d3c2aca..42fb60d985b9 100644 --- a/drivers/media/video/sn9c102/sn9c102_core.c +++ b/drivers/media/video/sn9c102/sn9c102_core.c | |||
@@ -1462,8 +1462,6 @@ static void sn9c102_release_resources(struct sn9c102_device* cam) | |||
1462 | video_set_drvdata(cam->v4ldev, NULL); | 1462 | video_set_drvdata(cam->v4ldev, NULL); |
1463 | video_unregister_device(cam->v4ldev); | 1463 | video_unregister_device(cam->v4ldev); |
1464 | 1464 | ||
1465 | usb_put_dev(cam->usbdev); | ||
1466 | |||
1467 | mutex_unlock(&sn9c102_sysfs_lock); | 1465 | mutex_unlock(&sn9c102_sysfs_lock); |
1468 | 1466 | ||
1469 | kfree(cam->control_buffer); | 1467 | kfree(cam->control_buffer); |
@@ -1555,6 +1553,7 @@ static int sn9c102_release(struct inode* inode, struct file* filp) | |||
1555 | 1553 | ||
1556 | if (cam->state & DEV_DISCONNECTED) { | 1554 | if (cam->state & DEV_DISCONNECTED) { |
1557 | sn9c102_release_resources(cam); | 1555 | sn9c102_release_resources(cam); |
1556 | usb_put_dev(cam->usbdev); | ||
1558 | mutex_unlock(&cam->dev_mutex); | 1557 | mutex_unlock(&cam->dev_mutex); |
1559 | kfree(cam); | 1558 | kfree(cam); |
1560 | return 0; | 1559 | return 0; |
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 7ea49a0d5ec3..296159ec5189 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c | |||
@@ -1087,7 +1087,7 @@ static int inval_cache_and_wait_for_operation( | |||
1087 | } | 1087 | } |
1088 | spin_lock(chip->mutex); | 1088 | spin_lock(chip->mutex); |
1089 | 1089 | ||
1090 | if (chip->state != chip_state) { | 1090 | while (chip->state != chip_state) { |
1091 | /* Someone's suspended the operation: sleep */ | 1091 | /* Someone's suspended the operation: sleep */ |
1092 | DECLARE_WAITQUEUE(wait, current); | 1092 | DECLARE_WAITQUEUE(wait, current); |
1093 | set_current_state(TASK_UNINTERRUPTIBLE); | 1093 | set_current_state(TASK_UNINTERRUPTIBLE); |
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 86b3bb9bec2d..92420f007b97 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c | |||
@@ -914,7 +914,7 @@ static void decode_prio_command(struct sixpack *sp, unsigned char cmd) | |||
914 | printk(KERN_DEBUG "6pack: protocol violation\n"); | 914 | printk(KERN_DEBUG "6pack: protocol violation\n"); |
915 | else | 915 | else |
916 | sp->status = 0; | 916 | sp->status = 0; |
917 | cmd &= !SIXP_RX_DCD_MASK; | 917 | cmd &= ~SIXP_RX_DCD_MASK; |
918 | } | 918 | } |
919 | sp->status = cmd & SIXP_PRIO_DATA_MASK; | 919 | sp->status = cmd & SIXP_PRIO_DATA_MASK; |
920 | } else { /* output watchdog char if idle */ | 920 | } else { /* output watchdog char if idle */ |
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 136175a69332..f63a7755fe86 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
@@ -820,7 +820,8 @@ int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat) | |||
820 | crypt_stat->tfm = crypto_alloc_blkcipher(full_alg_name, 0, | 820 | crypt_stat->tfm = crypto_alloc_blkcipher(full_alg_name, 0, |
821 | CRYPTO_ALG_ASYNC); | 821 | CRYPTO_ALG_ASYNC); |
822 | kfree(full_alg_name); | 822 | kfree(full_alg_name); |
823 | if (!crypt_stat->tfm) { | 823 | if (IS_ERR(crypt_stat->tfm)) { |
824 | rc = PTR_ERR(crypt_stat->tfm); | ||
824 | ecryptfs_printk(KERN_ERR, "cryptfs: init_crypt_ctx(): " | 825 | ecryptfs_printk(KERN_ERR, "cryptfs: init_crypt_ctx(): " |
825 | "Error initializing cipher [%s]\n", | 826 | "Error initializing cipher [%s]\n", |
826 | crypt_stat->cipher); | 827 | crypt_stat->cipher); |
diff --git a/include/asm-i386/mach-summit/mach_apic.h b/include/asm-i386/mach-summit/mach_apic.h index ef0671e5d5c5..43e5bd8f4a19 100644 --- a/include/asm-i386/mach-summit/mach_apic.h +++ b/include/asm-i386/mach-summit/mach_apic.h | |||
@@ -88,7 +88,11 @@ static inline void clustered_apic_check(void) | |||
88 | 88 | ||
89 | static inline int apicid_to_node(int logical_apicid) | 89 | static inline int apicid_to_node(int logical_apicid) |
90 | { | 90 | { |
91 | #ifdef CONFIG_SMP | ||
91 | return apicid_2_node[hard_smp_processor_id()]; | 92 | return apicid_2_node[hard_smp_processor_id()]; |
93 | #else | ||
94 | return 0; | ||
95 | #endif | ||
92 | } | 96 | } |
93 | 97 | ||
94 | /* Mapping from cpu number to logical apicid */ | 98 | /* Mapping from cpu number to logical apicid */ |
diff --git a/include/asm-parisc/semaphore.h b/include/asm-parisc/semaphore.h index c9ee41cd0707..d45827a21f94 100644 --- a/include/asm-parisc/semaphore.h +++ b/include/asm-parisc/semaphore.h | |||
@@ -115,7 +115,8 @@ extern __inline__ int down_interruptible(struct semaphore * sem) | |||
115 | */ | 115 | */ |
116 | extern __inline__ int down_trylock(struct semaphore * sem) | 116 | extern __inline__ int down_trylock(struct semaphore * sem) |
117 | { | 117 | { |
118 | int flags, count; | 118 | unsigned long flags; |
119 | int count; | ||
119 | 120 | ||
120 | spin_lock_irqsave(&sem->sentry, flags); | 121 | spin_lock_irqsave(&sem->sentry, flags); |
121 | count = sem->count - 1; | 122 | count = sem->count - 1; |
@@ -131,7 +132,8 @@ extern __inline__ int down_trylock(struct semaphore * sem) | |||
131 | */ | 132 | */ |
132 | extern __inline__ void up(struct semaphore * sem) | 133 | extern __inline__ void up(struct semaphore * sem) |
133 | { | 134 | { |
134 | int flags; | 135 | unsigned long flags; |
136 | |||
135 | spin_lock_irqsave(&sem->sentry, flags); | 137 | spin_lock_irqsave(&sem->sentry, flags); |
136 | if (sem->count < 0) { | 138 | if (sem->count < 0) { |
137 | __up(sem); | 139 | __up(sem); |
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h index 4fe740bf4eae..412e025bc5c7 100644 --- a/include/linux/irqflags.h +++ b/include/linux/irqflags.h | |||
@@ -11,12 +11,6 @@ | |||
11 | #ifndef _LINUX_TRACE_IRQFLAGS_H | 11 | #ifndef _LINUX_TRACE_IRQFLAGS_H |
12 | #define _LINUX_TRACE_IRQFLAGS_H | 12 | #define _LINUX_TRACE_IRQFLAGS_H |
13 | 13 | ||
14 | #define BUILD_CHECK_IRQ_FLAGS(flags) \ | ||
15 | do { \ | ||
16 | BUILD_BUG_ON(sizeof(flags) != sizeof(unsigned long)); \ | ||
17 | typecheck(unsigned long, flags); \ | ||
18 | } while (0) | ||
19 | |||
20 | #ifdef CONFIG_TRACE_IRQFLAGS | 14 | #ifdef CONFIG_TRACE_IRQFLAGS |
21 | extern void trace_hardirqs_on(void); | 15 | extern void trace_hardirqs_on(void); |
22 | extern void trace_hardirqs_off(void); | 16 | extern void trace_hardirqs_off(void); |
@@ -56,15 +50,10 @@ | |||
56 | #define local_irq_disable() \ | 50 | #define local_irq_disable() \ |
57 | do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0) | 51 | do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0) |
58 | #define local_irq_save(flags) \ | 52 | #define local_irq_save(flags) \ |
59 | do { \ | 53 | do { raw_local_irq_save(flags); trace_hardirqs_off(); } while (0) |
60 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
61 | raw_local_irq_save(flags); \ | ||
62 | trace_hardirqs_off(); \ | ||
63 | } while (0) | ||
64 | 54 | ||
65 | #define local_irq_restore(flags) \ | 55 | #define local_irq_restore(flags) \ |
66 | do { \ | 56 | do { \ |
67 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
68 | if (raw_irqs_disabled_flags(flags)) { \ | 57 | if (raw_irqs_disabled_flags(flags)) { \ |
69 | raw_local_irq_restore(flags); \ | 58 | raw_local_irq_restore(flags); \ |
70 | trace_hardirqs_off(); \ | 59 | trace_hardirqs_off(); \ |
@@ -80,16 +69,8 @@ | |||
80 | */ | 69 | */ |
81 | # define raw_local_irq_disable() local_irq_disable() | 70 | # define raw_local_irq_disable() local_irq_disable() |
82 | # define raw_local_irq_enable() local_irq_enable() | 71 | # define raw_local_irq_enable() local_irq_enable() |
83 | # define raw_local_irq_save(flags) \ | 72 | # define raw_local_irq_save(flags) local_irq_save(flags) |
84 | do { \ | 73 | # define raw_local_irq_restore(flags) local_irq_restore(flags) |
85 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
86 | local_irq_save(flags); \ | ||
87 | } while (0) | ||
88 | # define raw_local_irq_restore(flags) \ | ||
89 | do { \ | ||
90 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
91 | local_irq_restore(flags); \ | ||
92 | } while (0) | ||
93 | #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */ | 74 | #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */ |
94 | 75 | ||
95 | #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT | 76 | #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT |
@@ -99,11 +80,7 @@ | |||
99 | raw_safe_halt(); \ | 80 | raw_safe_halt(); \ |
100 | } while (0) | 81 | } while (0) |
101 | 82 | ||
102 | #define local_save_flags(flags) \ | 83 | #define local_save_flags(flags) raw_local_save_flags(flags) |
103 | do { \ | ||
104 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
105 | raw_local_save_flags(flags); \ | ||
106 | } while (0) | ||
107 | 84 | ||
108 | #define irqs_disabled() \ | 85 | #define irqs_disabled() \ |
109 | ({ \ | 86 | ({ \ |
@@ -113,11 +90,7 @@ | |||
113 | raw_irqs_disabled_flags(flags); \ | 90 | raw_irqs_disabled_flags(flags); \ |
114 | }) | 91 | }) |
115 | 92 | ||
116 | #define irqs_disabled_flags(flags) \ | 93 | #define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags) |
117 | ({ \ | ||
118 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
119 | raw_irqs_disabled_flags(flags); \ | ||
120 | }) | ||
121 | #endif /* CONFIG_X86 */ | 94 | #endif /* CONFIG_X86 */ |
122 | 95 | ||
123 | #endif | 96 | #endif |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 24b611147adb..b9b5e4ba166a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -30,8 +30,10 @@ extern const char linux_banner[]; | |||
30 | 30 | ||
31 | #define STACK_MAGIC 0xdeadbeef | 31 | #define STACK_MAGIC 0xdeadbeef |
32 | 32 | ||
33 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) | ||
34 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) | ||
35 | |||
33 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 36 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
34 | #define ALIGN(x,a) (((x)+(a)-1UL)&~((a)-1UL)) | ||
35 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 37 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
36 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 38 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
37 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) | 39 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9264139bd8df..83b8c4f1d69d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -93,8 +93,10 @@ struct netpoll_info; | |||
93 | #endif | 93 | #endif |
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | #if !defined(CONFIG_NET_IPIP) && \ | 96 | #if !defined(CONFIG_NET_IPIP) && !defined(CONFIG_NET_IPIP_MODULE) && \ |
97 | !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE) | 97 | !defined(CONFIG_NET_IPGRE) && !defined(CONFIG_NET_IPGRE_MODULE) && \ |
98 | !defined(CONFIG_IPV6_SIT) && !defined(CONFIG_IPV6_SIT_MODULE) && \ | ||
99 | !defined(CONFIG_IPV6_TUNNEL) && !defined(CONFIG_IPV6_TUNNEL_MODULE) | ||
98 | #define MAX_HEADER LL_MAX_HEADER | 100 | #define MAX_HEADER LL_MAX_HEADER |
99 | #else | 101 | #else |
100 | #define MAX_HEADER (LL_MAX_HEADER + 48) | 102 | #define MAX_HEADER (LL_MAX_HEADER + 48) |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 57f670d78f7c..8451052ca66f 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <linux/thread_info.h> | 52 | #include <linux/thread_info.h> |
53 | #include <linux/kernel.h> | 53 | #include <linux/kernel.h> |
54 | #include <linux/stringify.h> | 54 | #include <linux/stringify.h> |
55 | #include <linux/irqflags.h> | ||
56 | 55 | ||
57 | #include <asm/system.h> | 56 | #include <asm/system.h> |
58 | 57 | ||
@@ -184,52 +183,24 @@ do { \ | |||
184 | #define read_lock(lock) _read_lock(lock) | 183 | #define read_lock(lock) _read_lock(lock) |
185 | 184 | ||
186 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | 185 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) |
187 | #define spin_lock_irqsave(lock, flags) \ | 186 | |
188 | do { \ | 187 | #define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock) |
189 | BUILD_CHECK_IRQ_FLAGS(flags); \ | 188 | #define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock) |
190 | flags = _spin_lock_irqsave(lock); \ | 189 | #define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock) |
191 | } while (0) | ||
192 | #define read_lock_irqsave(lock, flags) \ | ||
193 | do { \ | ||
194 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
195 | flags = _read_lock_irqsave(lock); \ | ||
196 | } while (0) | ||
197 | #define write_lock_irqsave(lock, flags) \ | ||
198 | do { \ | ||
199 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
200 | flags = _write_lock_irqsave(lock); \ | ||
201 | } while (0) | ||
202 | 190 | ||
203 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 191 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
204 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | 192 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ |
205 | do { \ | 193 | flags = _spin_lock_irqsave_nested(lock, subclass) |
206 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
207 | flags = _spin_lock_irqsave_nested(lock, subclass); \ | ||
208 | } while (0) | ||
209 | #else | 194 | #else |
210 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | 195 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ |
211 | do { \ | 196 | flags = _spin_lock_irqsave(lock) |
212 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
213 | flags = _spin_lock_irqsave(lock); \ | ||
214 | } while (0) | ||
215 | #endif | 197 | #endif |
216 | 198 | ||
217 | #else | 199 | #else |
218 | #define spin_lock_irqsave(lock, flags) \ | 200 | |
219 | do { \ | 201 | #define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags) |
220 | BUILD_CHECK_IRQ_FLAGS(flags); \ | 202 | #define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags) |
221 | _spin_lock_irqsave(lock, flags); \ | 203 | #define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags) |
222 | } while (0) | ||
223 | #define read_lock_irqsave(lock, flags) \ | ||
224 | do { \ | ||
225 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
226 | _read_lock_irqsave(lock, flags); \ | ||
227 | } while (0) | ||
228 | #define write_lock_irqsave(lock, flags) \ | ||
229 | do { \ | ||
230 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
231 | _write_lock_irqsave(lock, flags); \ | ||
232 | } while (0) | ||
233 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ | 204 | #define spin_lock_irqsave_nested(lock, flags, subclass) \ |
234 | spin_lock_irqsave(lock, flags) | 205 | spin_lock_irqsave(lock, flags) |
235 | 206 | ||
@@ -268,24 +239,15 @@ do { \ | |||
268 | #endif | 239 | #endif |
269 | 240 | ||
270 | #define spin_unlock_irqrestore(lock, flags) \ | 241 | #define spin_unlock_irqrestore(lock, flags) \ |
271 | do { \ | 242 | _spin_unlock_irqrestore(lock, flags) |
272 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
273 | _spin_unlock_irqrestore(lock, flags); \ | ||
274 | } while (0) | ||
275 | #define spin_unlock_bh(lock) _spin_unlock_bh(lock) | 243 | #define spin_unlock_bh(lock) _spin_unlock_bh(lock) |
276 | 244 | ||
277 | #define read_unlock_irqrestore(lock, flags) \ | 245 | #define read_unlock_irqrestore(lock, flags) \ |
278 | do { \ | 246 | _read_unlock_irqrestore(lock, flags) |
279 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
280 | _read_unlock_irqrestore(lock, flags); \ | ||
281 | } while (0) | ||
282 | #define read_unlock_bh(lock) _read_unlock_bh(lock) | 247 | #define read_unlock_bh(lock) _read_unlock_bh(lock) |
283 | 248 | ||
284 | #define write_unlock_irqrestore(lock, flags) \ | 249 | #define write_unlock_irqrestore(lock, flags) \ |
285 | do { \ | 250 | _write_unlock_irqrestore(lock, flags) |
286 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
287 | _write_unlock_irqrestore(lock, flags); \ | ||
288 | } while (0) | ||
289 | #define write_unlock_bh(lock) _write_unlock_bh(lock) | 251 | #define write_unlock_bh(lock) _write_unlock_bh(lock) |
290 | 252 | ||
291 | #define spin_trylock_bh(lock) __cond_lock(lock, _spin_trylock_bh(lock)) | 253 | #define spin_trylock_bh(lock) __cond_lock(lock, _spin_trylock_bh(lock)) |
@@ -299,7 +261,6 @@ do { \ | |||
299 | 261 | ||
300 | #define spin_trylock_irqsave(lock, flags) \ | 262 | #define spin_trylock_irqsave(lock, flags) \ |
301 | ({ \ | 263 | ({ \ |
302 | BUILD_CHECK_IRQ_FLAGS(flags); \ | ||
303 | local_irq_save(flags); \ | 264 | local_irq_save(flags); \ |
304 | spin_trylock(lock) ? \ | 265 | spin_trylock(lock) ? \ |
305 | 1 : ({ local_irq_restore(flags); 0; }); \ | 266 | 1 : ({ local_irq_restore(flags); 0; }); \ |
diff --git a/include/net/sock.h b/include/net/sock.h index ac286a353032..9cdbae2a53a3 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -883,18 +883,23 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb) | |||
883 | } | 883 | } |
884 | 884 | ||
885 | /** | 885 | /** |
886 | * sk_filter_release: Release a socket filter | 886 | * sk_filter_rcu_free: Free a socket filter |
887 | * @rcu: rcu_head that contains the sk_filter info to remove | 887 | * @rcu: rcu_head that contains the sk_filter to free |
888 | * | ||
889 | * Remove a filter from a socket and release its resources. | ||
890 | */ | 888 | */ |
891 | |||
892 | static inline void sk_filter_rcu_free(struct rcu_head *rcu) | 889 | static inline void sk_filter_rcu_free(struct rcu_head *rcu) |
893 | { | 890 | { |
894 | struct sk_filter *fp = container_of(rcu, struct sk_filter, rcu); | 891 | struct sk_filter *fp = container_of(rcu, struct sk_filter, rcu); |
895 | kfree(fp); | 892 | kfree(fp); |
896 | } | 893 | } |
897 | 894 | ||
895 | /** | ||
896 | * sk_filter_release: Release a socket filter | ||
897 | * @sk: socket | ||
898 | * @fp: filter to remove | ||
899 | * | ||
900 | * Remove a filter from a socket and release its resources. | ||
901 | */ | ||
902 | |||
898 | static inline void sk_filter_release(struct sock *sk, struct sk_filter *fp) | 903 | static inline void sk_filter_release(struct sock *sk, struct sk_filter *fp) |
899 | { | 904 | { |
900 | unsigned int size = sk_filter_len(fp); | 905 | unsigned int size = sk_filter_len(fp); |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 9582e8401669..1d77b63c5ea4 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <scsi/scsi_device.h> | 35 | #include <scsi/scsi_device.h> |
36 | #include <scsi/scsi_cmnd.h> | 36 | #include <scsi/scsi_cmnd.h> |
37 | #include <scsi/scsi_transport_sas.h> | 37 | #include <scsi/scsi_transport_sas.h> |
38 | #include <asm/scatterlist.h> | ||
38 | 39 | ||
39 | struct block_device; | 40 | struct block_device; |
40 | 41 | ||
diff --git a/include/sound/version.h b/include/sound/version.h index 52fd6879b86e..17137f3a3b6f 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h. Generated by alsa/ksync script. */ | 1 | /* include/version.h. Generated by alsa/ksync script. */ |
2 | #define CONFIG_SND_VERSION "1.0.13" | 2 | #define CONFIG_SND_VERSION "1.0.13" |
3 | #define CONFIG_SND_DATE " (Sun Oct 22 08:56:16 2006 UTC)" | 3 | #define CONFIG_SND_DATE " (Tue Nov 28 14:07:24 2006 UTC)" |
diff --git a/kernel/kmod.c b/kernel/kmod.c index bb4e29d924e4..2b76dee28496 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
@@ -307,14 +307,14 @@ int call_usermodehelper_pipe(char *path, char **argv, char **envp, | |||
307 | return 0; | 307 | return 0; |
308 | 308 | ||
309 | f = create_write_pipe(); | 309 | f = create_write_pipe(); |
310 | if (!f) | 310 | if (IS_ERR(f)) |
311 | return -ENOMEM; | 311 | return PTR_ERR(f); |
312 | *filp = f; | 312 | *filp = f; |
313 | 313 | ||
314 | f = create_read_pipe(f); | 314 | f = create_read_pipe(f); |
315 | if (!f) { | 315 | if (IS_ERR(f)) { |
316 | free_write_pipe(*filp); | 316 | free_write_pipe(*filp); |
317 | return -ENOMEM; | 317 | return PTR_ERR(f); |
318 | } | 318 | } |
319 | sub_info.stdin = f; | 319 | sub_info.stdin = f; |
320 | 320 | ||
diff --git a/kernel/unwind.c b/kernel/unwind.c index f7e50d16dbf6..ed0a21d4a902 100644 --- a/kernel/unwind.c +++ b/kernel/unwind.c | |||
@@ -938,8 +938,11 @@ int unwind(struct unwind_frame_info *frame) | |||
938 | else { | 938 | else { |
939 | retAddrReg = state.version <= 1 ? *ptr++ : get_uleb128(&ptr, end); | 939 | retAddrReg = state.version <= 1 ? *ptr++ : get_uleb128(&ptr, end); |
940 | /* skip augmentation */ | 940 | /* skip augmentation */ |
941 | if (((const char *)(cie + 2))[1] == 'z') | 941 | if (((const char *)(cie + 2))[1] == 'z') { |
942 | ptr += get_uleb128(&ptr, end); | 942 | uleb128_t augSize = get_uleb128(&ptr, end); |
943 | |||
944 | ptr += augSize; | ||
945 | } | ||
943 | if (ptr > end | 946 | if (ptr > end |
944 | || retAddrReg >= ARRAY_SIZE(reg_info) | 947 | || retAddrReg >= ARRAY_SIZE(reg_info) |
945 | || REG_INVALID(retAddrReg) | 948 | || REG_INVALID(retAddrReg) |
@@ -963,9 +966,7 @@ int unwind(struct unwind_frame_info *frame) | |||
963 | if (cie == NULL || fde == NULL) { | 966 | if (cie == NULL || fde == NULL) { |
964 | #ifdef CONFIG_FRAME_POINTER | 967 | #ifdef CONFIG_FRAME_POINTER |
965 | unsigned long top, bottom; | 968 | unsigned long top, bottom; |
966 | #endif | ||
967 | 969 | ||
968 | #ifdef CONFIG_FRAME_POINTER | ||
969 | top = STACK_TOP(frame->task); | 970 | top = STACK_TOP(frame->task); |
970 | bottom = STACK_BOTTOM(frame->task); | 971 | bottom = STACK_BOTTOM(frame->task); |
971 | # if FRAME_RETADDR_OFFSET < 0 | 972 | # if FRAME_RETADDR_OFFSET < 0 |
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c index 4e4119a12139..4c61a7e0a86e 100644 --- a/net/bridge/br_ioctl.c +++ b/net/bridge/br_ioctl.c | |||
@@ -58,12 +58,13 @@ static int get_fdb_entries(struct net_bridge *br, void __user *userbuf, | |||
58 | { | 58 | { |
59 | int num; | 59 | int num; |
60 | void *buf; | 60 | void *buf; |
61 | size_t size = maxnum * sizeof(struct __fdb_entry); | 61 | size_t size; |
62 | 62 | ||
63 | if (size > PAGE_SIZE) { | 63 | /* Clamp size to PAGE_SIZE, test maxnum to avoid overflow */ |
64 | size = PAGE_SIZE; | 64 | if (maxnum > PAGE_SIZE/sizeof(struct __fdb_entry)) |
65 | maxnum = PAGE_SIZE/sizeof(struct __fdb_entry); | 65 | maxnum = PAGE_SIZE/sizeof(struct __fdb_entry); |
66 | } | 66 | |
67 | size = maxnum * sizeof(struct __fdb_entry); | ||
67 | 68 | ||
68 | buf = kmalloc(size, GFP_USER); | 69 | buf = kmalloc(size, GFP_USER); |
69 | if (!buf) | 70 | if (!buf) |
diff --git a/net/dccp/probe.c b/net/dccp/probe.c index 146496fce2e2..fded1493c1dc 100644 --- a/net/dccp/probe.c +++ b/net/dccp/probe.c | |||
@@ -160,6 +160,8 @@ static __init int dccpprobe_init(void) | |||
160 | init_waitqueue_head(&dccpw.wait); | 160 | init_waitqueue_head(&dccpw.wait); |
161 | spin_lock_init(&dccpw.lock); | 161 | spin_lock_init(&dccpw.lock); |
162 | dccpw.fifo = kfifo_alloc(bufsize, GFP_KERNEL, &dccpw.lock); | 162 | dccpw.fifo = kfifo_alloc(bufsize, GFP_KERNEL, &dccpw.lock); |
163 | if (IS_ERR(dccpw.fifo)) | ||
164 | return PTR_ERR(dccpw.fifo); | ||
163 | 165 | ||
164 | if (!proc_net_fops_create(procname, S_IRUSR, &dccpprobe_fops)) | 166 | if (!proc_net_fops_create(procname, S_IRUSR, &dccpprobe_fops)) |
165 | goto err0; | 167 | goto err0; |
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c index 143c4668538b..8b848aa77bfc 100644 --- a/net/ipv4/netfilter/ip_conntrack_core.c +++ b/net/ipv4/netfilter/ip_conntrack_core.c | |||
@@ -225,10 +225,8 @@ __ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple) | |||
225 | struct ip_conntrack_expect *i; | 225 | struct ip_conntrack_expect *i; |
226 | 226 | ||
227 | list_for_each_entry(i, &ip_conntrack_expect_list, list) { | 227 | list_for_each_entry(i, &ip_conntrack_expect_list, list) { |
228 | if (ip_ct_tuple_mask_cmp(tuple, &i->tuple, &i->mask)) { | 228 | if (ip_ct_tuple_mask_cmp(tuple, &i->tuple, &i->mask)) |
229 | atomic_inc(&i->use); | ||
230 | return i; | 229 | return i; |
231 | } | ||
232 | } | 230 | } |
233 | return NULL; | 231 | return NULL; |
234 | } | 232 | } |
@@ -241,6 +239,8 @@ ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple) | |||
241 | 239 | ||
242 | read_lock_bh(&ip_conntrack_lock); | 240 | read_lock_bh(&ip_conntrack_lock); |
243 | i = __ip_conntrack_expect_find(tuple); | 241 | i = __ip_conntrack_expect_find(tuple); |
242 | if (i) | ||
243 | atomic_inc(&i->use); | ||
244 | read_unlock_bh(&ip_conntrack_lock); | 244 | read_unlock_bh(&ip_conntrack_lock); |
245 | 245 | ||
246 | return i; | 246 | return i; |
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323.c b/net/ipv4/netfilter/ip_conntrack_helper_h323.c index 7b7441202bfd..6cb9070cd0bc 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_h323.c | |||
@@ -1417,7 +1417,7 @@ static int process_rcf(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
1417 | DEBUGP | 1417 | DEBUGP |
1418 | ("ip_ct_ras: set RAS connection timeout to %u seconds\n", | 1418 | ("ip_ct_ras: set RAS connection timeout to %u seconds\n", |
1419 | info->timeout); | 1419 | info->timeout); |
1420 | ip_ct_refresh_acct(ct, ctinfo, NULL, info->timeout * HZ); | 1420 | ip_ct_refresh(ct, *pskb, info->timeout * HZ); |
1421 | 1421 | ||
1422 | /* Set expect timeout */ | 1422 | /* Set expect timeout */ |
1423 | read_lock_bh(&ip_conntrack_lock); | 1423 | read_lock_bh(&ip_conntrack_lock); |
@@ -1465,7 +1465,7 @@ static int process_urq(struct sk_buff **pskb, struct ip_conntrack *ct, | |||
1465 | info->sig_port[!dir] = 0; | 1465 | info->sig_port[!dir] = 0; |
1466 | 1466 | ||
1467 | /* Give it 30 seconds for UCF or URJ */ | 1467 | /* Give it 30 seconds for UCF or URJ */ |
1468 | ip_ct_refresh_acct(ct, ctinfo, NULL, 30 * HZ); | 1468 | ip_ct_refresh(ct, *pskb, 30 * HZ); |
1469 | 1469 | ||
1470 | return 0; | 1470 | return 0; |
1471 | } | 1471 | } |
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c index 262d0d44ec1b..55f0ae641081 100644 --- a/net/ipv4/netfilter/ip_conntrack_netlink.c +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c | |||
@@ -153,6 +153,7 @@ ctnetlink_dump_protoinfo(struct sk_buff *skb, const struct ip_conntrack *ct) | |||
153 | return ret; | 153 | return ret; |
154 | 154 | ||
155 | nfattr_failure: | 155 | nfattr_failure: |
156 | ip_conntrack_proto_put(proto); | ||
156 | return -1; | 157 | return -1; |
157 | } | 158 | } |
158 | 159 | ||
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c index ad0312d0e4fd..264763adc39b 100644 --- a/net/ipv4/netfilter/ipt_REJECT.c +++ b/net/ipv4/netfilter/ipt_REJECT.c | |||
@@ -114,6 +114,14 @@ static void send_reset(struct sk_buff *oldskb, int hook) | |||
114 | tcph->window = 0; | 114 | tcph->window = 0; |
115 | tcph->urg_ptr = 0; | 115 | tcph->urg_ptr = 0; |
116 | 116 | ||
117 | /* Adjust TCP checksum */ | ||
118 | tcph->check = 0; | ||
119 | tcph->check = tcp_v4_check(tcph, sizeof(struct tcphdr), | ||
120 | nskb->nh.iph->saddr, | ||
121 | nskb->nh.iph->daddr, | ||
122 | csum_partial((char *)tcph, | ||
123 | sizeof(struct tcphdr), 0)); | ||
124 | |||
117 | /* Set DF, id = 0 */ | 125 | /* Set DF, id = 0 */ |
118 | nskb->nh.iph->frag_off = htons(IP_DF); | 126 | nskb->nh.iph->frag_off = htons(IP_DF); |
119 | nskb->nh.iph->id = 0; | 127 | nskb->nh.iph->id = 0; |
@@ -129,14 +137,8 @@ static void send_reset(struct sk_buff *oldskb, int hook) | |||
129 | if (ip_route_me_harder(&nskb, addr_type)) | 137 | if (ip_route_me_harder(&nskb, addr_type)) |
130 | goto free_nskb; | 138 | goto free_nskb; |
131 | 139 | ||
132 | /* Adjust TCP checksum */ | ||
133 | nskb->ip_summed = CHECKSUM_NONE; | 140 | nskb->ip_summed = CHECKSUM_NONE; |
134 | tcph->check = 0; | 141 | |
135 | tcph->check = tcp_v4_check(tcph, sizeof(struct tcphdr), | ||
136 | nskb->nh.iph->saddr, | ||
137 | nskb->nh.iph->daddr, | ||
138 | csum_partial((char *)tcph, | ||
139 | sizeof(struct tcphdr), 0)); | ||
140 | /* Adjust IP TTL */ | 142 | /* Adjust IP TTL */ |
141 | nskb->nh.iph->ttl = dst_metric(nskb->dst, RTAX_HOPLIMIT); | 143 | nskb->nh.iph->ttl = dst_metric(nskb->dst, RTAX_HOPLIMIT); |
142 | 144 | ||
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index 4be336f17883..f230eeecf092 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c | |||
@@ -156,6 +156,8 @@ static __init int tcpprobe_init(void) | |||
156 | init_waitqueue_head(&tcpw.wait); | 156 | init_waitqueue_head(&tcpw.wait); |
157 | spin_lock_init(&tcpw.lock); | 157 | spin_lock_init(&tcpw.lock); |
158 | tcpw.fifo = kfifo_alloc(bufsize, GFP_KERNEL, &tcpw.lock); | 158 | tcpw.fifo = kfifo_alloc(bufsize, GFP_KERNEL, &tcpw.lock); |
159 | if (IS_ERR(tcpw.fifo)) | ||
160 | return PTR_ERR(tcpw.fifo); | ||
159 | 161 | ||
160 | if (!proc_net_fops_create(procname, S_IRUSR, &tcpprobe_fops)) | 162 | if (!proc_net_fops_create(procname, S_IRUSR, &tcpprobe_fops)) |
161 | goto err0; | 163 | goto err0; |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 865d75214a9a..9e1bd374875e 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -928,23 +928,32 @@ static int udp_encap_rcv(struct sock * sk, struct sk_buff *skb) | |||
928 | return 1; | 928 | return 1; |
929 | #else | 929 | #else |
930 | struct udp_sock *up = udp_sk(sk); | 930 | struct udp_sock *up = udp_sk(sk); |
931 | struct udphdr *uh = skb->h.uh; | 931 | struct udphdr *uh; |
932 | struct iphdr *iph; | 932 | struct iphdr *iph; |
933 | int iphlen, len; | 933 | int iphlen, len; |
934 | 934 | ||
935 | __u8 *udpdata = (__u8 *)uh + sizeof(struct udphdr); | 935 | __u8 *udpdata; |
936 | __be32 *udpdata32 = (__be32 *)udpdata; | 936 | __be32 *udpdata32; |
937 | __u16 encap_type = up->encap_type; | 937 | __u16 encap_type = up->encap_type; |
938 | 938 | ||
939 | /* if we're overly short, let UDP handle it */ | 939 | /* if we're overly short, let UDP handle it */ |
940 | if (udpdata > skb->tail) | 940 | len = skb->len - sizeof(struct udphdr); |
941 | if (len <= 0) | ||
941 | return 1; | 942 | return 1; |
942 | 943 | ||
943 | /* if this is not encapsulated socket, then just return now */ | 944 | /* if this is not encapsulated socket, then just return now */ |
944 | if (!encap_type) | 945 | if (!encap_type) |
945 | return 1; | 946 | return 1; |
946 | 947 | ||
947 | len = skb->tail - udpdata; | 948 | /* If this is a paged skb, make sure we pull up |
949 | * whatever data we need to look at. */ | ||
950 | if (!pskb_may_pull(skb, sizeof(struct udphdr) + min(len, 8))) | ||
951 | return 1; | ||
952 | |||
953 | /* Now we can get the pointers */ | ||
954 | uh = skb->h.uh; | ||
955 | udpdata = (__u8 *)uh + sizeof(struct udphdr); | ||
956 | udpdata32 = (__be32 *)udpdata; | ||
948 | 957 | ||
949 | switch (encap_type) { | 958 | switch (encap_type) { |
950 | default: | 959 | default: |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 836541e509fe..de0567b1f422 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -469,10 +469,8 @@ __nf_conntrack_expect_find(const struct nf_conntrack_tuple *tuple) | |||
469 | struct nf_conntrack_expect *i; | 469 | struct nf_conntrack_expect *i; |
470 | 470 | ||
471 | list_for_each_entry(i, &nf_conntrack_expect_list, list) { | 471 | list_for_each_entry(i, &nf_conntrack_expect_list, list) { |
472 | if (nf_ct_tuple_mask_cmp(tuple, &i->tuple, &i->mask)) { | 472 | if (nf_ct_tuple_mask_cmp(tuple, &i->tuple, &i->mask)) |
473 | atomic_inc(&i->use); | ||
474 | return i; | 473 | return i; |
475 | } | ||
476 | } | 474 | } |
477 | return NULL; | 475 | return NULL; |
478 | } | 476 | } |
@@ -485,6 +483,8 @@ nf_conntrack_expect_find(const struct nf_conntrack_tuple *tuple) | |||
485 | 483 | ||
486 | read_lock_bh(&nf_conntrack_lock); | 484 | read_lock_bh(&nf_conntrack_lock); |
487 | i = __nf_conntrack_expect_find(tuple); | 485 | i = __nf_conntrack_expect_find(tuple); |
486 | if (i) | ||
487 | atomic_inc(&i->use); | ||
488 | read_unlock_bh(&nf_conntrack_lock); | 488 | read_unlock_bh(&nf_conntrack_lock); |
489 | 489 | ||
490 | return i; | 490 | return i; |
@@ -893,12 +893,6 @@ __nf_conntrack_alloc(const struct nf_conntrack_tuple *orig, | |||
893 | 893 | ||
894 | memset(conntrack, 0, nf_ct_cache[features].size); | 894 | memset(conntrack, 0, nf_ct_cache[features].size); |
895 | conntrack->features = features; | 895 | conntrack->features = features; |
896 | if (helper) { | ||
897 | struct nf_conn_help *help = nfct_help(conntrack); | ||
898 | NF_CT_ASSERT(help); | ||
899 | help->helper = helper; | ||
900 | } | ||
901 | |||
902 | atomic_set(&conntrack->ct_general.use, 1); | 896 | atomic_set(&conntrack->ct_general.use, 1); |
903 | conntrack->ct_general.destroy = destroy_conntrack; | 897 | conntrack->ct_general.destroy = destroy_conntrack; |
904 | conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig; | 898 | conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig; |
@@ -982,8 +976,13 @@ init_conntrack(const struct nf_conntrack_tuple *tuple, | |||
982 | #endif | 976 | #endif |
983 | nf_conntrack_get(&conntrack->master->ct_general); | 977 | nf_conntrack_get(&conntrack->master->ct_general); |
984 | NF_CT_STAT_INC(expect_new); | 978 | NF_CT_STAT_INC(expect_new); |
985 | } else | 979 | } else { |
980 | struct nf_conn_help *help = nfct_help(conntrack); | ||
981 | |||
982 | if (help) | ||
983 | help->helper = __nf_ct_helper_find(&repl_tuple); | ||
986 | NF_CT_STAT_INC(new); | 984 | NF_CT_STAT_INC(new); |
985 | } | ||
987 | 986 | ||
988 | /* Overload tuple linked list to put us in unconfirmed list. */ | 987 | /* Overload tuple linked list to put us in unconfirmed list. */ |
989 | list_add(&conntrack->tuplehash[IP_CT_DIR_ORIGINAL].list, &unconfirmed); | 988 | list_add(&conntrack->tuplehash[IP_CT_DIR_ORIGINAL].list, &unconfirmed); |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index bd0156a28ecd..ab67c2be2b5d 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -161,6 +161,7 @@ ctnetlink_dump_protoinfo(struct sk_buff *skb, const struct nf_conn *ct) | |||
161 | return ret; | 161 | return ret; |
162 | 162 | ||
163 | nfattr_failure: | 163 | nfattr_failure: |
164 | nf_ct_proto_put(proto); | ||
164 | return -1; | 165 | return -1; |
165 | } | 166 | } |
166 | 167 | ||
@@ -949,6 +950,7 @@ ctnetlink_create_conntrack(struct nfattr *cda[], | |||
949 | { | 950 | { |
950 | struct nf_conn *ct; | 951 | struct nf_conn *ct; |
951 | int err = -EINVAL; | 952 | int err = -EINVAL; |
953 | struct nf_conn_help *help; | ||
952 | 954 | ||
953 | ct = nf_conntrack_alloc(otuple, rtuple); | 955 | ct = nf_conntrack_alloc(otuple, rtuple); |
954 | if (ct == NULL || IS_ERR(ct)) | 956 | if (ct == NULL || IS_ERR(ct)) |
@@ -976,9 +978,16 @@ ctnetlink_create_conntrack(struct nfattr *cda[], | |||
976 | ct->mark = ntohl(*(u_int32_t *)NFA_DATA(cda[CTA_MARK-1])); | 978 | ct->mark = ntohl(*(u_int32_t *)NFA_DATA(cda[CTA_MARK-1])); |
977 | #endif | 979 | #endif |
978 | 980 | ||
981 | help = nfct_help(ct); | ||
982 | if (help) | ||
983 | help->helper = nf_ct_helper_find_get(rtuple); | ||
984 | |||
979 | add_timer(&ct->timeout); | 985 | add_timer(&ct->timeout); |
980 | nf_conntrack_hash_insert(ct); | 986 | nf_conntrack_hash_insert(ct); |
981 | 987 | ||
988 | if (help && help->helper) | ||
989 | nf_ct_helper_put(help->helper); | ||
990 | |||
982 | return 0; | 991 | return 0; |
983 | 992 | ||
984 | err: | 993 | err: |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index c4cde57d9216..2ee14f8a1908 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -495,6 +495,7 @@ static struct xfrm_state *xfrm_user_state_lookup(struct xfrm_usersa_id *p, | |||
495 | goto out; | 495 | goto out; |
496 | } | 496 | } |
497 | 497 | ||
498 | err = -ESRCH; | ||
498 | x = xfrm_state_lookup_byaddr(&p->daddr, saddr, p->proto, | 499 | x = xfrm_state_lookup_byaddr(&p->daddr, saddr, p->proto, |
499 | p->family); | 500 | p->family); |
500 | } | 501 | } |
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 8ab5679a37a3..28ee187ed224 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -1754,7 +1754,8 @@ static inline void flush_unauthorized_files(struct files_struct * files) | |||
1754 | get_file(devnull); | 1754 | get_file(devnull); |
1755 | } else { | 1755 | } else { |
1756 | devnull = dentry_open(dget(selinux_null), mntget(selinuxfs_mount), O_RDWR); | 1756 | devnull = dentry_open(dget(selinux_null), mntget(selinuxfs_mount), O_RDWR); |
1757 | if (!devnull) { | 1757 | if (IS_ERR(devnull)) { |
1758 | devnull = NULL; | ||
1758 | put_unused_fd(fd); | 1759 | put_unused_fd(fd); |
1759 | fput(file); | 1760 | fput(file); |
1760 | continue; | 1761 | continue; |
diff --git a/sound/aoa/codecs/snd-aoa-codec-tas.c b/sound/aoa/codecs/snd-aoa-codec-tas.c index 2ef55a17917c..9de8485ba3f5 100644 --- a/sound/aoa/codecs/snd-aoa-codec-tas.c +++ b/sound/aoa/codecs/snd-aoa-codec-tas.c | |||
@@ -514,9 +514,15 @@ static int tas_snd_capture_source_put(struct snd_kcontrol *kcontrol, | |||
514 | mutex_lock(&tas->mtx); | 514 | mutex_lock(&tas->mtx); |
515 | oldacr = tas->acr; | 515 | oldacr = tas->acr; |
516 | 516 | ||
517 | tas->acr &= ~TAS_ACR_INPUT_B; | 517 | /* |
518 | * Despite what the data sheet says in one place, the | ||
519 | * TAS_ACR_B_MONAUREAL bit forces mono output even when | ||
520 | * input A (line in) is selected. | ||
521 | */ | ||
522 | tas->acr &= ~(TAS_ACR_INPUT_B | TAS_ACR_B_MONAUREAL); | ||
518 | if (ucontrol->value.enumerated.item[0]) | 523 | if (ucontrol->value.enumerated.item[0]) |
519 | tas->acr |= TAS_ACR_INPUT_B; | 524 | tas->acr |= TAS_ACR_INPUT_B | TAS_ACR_B_MONAUREAL | |
525 | TAS_ACR_B_MON_SEL_RIGHT; | ||
520 | if (oldacr == tas->acr) { | 526 | if (oldacr == tas->acr) { |
521 | mutex_unlock(&tas->mtx); | 527 | mutex_unlock(&tas->mtx); |
522 | return 0; | 528 | return 0; |
@@ -686,8 +692,7 @@ static int tas_reset_init(struct tas *tas) | |||
686 | if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp)) | 692 | if (tas_write_reg(tas, TAS_REG_MCS, 1, &tmp)) |
687 | goto outerr; | 693 | goto outerr; |
688 | 694 | ||
689 | tas->acr |= TAS_ACR_ANALOG_PDOWN | TAS_ACR_B_MONAUREAL | | 695 | tas->acr |= TAS_ACR_ANALOG_PDOWN; |
690 | TAS_ACR_B_MON_SEL_RIGHT; | ||
691 | if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr)) | 696 | if (tas_write_reg(tas, TAS_REG_ACR, 1, &tas->acr)) |
692 | goto outerr; | 697 | goto outerr; |
693 | 698 | ||
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 505b23ec4058..e0821eb3d851 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c | |||
@@ -2359,7 +2359,8 @@ static int snd_pcm_oss_release(struct inode *inode, struct file *file) | |||
2359 | substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE]; | 2359 | substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE]; |
2360 | snd_assert(substream != NULL, return -ENXIO); | 2360 | snd_assert(substream != NULL, return -ENXIO); |
2361 | pcm = substream->pcm; | 2361 | pcm = substream->pcm; |
2362 | snd_pcm_oss_sync(pcm_oss_file); | 2362 | if (!pcm->card->shutdown) |
2363 | snd_pcm_oss_sync(pcm_oss_file); | ||
2363 | mutex_lock(&pcm->open_mutex); | 2364 | mutex_lock(&pcm->open_mutex); |
2364 | snd_pcm_oss_release_file(pcm_oss_file); | 2365 | snd_pcm_oss_release_file(pcm_oss_file); |
2365 | mutex_unlock(&pcm->open_mutex); | 2366 | mutex_unlock(&pcm->open_mutex); |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 37b4b10850ae..66e24b5da469 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -1310,7 +1310,8 @@ static int snd_pcm_pre_prepare(struct snd_pcm_substream *substream, | |||
1310 | int f_flags) | 1310 | int f_flags) |
1311 | { | 1311 | { |
1312 | struct snd_pcm_runtime *runtime = substream->runtime; | 1312 | struct snd_pcm_runtime *runtime = substream->runtime; |
1313 | if (runtime->status->state == SNDRV_PCM_STATE_OPEN) | 1313 | if (runtime->status->state == SNDRV_PCM_STATE_OPEN || |
1314 | runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED) | ||
1314 | return -EBADFD; | 1315 | return -EBADFD; |
1315 | if (snd_pcm_running(substream)) | 1316 | if (snd_pcm_running(substream)) |
1316 | return -EBUSY; | 1317 | return -EBUSY; |
@@ -1568,7 +1569,8 @@ static int snd_pcm_drop(struct snd_pcm_substream *substream) | |||
1568 | runtime = substream->runtime; | 1569 | runtime = substream->runtime; |
1569 | card = substream->pcm->card; | 1570 | card = substream->pcm->card; |
1570 | 1571 | ||
1571 | if (runtime->status->state == SNDRV_PCM_STATE_OPEN) | 1572 | if (runtime->status->state == SNDRV_PCM_STATE_OPEN || |
1573 | runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED) | ||
1572 | return -EBADFD; | 1574 | return -EBADFD; |
1573 | 1575 | ||
1574 | snd_power_lock(card); | 1576 | snd_power_lock(card); |
diff --git a/sound/core/rtctimer.c b/sound/core/rtctimer.c index 412dd62b654e..9f7b32e1ccde 100644 --- a/sound/core/rtctimer.c +++ b/sound/core/rtctimer.c | |||
@@ -22,13 +22,10 @@ | |||
22 | 22 | ||
23 | #include <sound/driver.h> | 23 | #include <sound/driver.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/time.h> | ||
26 | #include <linux/threads.h> | ||
27 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
28 | #include <linux/moduleparam.h> | 26 | #include <linux/moduleparam.h> |
29 | #include <sound/core.h> | 27 | #include <sound/core.h> |
30 | #include <sound/timer.h> | 28 | #include <sound/timer.h> |
31 | #include <sound/info.h> | ||
32 | 29 | ||
33 | #if defined(CONFIG_RTC) || defined(CONFIG_RTC_MODULE) | 30 | #if defined(CONFIG_RTC) || defined(CONFIG_RTC_MODULE) |
34 | 31 | ||
@@ -50,7 +47,9 @@ static int rtctimer_stop(struct snd_timer *t); | |||
50 | * The hardware dependent description for this timer. | 47 | * The hardware dependent description for this timer. |
51 | */ | 48 | */ |
52 | static struct snd_timer_hardware rtc_hw = { | 49 | static struct snd_timer_hardware rtc_hw = { |
53 | .flags = SNDRV_TIMER_HW_FIRST|SNDRV_TIMER_HW_AUTO, | 50 | .flags = SNDRV_TIMER_HW_AUTO | |
51 | SNDRV_TIMER_HW_FIRST | | ||
52 | SNDRV_TIMER_HW_TASKLET, | ||
54 | .ticks = 100000000L, /* FIXME: XXX */ | 53 | .ticks = 100000000L, /* FIXME: XXX */ |
55 | .open = rtctimer_open, | 54 | .open = rtctimer_open, |
56 | .close = rtctimer_close, | 55 | .close = rtctimer_close, |
@@ -60,6 +59,7 @@ static struct snd_timer_hardware rtc_hw = { | |||
60 | 59 | ||
61 | static int rtctimer_freq = RTC_FREQ; /* frequency */ | 60 | static int rtctimer_freq = RTC_FREQ; /* frequency */ |
62 | static struct snd_timer *rtctimer; | 61 | static struct snd_timer *rtctimer; |
62 | static struct tasklet_struct rtc_tasklet; | ||
63 | static rtc_task_t rtc_task; | 63 | static rtc_task_t rtc_task; |
64 | 64 | ||
65 | 65 | ||
@@ -81,6 +81,7 @@ rtctimer_close(struct snd_timer *t) | |||
81 | rtc_task_t *rtc = t->private_data; | 81 | rtc_task_t *rtc = t->private_data; |
82 | if (rtc) { | 82 | if (rtc) { |
83 | rtc_unregister(rtc); | 83 | rtc_unregister(rtc); |
84 | tasklet_kill(&rtc_tasklet); | ||
84 | t->private_data = NULL; | 85 | t->private_data = NULL; |
85 | } | 86 | } |
86 | return 0; | 87 | return 0; |
@@ -105,12 +106,17 @@ rtctimer_stop(struct snd_timer *timer) | |||
105 | return 0; | 106 | return 0; |
106 | } | 107 | } |
107 | 108 | ||
109 | static void rtctimer_tasklet(unsigned long data) | ||
110 | { | ||
111 | snd_timer_interrupt((struct snd_timer *)data, 1); | ||
112 | } | ||
113 | |||
108 | /* | 114 | /* |
109 | * interrupt | 115 | * interrupt |
110 | */ | 116 | */ |
111 | static void rtctimer_interrupt(void *private_data) | 117 | static void rtctimer_interrupt(void *private_data) |
112 | { | 118 | { |
113 | snd_timer_interrupt(private_data, 1); | 119 | tasklet_hi_schedule(private_data); |
114 | } | 120 | } |
115 | 121 | ||
116 | 122 | ||
@@ -139,9 +145,11 @@ static int __init rtctimer_init(void) | |||
139 | timer->hw = rtc_hw; | 145 | timer->hw = rtc_hw; |
140 | timer->hw.resolution = NANO_SEC / rtctimer_freq; | 146 | timer->hw.resolution = NANO_SEC / rtctimer_freq; |
141 | 147 | ||
148 | tasklet_init(&rtc_tasklet, rtctimer_tasklet, (unsigned long)timer); | ||
149 | |||
142 | /* set up RTC callback */ | 150 | /* set up RTC callback */ |
143 | rtc_task.func = rtctimer_interrupt; | 151 | rtc_task.func = rtctimer_interrupt; |
144 | rtc_task.private_data = timer; | 152 | rtc_task.private_data = &rtc_tasklet; |
145 | 153 | ||
146 | err = snd_timer_global_register(timer); | 154 | err = snd_timer_global_register(timer); |
147 | if (err < 0) { | 155 | if (err < 0) { |
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index 8058059c56e9..8bc4ffa6220d 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -956,6 +956,7 @@ static struct snd_emu_chip_details emu_chip_details[] = { | |||
956 | .ca0151_chip = 1, | 956 | .ca0151_chip = 1, |
957 | .spk71 = 1, | 957 | .spk71 = 1, |
958 | .spdif_bug = 1, | 958 | .spdif_bug = 1, |
959 | .adc_1361t = 1, /* 24 bit capture instead of 16bit. Fixes ALSA bug#324 */ | ||
959 | .ac97_chip = 1} , | 960 | .ac97_chip = 1} , |
960 | {.vendor = 0x1102, .device = 0x0004, .revision = 0x04, | 961 | {.vendor = 0x1102, .device = 0x0004, .revision = 0x04, |
961 | .driver = "Audigy2", .name = "Audigy 2 [Unknown]", | 962 | .driver = "Audigy2", .name = "Audigy 2 [Unknown]", |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0d728c6f697c..fb961448db19 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -5870,7 +5870,7 @@ static struct hda_board_config alc262_cfg_tbl[] = { | |||
5870 | { .pci_subvendor = 0x10cf, .pci_subdevice = 0x1397, | 5870 | { .pci_subvendor = 0x10cf, .pci_subdevice = 0x1397, |
5871 | .config = ALC262_FUJITSU }, | 5871 | .config = ALC262_FUJITSU }, |
5872 | { .modelname = "hp-bpc", .config = ALC262_HP_BPC }, | 5872 | { .modelname = "hp-bpc", .config = ALC262_HP_BPC }, |
5873 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x208c, | 5873 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x280c, |
5874 | .config = ALC262_HP_BPC }, /* xw4400 */ | 5874 | .config = ALC262_HP_BPC }, /* xw4400 */ |
5875 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x3014, | 5875 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x3014, |
5876 | .config = ALC262_HP_BPC }, /* xw6400 */ | 5876 | .config = ALC262_HP_BPC }, /* xw6400 */ |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 731b7b97ee71..fe51ef3e49d2 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -336,6 +336,13 @@ static struct hda_board_config stac9200_cfg_tbl[] = { | |||
336 | .pci_subvendor = PCI_VENDOR_ID_INTEL, | 336 | .pci_subvendor = PCI_VENDOR_ID_INTEL, |
337 | .pci_subdevice = 0x2668, /* DFI LanParty */ | 337 | .pci_subdevice = 0x2668, /* DFI LanParty */ |
338 | .config = STAC_REF }, | 338 | .config = STAC_REF }, |
339 | /* Dell laptops have BIOS problem */ | ||
340 | { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01b5, | ||
341 | .config = STAC_REF }, /* Dell Inspiron 630m */ | ||
342 | { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01c2, | ||
343 | .config = STAC_REF }, /* Dell Latitude D620 */ | ||
344 | { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01cb, | ||
345 | .config = STAC_REF }, /* Dell Latitude 120L */ | ||
339 | {} /* terminator */ | 346 | {} /* terminator */ |
340 | }; | 347 | }; |
341 | 348 | ||
@@ -591,13 +598,6 @@ static struct hda_board_config stac9205_cfg_tbl[] = { | |||
591 | .pci_subvendor = PCI_VENDOR_ID_INTEL, | 598 | .pci_subvendor = PCI_VENDOR_ID_INTEL, |
592 | .pci_subdevice = 0x2668, /* DFI LanParty */ | 599 | .pci_subdevice = 0x2668, /* DFI LanParty */ |
593 | .config = STAC_REF }, /* SigmaTel reference board */ | 600 | .config = STAC_REF }, /* SigmaTel reference board */ |
594 | /* Dell laptops have BIOS problem */ | ||
595 | { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01b5, | ||
596 | .config = STAC_REF }, /* Dell Inspiron 630m */ | ||
597 | { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01c2, | ||
598 | .config = STAC_REF }, /* Dell Latitude D620 */ | ||
599 | { .pci_subvendor = PCI_VENDOR_ID_DELL, .pci_subdevice = 0x01cb, | ||
600 | .config = STAC_REF }, /* Dell Latitude 120L */ | ||
601 | {} /* terminator */ | 601 | {} /* terminator */ |
602 | }; | 602 | }; |
603 | 603 | ||
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index c82b01c7ad3a..67202b9eeb77 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -1469,7 +1469,8 @@ static int snd_usb_hw_free(struct snd_pcm_substream *substream) | |||
1469 | subs->cur_audiofmt = NULL; | 1469 | subs->cur_audiofmt = NULL; |
1470 | subs->cur_rate = 0; | 1470 | subs->cur_rate = 0; |
1471 | subs->period_bytes = 0; | 1471 | subs->period_bytes = 0; |
1472 | release_substream_urbs(subs, 0); | 1472 | if (!subs->stream->chip->shutdown) |
1473 | release_substream_urbs(subs, 0); | ||
1473 | return snd_pcm_free_vmalloc_buffer(substream); | 1474 | return snd_pcm_free_vmalloc_buffer(substream); |
1474 | } | 1475 | } |
1475 | 1476 | ||