patch-2.4.19 linux-2.4.19/arch/sparc64/solaris/ioctl.c
Next file: linux-2.4.19/arch/sparc64/solaris/misc.c
Previous file: linux-2.4.19/arch/sparc64/solaris/Makefile
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/sparc64/solaris/ioctl.c
- Orig date:
Tue Nov 28 21:53:44 2000
diff -urN linux-2.4.18/arch/sparc64/solaris/ioctl.c linux-2.4.19/arch/sparc64/solaris/ioctl.c
@@ -1,4 +1,4 @@
-/* $Id: ioctl.c,v 1.16 2000/11/18 02:10:59 davem Exp $
+/* $Id: ioctl.c,v 1.16.2.1 2002/03/03 23:41:26 davem Exp $
* ioctl.c: Solaris ioctl emulation.
*
* Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
@@ -289,11 +289,15 @@
{
struct inode *ino;
/* I wonder which of these tests are superfluous... --patrik */
+ read_lock(¤t->files->file_lock);
if (! current->files->fd[fd] ||
! current->files->fd[fd]->f_dentry ||
! (ino = current->files->fd[fd]->f_dentry->d_inode) ||
- ! ino->i_sock)
+ ! ino->i_sock) {
+ read_unlock(¤t->files->file_lock);
return TBADF;
+ }
+ read_unlock(¤t->files->file_lock);
switch (cmd & 0xff) {
case 109: /* SI_SOCKPARAMS */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)