diff options
-rw-r--r-- | arch/i386/kernel/cpu/mtrr/main.c | 5 | ||||
-rw-r--r-- | drivers/spi/spi.c | 2 | ||||
-rw-r--r-- | fs/ioctl.c | 14 |
3 files changed, 16 insertions, 5 deletions
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c index 1cf466df330a..7202b98aac4f 100644 --- a/arch/i386/kernel/cpu/mtrr/main.c +++ b/arch/i386/kernel/cpu/mtrr/main.c | |||
@@ -734,10 +734,13 @@ void mtrr_ap_init(void) | |||
734 | */ | 734 | */ |
735 | void mtrr_save_state(void) | 735 | void mtrr_save_state(void) |
736 | { | 736 | { |
737 | if (smp_processor_id() == 0) | 737 | int cpu = get_cpu(); |
738 | |||
739 | if (cpu == 0) | ||
738 | mtrr_save_fixed_ranges(NULL); | 740 | mtrr_save_fixed_ranges(NULL); |
739 | else | 741 | else |
740 | smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1); | 742 | smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1); |
743 | put_cpu(); | ||
741 | } | 744 | } |
742 | 745 | ||
743 | static int __init mtrr_init_finialize(void) | 746 | static int __init mtrr_init_finialize(void) |
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index c3219b29b5ac..4831edbae2d5 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
@@ -411,7 +411,7 @@ EXPORT_SYMBOL_GPL(spi_alloc_master); | |||
411 | */ | 411 | */ |
412 | int spi_register_master(struct spi_master *master) | 412 | int spi_register_master(struct spi_master *master) |
413 | { | 413 | { |
414 | static atomic_t dyn_bus_id = ATOMIC_INIT((1<<16) - 1); | 414 | static atomic_t dyn_bus_id = ATOMIC_INIT((1<<15) - 1); |
415 | struct device *dev = master->cdev.dev; | 415 | struct device *dev = master->cdev.dev; |
416 | int status = -ENODEV; | 416 | int status = -ENODEV; |
417 | int dynamic = 0; | 417 | int dynamic = 0; |
diff --git a/fs/ioctl.c b/fs/ioctl.c index 479c1038ed4a..8c90cbc903fa 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
13 | #include <linux/security.h> | 13 | #include <linux/security.h> |
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/kallsyms.h> | ||
15 | 16 | ||
16 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
17 | #include <asm/ioctls.h> | 18 | #include <asm/ioctls.h> |
@@ -20,6 +21,7 @@ static long do_ioctl(struct file *filp, unsigned int cmd, | |||
20 | unsigned long arg) | 21 | unsigned long arg) |
21 | { | 22 | { |
22 | int error = -ENOTTY; | 23 | int error = -ENOTTY; |
24 | void *f; | ||
23 | 25 | ||
24 | if (!filp->f_op) | 26 | if (!filp->f_op) |
25 | goto out; | 27 | goto out; |
@@ -29,10 +31,16 @@ static long do_ioctl(struct file *filp, unsigned int cmd, | |||
29 | if (error == -ENOIOCTLCMD) | 31 | if (error == -ENOIOCTLCMD) |
30 | error = -EINVAL; | 32 | error = -EINVAL; |
31 | goto out; | 33 | goto out; |
32 | } else if (filp->f_op->ioctl) { | 34 | } else if ((f = filp->f_op->ioctl)) { |
33 | lock_kernel(); | 35 | lock_kernel(); |
34 | error = filp->f_op->ioctl(filp->f_path.dentry->d_inode, | 36 | if (!filp->f_op->ioctl) { |
35 | filp, cmd, arg); | 37 | printk("%s: ioctl %p disappeared\n", __FUNCTION__, f); |
38 | print_symbol("symbol: %s\n", (unsigned long)f); | ||
39 | dump_stack(); | ||
40 | } else { | ||
41 | error = filp->f_op->ioctl(filp->f_path.dentry->d_inode, | ||
42 | filp, cmd, arg); | ||
43 | } | ||
36 | unlock_kernel(); | 44 | unlock_kernel(); |
37 | } | 45 | } |
38 | 46 | ||