]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.arch/s390-14-01-af_iucv-connect-free-path.patch
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / s390-14-01-af_iucv-connect-free-path.patch
diff --git a/src/patches/suse-2.6.27.31/patches.arch/s390-14-01-af_iucv-connect-free-path.patch b/src/patches/suse-2.6.27.31/patches.arch/s390-14-01-af_iucv-connect-free-path.patch
new file mode 100644 (file)
index 0000000..cd66611
--- /dev/null
@@ -0,0 +1,38 @@
+From: Gerald Schaefer <geraldsc@de.ibm.com>
+Subject: af_iucv: avoid left over IUCV connections from failing connects
+References: bnc#514644,LTC#52270
+
+Symptom:     extra unused IUCV connections left around
+Problem:     For certain types of AFIUCV socket connect failures
+             connection cleanup is insufficient resulting in
+             left over IUCV connections.
+Solution:    Add some cleanup-statements to avoid cluttered IUCV
+             connections.
+
+Acked-by: John Jolly <jjolly@suse.de>
+---
+ net/iucv/af_iucv.c |   10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+Index: linux-sles11/net/iucv/af_iucv.c
+===================================================================
+--- linux-sles11.orig/net/iucv/af_iucv.c
++++ linux-sles11/net/iucv/af_iucv.c
+@@ -503,9 +503,15 @@ static int iucv_sock_connect(struct sock
+       }
+       if (sk->sk_state == IUCV_DISCONN) {
+-              release_sock(sk);
+-              return -ECONNREFUSED;
++              err = -ECONNREFUSED;
+       }
++
++      if (err) {
++              iucv_path_sever(iucv->path, NULL);
++              iucv_path_free(iucv->path);
++              iucv->path = NULL;
++      }
++
+ done:
+       release_sock(sk);
+       return err;