--- linux-user/syscall.c.orig 2007-03-20 01:25:39.000000000 -0400 +++ linux-user/syscall.c 2007-03-20 02:32:39.000000000 -0400 @@ -2107,6 +2107,13 @@ switch(cmd) { case TARGET_F_GETLK: + lock_user_struct(target_fl, arg, 1); + fl.l_type = tswap16(target_fl->l_type); + fl.l_whence = tswap16(target_fl->l_whence); + fl.l_start = tswapl(target_fl->l_start); + fl.l_len = tswapl(target_fl->l_len); + fl.l_pid = tswapl(target_fl->l_pid); + unlock_user_struct(target_fl, arg, 0); ret = fcntl(fd, cmd, &fl); if (ret == 0) { lock_user_struct(target_fl, arg, 0);