Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 May 2016 17:07:48 +0530
From:      "Kristof Provost" <kp@FreeBSD.org>
To:        "Scott Long" <scottl@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r300113 - in head/sys: conf kern net sys
Message-ID:  <0C9937A7-792B-4339-ACF9-F5D7D3C3A85A@FreeBSD.org>
In-Reply-To: <201605180435.u4I4ZwYh025096@repo.freebsd.org>
References:  <201605180435.u4I4ZwYh025096@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On 18 May 2016, at 10:05, Scott Long wrote:

> Author: scottl
> Date: Wed May 18 04:35:58 2016
> New Revision: 300113
> URL: https://svnweb.freebsd.org/changeset/base/300113
>
> Log:
>   Import the 'iflib' API library for network drivers.  From the 
> author:

For reasons I don’t understand right now this appears to break boot on 
my T61.
It’s got an em NIC (82566MM) and is running root-on-zfs, if that 
matters.

It mounts the rootfs and then just freezes. I’m investigating, but 
would appreciate any hints or thoughts.


> Modified: head/sys/kern/subr_taskqueue.c
> ==============================================================================
> --- head/sys/kern/subr_taskqueue.c	Wed May 18 04:04:14 2016	(r300112)
> +++ head/sys/kern/subr_taskqueue.c	Wed May 18 04:35:58 2016	(r300113)
> @@ -119,11 +123,17 @@ TQ_SLEEP(struct taskqueue *tq, void *p,
>  }
>
>  static struct taskqueue *
> -_taskqueue_create(const char *name __unused, int mflags,
> +_taskqueue_create(const char *name, int mflags,
>  		 taskqueue_enqueue_fn enqueue, void *context,
> -		 int mtxflags, const char *mtxname)
> +		 int mtxflags, const char *mtxname __unused)
>  {
>  	struct taskqueue *queue;
> +	char *tq_name = NULL;
> +
> +	if (name != NULL)
> +		tq_name = strndup(name, 32, M_TASKQUEUE);
> +	if (tq_name == NULL)
> +		tq_name = "taskqueue";

This looks wrong. It’s later free()ed.

>
> @@ -194,6 +206,7 @@ taskqueue_free(struct taskqueue *queue)
>  	KASSERT(queue->tq_callouts == 0, ("Armed timeout tasks"));
>  	mtx_destroy(&queue->tq_mutex);
>  	free(queue->tq_threads, M_TASKQUEUE);
> +	free(queue->tq_name, M_TASKQUEUE);

This potentially frees a constant pointer.

Regards,
Kristof



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0C9937A7-792B-4339-ACF9-F5D7D3C3A85A>