Hi Mauricio, > The memory zone could be freed just after adding it to the metadata > file and just before marking it as not freeable. > This patch changes the locking logic in order to prevent it.
Just a nit: if the stated purpose of the patch is to prevent the memzone free before adding it to metadata, then it probably should check if the memzone wasn't freed before we got the lock (or if it's a valid memzone in the first place). Probably just checking if the virtual address of the memzone isn't 0 would be enough. Otherwise looks fine to me. Thanks, Anatoly