Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57318
b: refs/heads/master
c: 78ae87c
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Jun 4, 2007
1 parent 3bde0d6 commit 534775c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 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: 4c738480d21a190e3d99c7ce985ab9484f373a3c
refs/heads/master: 78ae87c3cd723c8a8dcd67d4e4cbc6d63671c108
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 534775c

Please sign in to comment.