>>> On 16.12.14 at 21:28, <andrew.coop...@citrix.com> wrote: > On 16/12/14 19:33, Mihai Donțu wrote: >> +static bool_t __xmem_pool_check_locked(const char *file, int line, >> + const struct xmem_pool *pool) >> +{ >> + unsigned int i; >> + static bool_t once = 1; > > What is this static doing? Surely corruption corruption in one pool has > no effect on corruption in a separate pool (other than the usual side > effects of general memory corruption, which tend to be bad). > > It looks as if it wants to be an extra field in an xmem_pool.
Question is whether logging more than the first corruption ever is really all that useful. >> +bool_t __xmem_pool_check(const char *file, int line, struct xmem_pool *pool) >> +{ >> + return __xmem_pool_check_unlocked(file, line, pool ?: xenpool); > > Why should a NULL pool be tolerated here? This is debug code only, so > we can require and trust that we are called appropriately. xenpool is not and should not be visible to code outside this file. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel