Re: Question about cd10c42eb5bc ("mem: fix ivshmem freeing")
From: Mauricio Vásquez <hidden>
Date: 2016-03-30 09:13:17
Hi Anatoly, Thank you very much, I did not take into account that detail. I have two additional concerns about it: 1. I think it is possible to have a race condition. The memzone is marked as not freeable after it has been added to the ivshmem device, then it is possible to free the memzone just after it has been added to the metadata but before it is marked as not freeable. Shouldn't the memzone be marked before adding the memzone to the ivshmem device? 2. Are the #ifdefs necessary?, we already are in a file that will only compiled when ivshmem is enabled. Thanks, Mauricio Vasquez, On Wed, Mar 30, 2016 at 10:29 AM, Burakov, Anatoly < anatoly.burakov@intel.com> wrote:
Hi Mauricio,
You’re not missing anything. It would be done this way, if the memzone
parameter wasn’t const. But it is const, so we have to find the memzone in
config to edit it.
Thanks,
Anatoly
*From:* Mauricio Vásquez [mailto:mauricio.vasquezbernal@studenti.polito.it]
*Sent:* Wednesday, March 30, 2016 9:22 AM
*To:* dev@dpdk.org
*Cc:* Gonzalez Monroy, Sergio [off-list ref];
Richardson, Bruce [off-list ref]; Burakov, Anatoly <
anatoly.burakov@intel.com>
*Subject:* Question about cd10c42eb5bc ("mem: fix ivshmem freeing")
Dear All,
I was looking at that patch, I can understand its functionality but not
its implementation..
Why to calculate idx?, Just doing "mz->ioremap_addr = mz->phys_addr" would
not be sufficient? After all, the goal is to mark the memzone as used by
ivshmem to forbid freeing it.
Please corrected if I am missing something.
Thank you,
Mauricio Vasquez,