diff options
Diffstat (limited to 'fs/ioctl.c')
-rw-r--r-- | fs/ioctl.c | 14 |
1 files changed, 11 insertions, 3 deletions
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 | ||