Pinning GPU memory for RDMA failed

I am trying to transfer data from one linux-machine directly to the GPU-memory of another linux-machine, using GPUdirect.
I am using ibverbs API. I passed a buffer on the GPU-memory (allocated by cudaMalloc) to the function ibv_reg_mr and it failed to register the memory-region (returned NULL).
My configuration: CUDA 11.6, nvidia-peermem is loaded, MLNX-OFED 4.9 installed, the GPU is RTX-5000, the two machines are connected with Mellanox Connectx3-Pro.
When I transfer data to the CPU memory it works fine. The problem is with registering GPU memory.

Can someone explain me how to fix it?
Thanks a lot,

Problem solved after updating the nvidia driver