Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > muc.lists.netbsd.source-changes > #156248

Re: CVS commit: src/sys/dev/usb

From Greg Troxel <gdt@lexort.com>
Newsgroups muc.lists.netbsd.source-changes
Subject Re: CVS commit: src/sys/dev/usb
Date 2026-10-24 10:37 -0400
Organization Newsgate at muc.de e.V.
Message-ID <rmijyn788ra.fsf@s1.lexort.com> (permalink)
References <> <6BE76039-D038-4D33-9E1C-84A5385FD48F@me.com>

Show all headers | View raw


Jason Thorpe <thorpej@me.com> writes:

>> On Oct 22, 2026, at 7:23 PM, Taylor R Campbell <riastradh@netbsd.org> wrote:
>> 
>> I think this change may not be correct.  I don't think pool_cache_get
>> respects PR_ZERO.  Perhaps we should add an assertion about this and
>> audit the system for it (or make it work by judiciously adding a
>> memset if PR_ZERO is passed).
>
> pool_cache_get() is intended to return constructed objects.  I guess making it support PR_ZERO is OK so long as the cache doesn’t specify a constructor function, and should blow up on incompatible arguments if it does have one.

That's a really good point.  I had forgotten the wisdom of the original
papers.

I wonder if it's basically an error to have a pool cache without a
constructor (semantically).    I suppose "all zeros if there is no
constructor" is perhaps a reasonable sort-of-constructor, as in "safe
state before real construction".

What does openindiana/illumos  do here?


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de

Back to muc.lists.netbsd.source-changes | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: CVS commit: src/sys/dev/usb Greg Troxel <gdt@lexort.com> - 2026-10-24 10:37 -0400
  Re: CVS commit: src/sys/dev/usb Jason Thorpe <thorpej@me.com> - 2026-10-24 10:46 -0400
    Re: CVS commit: src/sys/dev/usb Greg Troxel <gdt@lexort.com> - 2026-10-24 13:32 -0400

csiph-web