mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
SUNRPC: Add an IS_ERR() check back to where it was
[ Upstream commit 4f3ed837186fc0d2722ba8d2457a594322e9c2ef ] This IS_ERR() check was deleted during in a cleanup because, at the time, the rpcb_call_async() function could not return an error pointer. That changed in commit25cf32ad5d
("SUNRPC: Handle allocation failure in rpc_new_task()") and now it can return an error pointer. Put the check back. A related revert was done in commit13bd901418
("Revert "SUNRPC: Remove unreachable error condition""). Fixes:037e910b52
("SUNRPC: Remove unreachable error condition in rpcb_getport_async()") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ec80921907
commit
4069da49f8
1 changed files with 4 additions and 0 deletions
|
@ -769,6 +769,10 @@ void rpcb_getport_async(struct rpc_task *task)
|
|||
|
||||
child = rpcb_call_async(rpcb_clnt, map, proc);
|
||||
rpc_release_client(rpcb_clnt);
|
||||
if (IS_ERR(child)) {
|
||||
/* rpcb_map_release() has freed the arguments */
|
||||
return;
|
||||
}
|
||||
|
||||
xprt->stat.bind_count++;
|
||||
rpc_put_task(child);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue