contigmem: do not zero pages during each mmap
authorTiwei Bie <tiwei.bie@intel.com>
Sun, 4 Jun 2017 05:53:24 +0000 (13:53 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 3 Jul 2017 23:32:57 +0000 (01:32 +0200)
Don't zero the pages during each mmap. Instead, only zero the pages
when they are not already mmapped. Otherwise, the multi-process
support will be broken, as the pages will be zeroed when secondary
processes map the memory. Besides, track the open and mmap operations
on the cdev, and prevent the module from being unloaded when it is
still in use.

Fixes: 82f931805506 ("contigmem: zero all pages during mmap")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

No differences found