Patch "SUNRPC: Fix missing release socket in rpc_sockname()" has been added to the 4.9-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: Fix missing release socket in rpc_sockname()

to the 4.9-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-fix-missing-release-socket-in-rpc_sockname.patch
and it can be found in the queue-4.9 subdirectory.

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



commit 53871bc770120f3186cddd73dbe63b66ee3fa93e
Author: Wang ShaoBo <bobo.shaobowang@xxxxxxxxxx>
Date:   Thu Nov 24 17:23:42 2022 +0800

    SUNRPC: Fix missing release socket in rpc_sockname()
    
    [ Upstream commit 50fa355bc0d75911fe9d5072a5ba52cdb803aff7 ]
    
    socket dynamically created is not released when getting an unintended
    address family type in rpc_sockname(), direct to out_release for calling
    sock_release().
    
    Fixes: 2e738fdce22f ("SUNRPC: Add API to acquire source address")
    Signed-off-by: Wang ShaoBo <bobo.shaobowang@xxxxxxxxxx>
    Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index eef2f732fbe3..9447670b5a63 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1275,7 +1275,7 @@ static int rpc_sockname(struct net *net, struct sockaddr *sap, size_t salen,
 		break;
 	default:
 		err = -EAFNOSUPPORT;
-		goto out;
+		goto out_release;
 	}
 	if (err < 0) {
 		dprintk("RPC:       can't bind UDP socket (%d)\n", err);



[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