提交 11588f49 编写于 作者: B Bryan Schumaker 提交者: Trond Myklebust

NFS: Check return value from rpc_queue_upcall()

This function could fail to queue the upcall if rpc.idmapd is not running,
causing a warning message to be printed.  Instead, I want to check the
return value and revoke the key if the upcall can't be run.
Signed-off-by: NBryan Schumaker <bjschuma@netapp.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 4b7c8dd2
...@@ -656,14 +656,19 @@ static int nfs_idmap_legacy_upcall(struct key_construction *cons, ...@@ -656,14 +656,19 @@ static int nfs_idmap_legacy_upcall(struct key_construction *cons,
idmap->idmap_key_cons = cons; idmap->idmap_key_cons = cons;
return rpc_queue_upcall(idmap->idmap_pipe, msg); ret = rpc_queue_upcall(idmap->idmap_pipe, msg);
if (ret < 0)
goto out2;
return ret;
out2: out2:
kfree(im); kfree(im);
out1: out1:
kfree(msg); kfree(msg);
out0: out0:
complete_request_key(cons, ret); key_revoke(cons->key);
key_revoke(cons->authkey);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册