On Thu, Apr 13, 2023 at 10:43:30AM +0800, Kevin Lo wrote:
> M_CANFAIL
>      In the M_WAITOK case, if not enough memory is available,
>      return NULL instead of calling panic(9).  If mallocarray()

Did you see such a panic?  If yes it would be better to understand
and fix the root cause.

>      detects an overflow or malloc() detects an excessive
>      allocation, return NULL instead of calling panic(9).
> 
> 
> I'd like to keep the mallocarray call unchanged so I add M_CANFAIL 
> to the flags.

I think you are trying to change the kernel in the wrong direction.
It should not fail, but handle the requests.  Panic if there is a
bug.

Why do you think M_CANFAIL is a good thing at this place?

bluhm

Reply via email to