Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/arch/xen/xen
Jean-Yves Migeon <jeanyves.migeon%free.fr@localhost> wrote:
> On 18.04.2011 05:04, Mindaugas Rasiukevicius wrote:
> > Module Name: src
> > Committed By: rmind
> > Date: Mon Apr 18 03:04:31 UTC 2011
> >
> > Modified Files:
> > src/sys/arch/xen/xen: balloon.c
> >
> > Log Message:
> > balloon_xenbus_attach: use KM_SLEEP for allocation.
> >
> > Note: please do not use KM_NOSLEEP.
>
> Ah yes, forgot about this one, thanks.
>
> Although I am still unsure about the check, in-kernel NULL deref is...
> problematic.
>
> I am not so sure whether it is safe to assume non-NULL return if caller
> can sleep. It's something that ought to be specified for all available
> memoryallocators(9) especially as the code behind can evolve (hey, Lars
> :) ).
>
We used to check the return of big size allocations, when kmem(9) could
fail even with KM_SLEEP due to KVA starvation. However, pretty much all
kernel does not perform checks for smaller allocations and since the bug
was fixed - we are no longer checking for big ones as well.
This applies to all allocators.
--
Mindaugas
Home |
Main Index |
Thread Index |
Old Index