Patch "net/tipc: fix missing destroy_workqueue() on error in tipc_crypto_start()" has been added to the 5.10-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

    net/tipc: fix missing destroy_workqueue() on error in tipc_crypto_start()

to the 5.10-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:
     net-tipc-fix-missing-destroy_workqueue-on-error-in-t.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 1085131e670a1dcefe556f9646d38cdc267cb77d
Author: Yang Yingliang <yangyingliang@xxxxxxxxxx>
Date:   Wed Mar 31 16:36:02 2021 +0800

    net/tipc: fix missing destroy_workqueue() on error in tipc_crypto_start()
    
    [ Upstream commit ac1db7acea67777be1ba86e36e058c479eab6508 ]
    
    Add the missing destroy_workqueue() before return from
    tipc_crypto_start() in the error handling case.
    
    Fixes: 1ef6f7c9390f ("tipc: add automatic session key exchange")
    Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
    Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c
index 86eb6d679225..2301b66280de 100644
--- a/net/tipc/crypto.c
+++ b/net/tipc/crypto.c
@@ -1485,6 +1485,8 @@ int tipc_crypto_start(struct tipc_crypto **crypto, struct net *net,
 	/* Allocate statistic structure */
 	c->stats = alloc_percpu_gfp(struct tipc_crypto_stats, GFP_ATOMIC);
 	if (!c->stats) {
+		if (c->wq)
+			destroy_workqueue(c->wq);
 		kfree_sensitive(c);
 		return -ENOMEM;
 	}



[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