Commit 9e18fcdd authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] Remove compat ioctl semaphore

Originally for 2.6.16, but the semaphore causes problems for some
people so get rid of it now.

It's not needed anymore because the ioctl hash table is never changed
at run time now.
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e6c66759
...@@ -268,7 +268,6 @@ out: ...@@ -268,7 +268,6 @@ out:
#define IOCTL_HASHSIZE 256 #define IOCTL_HASHSIZE 256
static struct ioctl_trans *ioctl32_hash_table[IOCTL_HASHSIZE]; static struct ioctl_trans *ioctl32_hash_table[IOCTL_HASHSIZE];
static DECLARE_RWSEM(ioctl32_sem);
extern struct ioctl_trans ioctl_start[]; extern struct ioctl_trans ioctl_start[];
extern int ioctl_table_size; extern int ioctl_table_size;
...@@ -390,14 +389,10 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, ...@@ -390,14 +389,10 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
break; break;
} }
/* When register_ioctl32_conversion is finally gone remove
this lock! -AK */
down_read(&ioctl32_sem);
for (t = ioctl32_hash_table[ioctl32_hash(cmd)]; t; t = t->next) { for (t = ioctl32_hash_table[ioctl32_hash(cmd)]; t; t = t->next) {
if (t->cmd == cmd) if (t->cmd == cmd)
goto found_handler; goto found_handler;
} }
up_read(&ioctl32_sem);
if (S_ISSOCK(filp->f_dentry->d_inode->i_mode) && if (S_ISSOCK(filp->f_dentry->d_inode->i_mode) &&
cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
...@@ -417,11 +412,9 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, ...@@ -417,11 +412,9 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
lock_kernel(); lock_kernel();
error = t->handler(fd, cmd, arg, filp); error = t->handler(fd, cmd, arg, filp);
unlock_kernel(); unlock_kernel();
up_read(&ioctl32_sem);
goto out_fput; goto out_fput;
} }
up_read(&ioctl32_sem);
do_ioctl: do_ioctl:
error = vfs_ioctl(filp, fd, cmd, arg); error = vfs_ioctl(filp, fd, cmd, arg);
out_fput: out_fput:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment