Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 May 2016 15:06:13 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Kristof Provost <kp@FreeBSD.org>, 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:  <2013f2c5-94f0-6e1d-0a58-a4a33005e74d@FreeBSD.org>
In-Reply-To: <0C9937A7-792B-4339-ACF9-F5D7D3C3A85A@FreeBSD.org>
References:  <201605180435.u4I4ZwYh025096@repo.freebsd.org> <0C9937A7-792B-4339-ACF9-F5D7D3C3A85A@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 19/05/2016 14:37, Kristof Provost wrote:
> 
> 
> 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.

Alexander has just committed r300201.  It should help.

> 
>> 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
> 


-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2013f2c5-94f0-6e1d-0a58-a4a33005e74d>