1 From: Gerald Schaefer <geraldsc@de.ibm.com>
2 Subject: af_iucv: avoid left over IUCV connections from failing connects
3 References: bnc#514644,LTC#52270
5 Symptom: extra unused IUCV connections left around
6 Problem: For certain types of AFIUCV socket connect failures
7 connection cleanup is insufficient resulting in
8 left over IUCV connections.
9 Solution: Add some cleanup-statements to avoid cluttered IUCV
12 Acked-by: John Jolly <jjolly@suse.de>
14 net/iucv/af_iucv.c | 10 ++++++++--
15 1 file changed, 8 insertions(+), 2 deletions(-)
17 Index: linux-sles11/net/iucv/af_iucv.c
18 ===================================================================
19 --- linux-sles11.orig/net/iucv/af_iucv.c
20 +++ linux-sles11/net/iucv/af_iucv.c
21 @@ -503,9 +503,15 @@ static int iucv_sock_connect(struct sock
24 if (sk->sk_state == IUCV_DISCONN) {
26 - return -ECONNREFUSED;
27 + err = -ECONNREFUSED;
31 + iucv_path_sever(iucv->path, NULL);
32 + iucv_path_free(iucv->path);