From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
Ursula Braun <ursula.braun@de.ibm.com>,
Philipp Hachtmann <phacht@linux.vnet.ibm.com>
Subject: [patch 2/4] af_iucv: correct cleanup if listen backlog is full
Date: Tue, 27 May 2014 11:13:43 +0200 [thread overview]
Message-ID: <20140527091400.195475068@de.ibm.com> (raw)
In-Reply-To: 20140527091341.417448231@de.ibm.com
[-- Attachment #1: 606-af-iucv-fix-cleanup.diff --]
[-- Type: text/plain, Size: 1211 bytes --]
From: Ursula Braun <ursula.braun@de.ibm.com>
In case of transport HIPER a sock struct is allocated for an incoming
connect request. If the backlog queue is full this socket is not
needed, but is left in the list of af_iucv sockets. Final socket
release posts console message "Attempt to release alive iucv socket".
This patch makes sure the new created socket is cleaned up correctly
if the backlog queue is full.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Reported-by: Philipp Hachtmann <phacht@linux.vnet.ibm.com>
---
net/iucv/af_iucv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index 60f5c20..7a95fa4 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -1943,11 +1943,10 @@ static int afiucv_hs_callback_syn(struct sock *sk, struct sk_buff *skb)
sk_acceptq_is_full(sk) ||
!nsk) {
/* error on server socket - connection refused */
- if (nsk)
- sk_free(nsk);
afiucv_swap_src_dest(skb);
trans_hdr->flags = AF_IUCV_FLAG_SYN | AF_IUCV_FLAG_FIN;
err = dev_queue_xmit(skb);
+ iucv_sock_kill(nsk);
bh_unlock_sock(sk);
goto out;
}
next prev parent reply other threads:[~2014-05-27 9:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 9:13 [patch 0/4] s390: network patches for net-next frank.blaschka
2014-05-27 9:13 ` [patch 1/4] af_iucv: Add automatic (source) iucv_name to bind frank.blaschka
2014-05-27 9:13 ` frank.blaschka [this message]
2014-05-27 9:13 ` [patch 3/4] qeth: Fix for possible null pointer dereference frank.blaschka
2014-05-27 9:13 ` [patch 4/4] s390/net: fix format string mismatches frank.blaschka
2014-05-27 9:34 ` David Laight
-- strict thread matches above, loose matches on Subject: below --
2014-05-28 8:22 [patch 0/4] s390: network patches for net-next V1 frank.blaschka
2014-05-28 8:22 ` [patch 2/4] af_iucv: correct cleanup if listen backlog is full frank.blaschka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140527091400.195475068@de.ibm.com \
--to=frank.blaschka@de.ibm.com \
--cc=davem@davemloft.net \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=phacht@linux.vnet.ibm.com \
--cc=ursula.braun@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).