Patch "SUNRPC: Add an IS_ERR() check back to where it was" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    SUNRPC: Add an IS_ERR() check back to where it was

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     sunrpc-add-an-is_err-check-back-to-where-it-was.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1507cfe7c8a678d60cf2d002b372ca6e815dcf33
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Wed Oct 11 11:00:22 2023 +0300

    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 commit 25cf32ad5dba ("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 commit 13bd90141804 ("Revert "SUNRPC:
    Remove unreachable error condition"").
    
    Fixes: 037e910b52b0 ("SUNRPC: Remove unreachable error condition in rpcb_getport_async()")
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 5988a5c5ff3f0..102c3818bc54d 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -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);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux