tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kmem_alloc(0, f)



martin%duskware.de@localhost (Martin Husemann) writes:

>On Sat, Jul 29, 2017 at 02:04:42PM +0000, Taylor R Campbell wrote:
>> This seems like a foot-oriented panic gun, and it's been a source of
>> problems in the past.  Can we change it?

>I think it is a valuable tool to catch driver bugs early during
>developement, but wouldn't mind to reduce it to a KASSERT.

So what does kmem_alloc(0, KM_SLEEP) do? fail where KM_SLEEP says it
cannot fail? I don't think that it can return a zero sized allocation
(i.e. ptr != NULL that cannot be dereferenced).

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index