Re: ng_ksocket on CURRENT

From: Robert Watson <rwatson_at_freebsd.org>
Date: Mon, 5 Jul 2004 14:19:30 -0400 (EDT)
On Mon, 5 Jul 2004, Gleb Smirnoff wrote:

> yes, this thread is originating from a callout. Actually, it is
> impossible to reproduce this as I described in previous letter. Sorry. 
> 
> So you suggest to lock Giant in a callout handle? Or should we somewhat
> tweak ng_ksocket? 

Depends on the callout, but if it's a network-specific callout, I'd
suggest having callout_init() use the following logic to build the flags
field:

	debug_mpsafenet ? CALLOUT_MPSAFE : 0

I.e., if we're running without debug.mpsafenet turned on, then run the
callout with Giant.  If the callout does a lot of other stuff, I'd acquire
Giant conditionally (as your patch does) just around the network bits.
That said, I'd have Giant include all the netgraph bits, not just the
socket bits.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert_at_fledge.watson.org      Principal Research Scientist, McAfee Research
Received on Mon Jul 05 2004 - 16:20:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:00 UTC