]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - 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
CommitLineData
00e5a55c
BS
1From: Gerald Schaefer <geraldsc@de.ibm.com>
2Subject: af_iucv: avoid left over IUCV connections from failing connects
3References: bnc#514644,LTC#52270
4
5Symptom: extra unused IUCV connections left around
6Problem: For certain types of AFIUCV socket connect failures
7 connection cleanup is insufficient resulting in
8 left over IUCV connections.
9Solution: Add some cleanup-statements to avoid cluttered IUCV
10 connections.
11
12Acked-by: John Jolly <jjolly@suse.de>
13---
14 net/iucv/af_iucv.c | 10 ++++++++--
15 1 file changed, 8 insertions(+), 2 deletions(-)
16
17Index: 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
22 }
23
24 if (sk->sk_state == IUCV_DISCONN) {
25- release_sock(sk);
26- return -ECONNREFUSED;
27+ err = -ECONNREFUSED;
28 }
29+
30+ if (err) {
31+ iucv_path_sever(iucv->path, NULL);
32+ iucv_path_free(iucv->path);
33+ iucv->path = NULL;
34+ }
35+
36 done:
37 release_sock(sk);
38 return err;