This is a note to let you know that I've just added the patch titled [PATCH stable 5.9 06/30] chelsio/chtls: Fix panic when listen on multiadapter to the 5.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: chelsio-chtls-fix-panic-when-listen-on-multiadapter.patch and it can be found in the queue-5.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Sat Oct 24 10:56:06 AM CEST 2020 From: Vinay Kumar Yadav <vinay.yadav@xxxxxxxxxxx> Date: Mon, 19 Oct 2020 17:20:23 +0530 Subject: [PATCH stable 5.9 06/30] chelsio/chtls: Fix panic when listen on multiadapter From: Vinay Kumar Yadav <vinay.yadav@xxxxxxxxxxx> [ Upstream commit 9819f22c410b4bf6589d3126e8bc3952db507cbf ] Add the logic to compare net_device returned by ip_dev_find() with the net_device list in cdev->ports[] array and return net_device if matched else NULL. Fixes: 6abde0b24122 ("crypto/chtls: IPv6 support for inline TLS") Signed-off-by: Venkatesh Ellapu <venkatesh.e@xxxxxxxxxxx> Signed-off-by: Vinay Kumar Yadav <vinay.yadav@xxxxxxxxxxx> Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/crypto/chelsio/chtls/chtls_cm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/drivers/crypto/chelsio/chtls/chtls_cm.c +++ b/drivers/crypto/chelsio/chtls/chtls_cm.c @@ -92,11 +92,13 @@ static void chtls_sock_release(struct kr static struct net_device *chtls_find_netdev(struct chtls_dev *cdev, struct sock *sk) { + struct adapter *adap = pci_get_drvdata(cdev->pdev); struct net_device *ndev = cdev->ports[0]; #if IS_ENABLED(CONFIG_IPV6) struct net_device *temp; int addr_type; #endif + int i; switch (sk->sk_family) { case PF_INET: @@ -127,8 +129,12 @@ static struct net_device *chtls_find_net return NULL; if (is_vlan_dev(ndev)) - return vlan_dev_real_dev(ndev); - return ndev; + ndev = vlan_dev_real_dev(ndev); + + for_each_port(adap, i) + if (cdev->ports[i] == ndev) + return ndev; + return NULL; } static void assign_rxopt(struct sock *sk, unsigned int opt) Patches currently in stable-queue which might be from vinay.yadav@xxxxxxxxxxx are queue-5.9/chelsio-chtls-fix-panic-when-server-is-on-ipv6.patch queue-5.9/chelsio-chtls-fix-writing-freed-memory.patch queue-5.9/chelsio-chtls-fix-socket-lock.patch queue-5.9/chelsio-chtls-correct-netdevice-for-vlan-interface.patch queue-5.9/chelsio-chtls-correct-function-return-and-return-type.patch queue-5.9/chelsio-chtls-fix-panic-when-listen-on-multiadapter.patch