Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57321
b: refs/heads/master
c: 4acbab8
h: refs/heads/master
i:
  57319: 6dd95fd
v: v3
  • Loading branch information
Linus Torvalds committed Jun 4, 2007
1 parent b4ca686 commit e22c07b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 899b69d079713d0f568fb2700b86987aa94f29b2
refs/heads/master: 4acbab84688bfea82322c14e809fc7d82242cee3
5 changes: 4 additions & 1 deletion trunk/arch/i386/kernel/cpu/mtrr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,10 +734,13 @@ void mtrr_ap_init(void)
*/
void mtrr_save_state(void)
{
if (smp_processor_id() == 0)
int cpu = get_cpu();

if (cpu == 0)
mtrr_save_fixed_ranges(NULL);
else
smp_call_function_single(0, mtrr_save_fixed_ranges, NULL, 1, 1);
put_cpu();
}

static int __init mtrr_init_finialize(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ EXPORT_SYMBOL_GPL(spi_alloc_master);
*/
int spi_register_master(struct spi_master *master)
{
static atomic_t dyn_bus_id = ATOMIC_INIT((1<<16) - 1);
static atomic_t dyn_bus_id = ATOMIC_INIT((1<<15) - 1);
struct device *dev = master->cdev.dev;
int status = -ENODEV;
int dynamic = 0;
Expand Down
14 changes: 11 additions & 3 deletions trunk/fs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/fs.h>
#include <linux/security.h>
#include <linux/module.h>
#include <linux/kallsyms.h>

#include <asm/uaccess.h>
#include <asm/ioctls.h>
Expand All @@ -20,6 +21,7 @@ static long do_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg)
{
int error = -ENOTTY;
void *f;

if (!filp->f_op)
goto out;
Expand All @@ -29,10 +31,16 @@ static long do_ioctl(struct file *filp, unsigned int cmd,
if (error == -ENOIOCTLCMD)
error = -EINVAL;
goto out;
} else if (filp->f_op->ioctl) {
} else if ((f = filp->f_op->ioctl)) {
lock_kernel();
error = filp->f_op->ioctl(filp->f_path.dentry->d_inode,
filp, cmd, arg);
if (!filp->f_op->ioctl) {
printk("%s: ioctl %p disappeared\n", __FUNCTION__, f);
print_symbol("symbol: %s\n", (unsigned long)f);
dump_stack();
} else {
error = filp->f_op->ioctl(filp->f_path.dentry->d_inode,
filp, cmd, arg);
}
unlock_kernel();
}

Expand Down

0 comments on commit e22c07b

Please sign in to comment.