From owner-freebsd-current Mon Jun 26 11:20:00 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id LAA26432 for current-outgoing; Mon, 26 Jun 1995 11:20:00 -0700 Received: from cs.weber.edu (cs.weber.edu [137.190.16.16]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id LAA26426 for ; Mon, 26 Jun 1995 11:19:56 -0700 Received: by cs.weber.edu (4.1/SMI-4.1.1) id AA28518; Mon, 26 Jun 95 12:12:54 MDT From: terry@cs.weber.edu (Terry Lambert) Message-Id: <9506261812.AA28518@cs.weber.edu> Subject: Re: bug in Linux^H^H^H^H^HDoom Emulator To: peter@haywire.DIALix.COM (Peter Wemm) Date: Mon, 26 Jun 95 12:12:53 MDT Cc: current@freebsd.org In-Reply-To: from "Peter Wemm" at Jun 26, 95 10:50:06 pm X-Mailer: ELM [version 2.4dev PL52] Sender: current-owner@freebsd.org Precedence: bulk vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv DO NOT COMMIT THIS WITHOUT FURTHER CHANGES! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > *** linux_misc.c.dist Mon Jun 26 01:32:37 1995 > --- linux_misc.c Mon Jun 26 22:38:41 1995 > *************** > *** 188,194 **** > printf("Linux-emul(%d): uselib(%s)\n", p->p_pid, path); > #endif > > ! NDINIT(&ni, LOOKUP, FOLLOW, UIO_SYSSPACE, path, p); > if (error = namei(&ni)) > return error; > > --- 188,194 ---- > printf("Linux-emul(%d): uselib(%s)\n", p->p_pid, path); > #endif > > ! NDINIT(&ni, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, path, p); > if (error = namei(&ni)) > return error; > > *************** > *** 215,220 **** > --- 215,222 ---- > > if (error = VOP_OPEN(vnodep, FREAD, p->p_ucred, p)) > return error; > + > + VOP_UNLOCK(vnodep); /* lock no longer needed */ > > error = vm_mmap(kernel_map, (vm_offset_t *)&a_out, 1024, > VM_PROT_READ, VM_PROT_READ, 0, (caddr_t)vnodep, 0); At the *absolute* least: if (error = VOP_OPEN(vnodep, FREAD, p->p_ucred, p)) { VOP_UNLOCK(vnodep); /* lock no longer needed */ return error; } VOP_UNLOCK(vnodep); /* lock no longer needed */ Unfortunately, from context, I can't tell if there are other intervening error returns or not. If so, they need the same change! Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.