Skip to contentSkip to conversation

SUNRPC: Rebalance a kref in auth_gss.c

PATCH New Chuck Lever 1 participant 1 message May 9, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SUNRPC: Rebalance a kref in auth_gss.c

Restore the kref_get that matches the gss_put_auth(gss_msg->auth) done by gss_release_msg().

Fixes ac83228a7101 ("SUNRPC: Use namespace of listening daemon ...")
---
 net/sunrpc/auth_gss/auth_gss.c |    1 +
 1 file changed, 1 insertion(+)
net/sunrpc/auth_gss/auth_gss.c +1 -0
index 06fe17c..4ce42c6 100644
@@ -551,6 +551,7 @@ static int gss_encode_v1_msg(struct gss_upcall_msg *gss_msg,
 	refcount_set(&gss_msg->count, 1);
 	gss_msg->uid = uid;
 	gss_msg->auth = gss_auth;
+	kref_get(&gss_auth->kref);
 	if (service_name) {
 		gss_msg->service_name = kstrdup_const(service_name, GFP_NOFS);
 		if (!gss_msg->service_name) {