From owner-svn-src-all@FreeBSD.ORG Sun Aug 19 08:35:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 56923106566B; Sun, 19 Aug 2012 08:35:31 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 777358FC0A; Sun, 19 Aug 2012 08:35:30 +0000 (UTC) Received: by bkcje9 with SMTP id je9so1973362bkc.13 for ; Sun, 19 Aug 2012 01:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=a1LbZjEwmmHYmr9xg0GGs8Bhxqrwn/QohZtvtNfeDpU=; b=Q19sRlGEu5ghH4z47zBVASP0mB0agktuwqDPBPjYUCz4b2J5ccSIZro5FnDPju0rKZ 80Z4BeRhU8h+Q1/qzzXjhgZ946bGpKmU0niBT2UvGSTJWwmglU7dQ8wOT3ozNf6l6gVO A0Yxm7rfDcPS8opLymzkY9SsDm/4yfsZrwOhSsTW9IW+0Tx9/2aurSJgd6O2KaQ0ZREN bXOhHsfxDZMQc/dsy2lumFjk61wQej0JYPl3Yb08Ci/TCZAOrqtdNePYQrNWAYPBVCeO eEjHjPZEmuX14YfovLQZzNj5FFTGpWWOxLykC+Tn6x6Hm1gN+UKJGJC7BoABVhaussKi 6LEg== Received: by 10.205.117.141 with SMTP id fm13mr3494877bkc.125.1345365329067; Sun, 19 Aug 2012 01:35:29 -0700 (PDT) Received: from localhost ([95.69.175.25]) by mx.google.com with ESMTPS id g6sm4901390bkg.2.2012.08.19.01.35.27 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Aug 2012 01:35:28 -0700 (PDT) Sender: Mikolaj Golub Date: Sun, 19 Aug 2012 11:35:25 +0300 From: Mikolaj Golub To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20120819083346.GA3758@gmail.com> References: <201208190816.q7J8GD1M050056@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201208190816.q7J8GD1M050056@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Re: svn commit: r239383 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2012 08:35:31 -0000 On Sun, Aug 19, 2012 at 08:16:13AM +0000, Mikolaj Golub wrote: > Author: trociny > Date: Sun Aug 19 08:16:13 2012 > New Revision: 239383 > URL: http://svn.freebsd.org/changeset/base/239383 > > Log: > In ip6_ctloutput() guard inp_flags modifications with INP_WLOCK. > The issue this commit fixes was reproduced using this simple program: http://people.freebsd.org/~trociny/test_IPPROTO_IPV6.c When two threads modified IPPROTO_IPV6 options simultaneously (each thread a different option but both options are in inp_flags, like IPV6_V6ONLY and IPV6_PORTRANGE) the result could be wrong due to the interference. I think that modification of ip6_pktopts should be guarded with the lock too. I have a patch for this: http://people.freebsd.org/~trociny/ip6_output.c.ip6_pktopts.1.patch Unfortunately, I don't know how to test this. -- Mikolaj Golub