]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rds: clean up loopback rds_connections on netns deletion
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Mon, 25 Jun 2018 13:41:25 +0000 (06:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:06:51 +0000 (13:06 +0200)
commitc827073c95fde388bc65fe5227f944eaf859b9f0
tree8370106c63d86e5c5696a58ff1f2f55f311c87a9
parent0ce9d3074e7359b11da923fa370b065bbdd1c589
rds: clean up loopback rds_connections on netns deletion

[ Upstream commit c809195f5523dd4d09403bbb1c9732d548aa0d1e ]

The RDS core module creates rds_connections based on callbacks
from rds_loop_transport when sending/receiving packets to local
addresses.

These connections will need to be cleaned up when they are
created from a netns that is not init_net, and that netns is deleted.

Add the changes aligned with the changes from
commit ebeeb1ad9b8a ("rds: tcp: use rds_destroy_pending() to synchronize
netns/module teardown and rds connection/workq management") for
rds_loop_transport

Reported-and-tested-by: syzbot+4c20b3866171ce8441d2@syzkaller.appspotmail.com
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/rds/connection.c
net/rds/loop.c
net/rds/loop.h