[MTHCA] bugfix: data corruption while registering MR
If a buffer to be registered overlaps a buffer, already registered, a race can happen between HCA, writing to the previously registered buffer and the probing functions (MmProbeAndLockPages, MmSecureVirtualMemory), used in the algorithm of memory registration.
To prevent the race we maintain reference counters for the physical pages, being registered, and register every physical page FOR THE WRITE ACCESS only once.
git-svn-id: svn://openib.tc.cornell.edu/gen1@501
ad392aa1-c5ef-ae45-8dd8-
e69d62a5ef86