From patchwork Sun Apr 25 16:55:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sedat Dilek X-Patchwork-Id: 50944 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B1803B7D1B for ; Mon, 26 Apr 2010 02:56:45 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752589Ab0DYQz5 (ORCPT ); Sun, 25 Apr 2010 12:55:57 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:44990 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751679Ab0DYQzz (ORCPT ); Sun, 25 Apr 2010 12:55:55 -0400 Received: by wyg36 with SMTP id 36so775902wyg.19 for ; Sun, 25 Apr 2010 09:55:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; bh=wNlfTiadEC5IQ/29EFu09TmYl/jjW3/5ZYLS00OPU74=; b=ayj4qZ/wY+ryNtgXt8248In5n4Z4u8izZHVygt0uxvbGyu3U6rBj9yNOdh6ZgEUnny 6+Sto8y10/b1UI205zG7YQNWIihEw9kGQrie8QdWcWD8QGCzhvtPvwCfuW0aB88ihT8h s+Y2Sb5aPkWnToEP8VhpGKsJdWmd0omsxMheA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=soqS4OAghguc8y4iLWTpMriDGr7x6xJv7s/n2VOV69KTpQtJHIrqYucMHP89Hf9/t2 xcPgdWnwgZU+y1oK75MtcDAO7bmc6EX6kPYuTG0JWfw0hG+3Wa09kUDli5bMv7YPjCqD PWRj56nQQekbrRjP/NAt8lJPRGA1BjZLjQmP0= MIME-Version: 1.0 Received: by 10.216.89.193 with SMTP id c43mr3898067wef.151.1272214552938; Sun, 25 Apr 2010 09:55:52 -0700 (PDT) Received: by 10.216.55.199 with HTTP; Sun, 25 Apr 2010 09:55:52 -0700 (PDT) Reply-To: sedat.dilek@gmail.com In-Reply-To: <1272213597.2069.32.camel@edumazet-laptop> References: <4BD45E68.4080900@example.com> <4BD46F9C.5060500@example.com> <1272213597.2069.32.camel@edumazet-laptop> Date: Sun, 25 Apr 2010 18:55:52 +0200 Message-ID: Subject: Re: [2.6.34-rc5-git6] EIP: is at inet6_csk_bind_conflict + 06xe/0xb7 [ipv6] From: Sedat Dilek To: Eric Dumazet Cc: piotr@hosowicz.com, LKML , netdev@vger.kernel.org, David Miller , Jiri Olsa , Jongman Heo Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Rebuild ipv6 kernel-modules by: $ make M=net/ipv6 ...and copied net/ipv6/*.ko and net/ipv6/netfilter/*.ko files manually to the right place. Applied your patch (seen on netdev ML) already and booted into new kernel. Works, thanks. Tested-by: Sedat Dilek - Sedat - On Sun, Apr 25, 2010 at 6:39 PM, Eric Dumazet wrote: > Le dimanche 25 avril 2010 à 18:36 +0200, Piotr Hosowicz a écrit : >> On 25.04.2010 18:31, Sedat Dilek wrote: >> > [ CCing netdev ML ] >> > >> > Confirmed: The revert-patch [1] fixes the problem here. >> >> I confirm, I've built a git6 kernel and it works fine. >> >> > See also "Bug 15847 -  crash in inet6_csk_bind_conflict" [2]. >> > >> > Feel free to add a... Tested-by: Sedat Dilek >> >> I added created and tested phrase in my archive. ;-) Thank you a lot. I >> hope there will be no this error in git7. >> > > Did you test the proposed fix ? > > > [PATCH] ipv6: Fix inet6_csk_bind_conflict() > > Commit fda48a0d7a84 (tcp: bind() fix when many ports are bound) > introduced a bug on IPV6 part. > We should not call ipv6_addr_any(inet6_rcv_saddr(sk2)) but > ipv6_addr_any(inet6_rcv_saddr(sk)) because sk2 can be IPV4, while sk is > IPV6. > > Reported-by: Michael S. Tsirkin > Signed-off-by: Eric Dumazet > --- > diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c > index b4b7d40..3a4d92b 100644 > --- a/net/ipv6/inet6_connection_sock.c > +++ b/net/ipv6/inet6_connection_sock.c > @@ -48,7 +48,7 @@ int inet6_csk_bind_conflict(const struct sock *sk, >                             ipv6_rcv_saddr_equal(sk, sk2)) >                                break; >                        else if (sk->sk_reuse && sk2->sk_reuse && > -                               !ipv6_addr_any(inet6_rcv_saddr(sk2)) && > +                               !ipv6_addr_any(inet6_rcv_saddr(sk)) && >                                ipv6_rcv_saddr_equal(sk, sk2)) >                                break; >                } > > > [PATCH] ipv6: Fix inet6_csk_bind_conflict() Commit fda48a0d7a84 (tcp: bind() fix when many ports are bound) introduced a bug on IPV6 part. We should not call ipv6_addr_any(inet6_rcv_saddr(sk2)) but ipv6_addr_any(inet6_rcv_saddr(sk)) because sk2 can be IPV4, while sk is IPV6. Reported-by: Michael S. Tsirkin Signed-off-by: Eric Dumazet --- diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index b4b7d40..3a4d92b 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c @@ -48,7 +48,7 @@ int inet6_csk_bind_conflict(const struct sock *sk, ipv6_rcv_saddr_equal(sk, sk2)) break; else if (sk->sk_reuse && sk2->sk_reuse && - !ipv6_addr_any(inet6_rcv_saddr(sk2)) && + !ipv6_addr_any(inet6_rcv_saddr(sk)) && ipv6_rcv_saddr_equal(sk, sk2)) break; }