suspicious lock code in sys_sunos.c and sys_sunos32.c

Todd Sabin (tastas@home.com)
Sun, 23 May 1999 14:41:40 -0400


I was just grepping the 2.3.3 kernel for lock_kernel() and stumbled upon this
code:

in arch/sparc/kernel/sys_sunos.c:

asmlinkage int sunos_readv(unsigned long fd, const struct iovec * vector, long count)
{
int ret;

lock_kernel();
ret = check_nonblock(sys_readv(fd,vector,count),fd);
lock_kernel();
return ret;
}

and in arch/sparc64/kernel/sys_sunos32.c

asmlinkage int sunos_readv(u32 fd, u32 vector, s32 count)
{
int ret;

lock_kernel();
ret = check_nonblock(sys32_readv(fd, vector, count), fd);
lock_kernel();
return ret;
}

Both of which look rather suspicious, so I thought I'd let ppl know. I
don't really understand the locking code, but this certainly looks wrong.

Todd

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/