Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2005 17:10:24 GMT
From:      Victor Snezhko <snezhko@indorsoft.ru>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/88725: /usr/sbin/ppp panic with 2005.10.21 netinet6 changes
Message-ID:  <200511101710.jAAHAOoE064165@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/88725; it has been noted by GNATS.

From: Victor Snezhko <snezhko@indorsoft.ru>
To: Mark Tinguely <tinguely@casselton.net>
Cc: bug-followup@freebsd.org, max@love2party.net,
	  freebsd-current@freebsd.org,  Max@freebsd.org
Subject: Re: kern/88725: /usr/sbin/ppp panic with 2005.10.21 netinet6
 changes
Date: Thu, 10 Nov 2005 23:02:47 +0600

 Mark Tinguely <tinguely@casselton.net> writes:
 
 > As a postscript:
 >
 >  The problem was a dynamic timer was freed without being stopped first.
 >  Obviously, the printf() should be removed from the final fix.
 >
 >  After this discovery, I went through all of the callout_init() calls
 >  in the kernel and looked at those that may be freed before possibly
 >  being stopped. Beside the one in netinet6/mld6.c, I have 5 more
 >  that initially look like the memory for the callout struction could
 >  also be freed and still not have been stopped. These paths are problably
 >  not traveled much (detaches for less mainstream components), but stopping
 >  the callout is cheap and not at all risky.
 
 Not risky? I'm not an expert, but I think there might be issues when
 callout is stopped at the moment when on-timer function is executed
 (I see the following bad scenario: timer function begins to execute,
 then we call callout_stop(), then free all the necessary data
 structures and then control returns to the timer proc which could
 depend on the structures that are already freed)
 
 I.e. in each case we should check if callout_stop don't harm.
 
 On the other hand, callout_drain could introduce lock order issues (as
 John Baldwin pointed).
 
 >  I will look at the 5 cases again and suggest all of these callout at
 >  risk be stopped under the same fix.
 
 -- 
 WBR, Victor V. Snezhko
 EMail: snezhko@indorsoft.ru
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511101710.jAAHAOoE064165>