*BSD News Article 15046


Return to BSD News archive

Xref: sserve comp.bugs.4bsd:1943 comp.os.386bsd.bugs:550
Newsgroups: comp.bugs.4bsd,comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!cass.ma02.bull.com!think.com!ames!elroy.jpl.nasa.gov!sdd.hp.com!cs.utexas.edu!wotan.compaq.com!hackney
From: hackney@wotan.compaq.com (Greg Hackney)
Subject: Re: flock broken - I could use some help
Message-ID: <1993Apr24.033044.28033@wotan.compaq.com>
Organization: Compaq Computer Corporation
References: <C5t8wH.Hs@moxie.hou.tx.us> <1993Apr21.184636.1121@cs.few.eur.nl> <C5yDEn.JCt@ns1.nodak.edu>
Date: Sat, 24 Apr 1993 03:30:44 GMT
Lines: 33

In article <C5yDEn.JCt@ns1.nodak.edu> tinguely@plains.NoDak.edu (Mark Tinguely) writes:

> I could not cause my machine to panic again after installing this change.
> I sent it also to Greg Hackney to test before releasing it.

I'm not knowledgeable enough to say whether this is the ultimate fix or not,
but I will say that your one-line patch seems to work just fine, and my flock()
kernel panics stopped completely. Kudos Mark and Paul!
--
Greg

>*** /sys/ufs/ufs_lockf.c.orig	Fri Apr 23 14:02:27 1993
>--- /sys/ufs/ufs_lockf.c	Fri Apr 23 14:35:36 1993
>***************
>*** 155,161 ****
>  		}
>  #endif /* LOCKF_DEBUG */
>  		if (error = tsleep((caddr_t)lock, priority, lockstr, 0)) {
>! 			free(lock, M_LOCKF);
>  			return (error);
>  		}
>  	}
>--- 155,162 ----
>  		}
>  #endif /* LOCKF_DEBUG */
>  		if (error = tsleep((caddr_t)lock, priority, lockstr, 0)) {
>! 			/* free(lock, M_LOCKF); */
>! 			(void) lf_clearlock(lock);
>  			return (error);
>  		}
>  	}