public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap•net>
To: David Miller <davem@davemloft•net>
Cc: netdev@vger•kernel.org
Subject: 64k bind(0) bugfix.
Date: Tue, 20 Jan 2009 02:21:51 +0300	[thread overview]
Message-ID: <20090119232151.GA13659@ioremap.net> (raw)

Hi.

I found the bug in bind conflict resolve path, when bundle was not
unlocked after conflict was detected, attached patch should fix it.

If testing will reveal some new problems I will return with the fix
then. Please apply or queue for the appropriate tree.

Signed-off-by: Evgeniy Polyakov <zbr@ioremap•net>

--- ./net/ipv4/inet_connection_sock.c~	2009-01-19 22:19:11.000000000 +0300
+++ ./net/ipv4/inet_connection_sock.c	2009-01-19 22:21:08.000000000 +0300
@@ -172,8 +172,10 @@
 		} else {
 			ret = 1;
 			if (inet_csk(sk)->icsk_af_ops->bind_conflict(sk, tb)) {
-				if (sk->sk_reuse && sk->sk_state != TCP_LISTEN && --attempts >= 0)
+				if (sk->sk_reuse && sk->sk_state != TCP_LISTEN && --attempts >= 0) {
+					spin_unlock(&head->lock);
 					goto again;
+				}
 				goto fail_unlock;
 			}
 		}


-- 
	Evgeniy Polyakov

             reply	other threads:[~2009-01-19 23:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-19 23:21 Evgeniy Polyakov [this message]
2009-01-19 23:24 ` 64k bind(0) bugfix David Miller
2009-01-19 23:26   ` Evgeniy Polyakov

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=20090119232151.GA13659@ioremap.net \
    --to=zbr@ioremap$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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