Re: panic in altq

From: Max Laier <max_at_love2party.net>
Date: Mon, 21 Feb 2005 18:13:07 +0100
On Monday 21 February 2005 16:47, Divacky Roman wrote:
> I was seeing panics on boot when pf was enabled.
> this patch:
>
> Index: altq_subr.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/contrib/altq/altq/altq_subr.c,v
> retrieving revision 1.5
> diff -u -r1.5 altq_subr.c
> --- altq_subr.c	15 Jun 2004 23:59:37 -0000	1.5
> +++ altq_subr.c	21 Feb 2005 15:44:21 -0000
> _at__at_ -93,7 +93,7 _at__at_
>  int (*altq_input)(struct mbuf *, int) = NULL;
>  static struct mbuf *tbr_dequeue(struct ifaltq *, int);
>  static int tbr_timer = 0;	/* token bucket regulator timer */
> -static struct callout tbr_callout = CALLOUT_INITIALIZER;
> +static struct callout tbr_callout;
>
>  #ifdef ALTQ3_CLFIER_COMPAT
>  static int 	extract_ports4(struct mbuf *, struct ip *, struct flowinfo_in
> *); _at__at_ -155,6 +155,7 _at__at_
>  	void *(*classify)(void *, struct mbuf *, int);
>  {
>  	IFQ_LOCK(ifq);
> +	callout_init(&tbr_callout, 0);
>  	if (!ALTQ_IS_READY(ifq)) {
>  		IFQ_UNLOCK(ifq);
>  		return ENXIO;
>
>
> it completly solves (it used illegaly initialized callout, dunno hows
> possible it worked before)
>
> I hope for commiting this

Done with changes.  Thanks for the report.

-- 
/"\  Best regards,                      | mlaier_at_freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier_at_EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News

Received on Mon Feb 21 2005 - 16:13:43 UTC

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