Instead of invoking a synchronize_rcu() to free a pointer
after a grace period we can directly make use of new API
that does the same but in more efficient way.
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Link: https://lore.kernel.org/r/20211215111845.2514-6-urezki@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
        }
        spin_unlock(&context->lock);
 
-       if (found) {
-               synchronize_rcu();
-               kfree(notifier);
-       }
+       if (found)
+               kvfree_rcu(notifier);
 
        vmci_ctx_put(context);
 
 
        if (!s)
                return VMCI_ERROR_NOT_FOUND;
 
-       synchronize_rcu();
-       kfree(s);
+       kvfree_rcu(s);
 
        return VMCI_SUCCESS;
 }