Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 2009 08:23:33 +0300
From:      Andriy Gapon <avg@icyb.net.ua>
To:        Robert Noland <rnoland@FreeBSD.org>
Cc:        freebsd-hackers@FreeBSD.org, freebsd-acpi@FreeBSD.org
Subject:   Re: heci: a new driver for review and testing
Message-ID:  <4AD6B1D5.3010003@icyb.net.ua>
In-Reply-To: <1255555532.95374.147.camel@balrog.2hip.net>
References:  <4AD6067E.2010503@icyb.net.ua> <1255555532.95374.147.camel@balrog.2hip.net>

next in thread | previous in thread | raw e-mail | index | archive | help
on 15/10/2009 00:25 Robert Noland said the following:
> On Wed, 2009-10-14 at 20:12 +0300, Andriy Gapon wrote:
>> Some time ago I posted some ideas about HECI/MEI driver for FreeBSD:
>> http://docs.freebsd.org/cgi/mid.cgi?4968E9A1.3080006
>>
>> I actually got around to implementing it (in initial/basic form):
>> http://people.freebsd.org/~avg/heci.tgz
> 
> Your getting a WITNESS warning from malloc() while holding a lock at
> like 941 of heci.c
> 
>                 mec = (struct me_client *)malloc(sizeof(*mec), M_HECI,
>                     M_NOWAIT | M_ZERO);
> 
> fixes it.

Shame on me!
I have to admit that tested/used this module only on stable/7 (amd64) and
without WITNESS/INVARIANTS.
Thank you for catching this.
I guess I should also add a check for malloc returning NULL.

> It also locked up the machine when I tried to kldunload, but
> haven't identified a root cause of that.

Haven't seen it here.
I will try to investigate.

-- 
Andriy Gapon



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