diff options
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/solaris/ioctl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/sparc64/solaris/ioctl.c b/arch/sparc64/solaris/ioctl.c index 374766455f5e..be0a054e3ed6 100644 --- a/arch/sparc64/solaris/ioctl.c +++ b/arch/sparc64/solaris/ioctl.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/netdevice.h> | 24 | #include <linux/netdevice.h> |
25 | #include <linux/mtio.h> | 25 | #include <linux/mtio.h> |
26 | #include <linux/time.h> | 26 | #include <linux/time.h> |
27 | #include <linux/rcupdate.h> | ||
27 | #include <linux/compat.h> | 28 | #include <linux/compat.h> |
28 | 29 | ||
29 | #include <net/sock.h> | 30 | #include <net/sock.h> |
@@ -295,16 +296,16 @@ static inline int solaris_sockmod(unsigned int fd, unsigned int cmd, u32 arg) | |||
295 | struct inode *ino; | 296 | struct inode *ino; |
296 | struct fdtable *fdt; | 297 | struct fdtable *fdt; |
297 | /* I wonder which of these tests are superfluous... --patrik */ | 298 | /* I wonder which of these tests are superfluous... --patrik */ |
298 | spin_lock(¤t->files->file_lock); | 299 | rcu_read_lock(); |
299 | fdt = files_fdtable(current->files); | 300 | fdt = files_fdtable(current->files); |
300 | if (! fdt->fd[fd] || | 301 | if (! fdt->fd[fd] || |
301 | ! fdt->fd[fd]->f_dentry || | 302 | ! fdt->fd[fd]->f_dentry || |
302 | ! (ino = fdt->fd[fd]->f_dentry->d_inode) || | 303 | ! (ino = fdt->fd[fd]->f_dentry->d_inode) || |
303 | ! S_ISSOCK(ino->i_mode)) { | 304 | ! S_ISSOCK(ino->i_mode)) { |
304 | spin_unlock(¤t->files->file_lock); | 305 | rcu_read_unlock(); |
305 | return TBADF; | 306 | return TBADF; |
306 | } | 307 | } |
307 | spin_unlock(¤t->files->file_lock); | 308 | rcu_read_unlock(); |
308 | 309 | ||
309 | switch (cmd & 0xff) { | 310 | switch (cmd & 0xff) { |
310 | case 109: /* SI_SOCKPARAMS */ | 311 | case 109: /* SI_SOCKPARAMS */ |