Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Jan 2003 13:51:54 -0600
From:      "Alan L. Cox" <alc@imimic.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Nate Lawson <nate@root.org>, cvs-committers@freebsd.org, cvs-all@freebsd.org, Alan Cox <alc@FreeBSD.org>
Subject:   Re: cvs commit: src/sys/nfsclient nfs_vnops.c
Message-ID:  <3E14985A.35AB67F4@imimic.com>
References:  <XFMail.20030102124236.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:
> ...
> Unless you use M_NOWAIT (highly undesirable in mose cases), you need to
> not hold locks across malloc() anyways as it can sleep.  One should be
> able to hold locks across free() without problems however.  I would rather
> require callers of the code in question to hold Giant for now rather than
> add in hacks that have to be cleaned up later on.
> 

In general, yes.  The vnode interlock is, however, a special case.  Any
form of malloc() or free() while holding a vnode interlock will cause a
reversal.  This stems from the intertwining of vm objects and vnodes.

Regards,
Alan

P.S. If someone knows a good place to document this, please do.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E14985A.35AB67F4>