Received: with ECARTIS (v1.0.0; list netdev); Thu, 31 Mar 2005 12:01:10 -0800 (PST) Received: from bizon.gios.gov.pl (root@bizon.gios.gov.pl [212.244.124.8]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j2VK14uF005372 for ; Thu, 31 Mar 2005 12:01:05 -0800 Received: from bizon.gios.gov.pl (olel@localhost6 [IPv6:::1]) by bizon.gios.gov.pl (8.13.3/8.13.3) with ESMTP id j2VK06NY007579 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 31 Mar 2005 22:00:08 +0200 Received: from localhost (olel@localhost) by bizon.gios.gov.pl (8.13.3/8.13.3/Submit) with ESMTP id j2VK05Jk007576; Thu, 31 Mar 2005 22:00:06 +0200 X-Authentication-Warning: bizon.gios.gov.pl: olel owned process doing -bs Date: Thu, 31 Mar 2005 22:00:05 +0200 (CEST) From: Krzysztof Oledzki X-X-Sender: olel@bizon.gios.gov.pl To: Herbert Xu cc: Ingo Molnar , netdev@oss.sgi.com, linux-net@vger.kernel.org, "David S. Miller" Subject: Re: KERNEL: assertion (!atomic_read(&sk->sk_rmem_alloc)) failed at net/netlink/af_netlink.c (126) In-Reply-To: <20050330082640.GA8269@gondor.apana.org.au> Message-ID: References: <20050327091524.GA23215@elte.hu> <20050327133811.GA5569@elte.hu> <20050329104906.GA19836@gondor.apana.org.au> <20050329114926.GA14986@elte.hu> <20050330082640.GA8269@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-187430788-995482138-1112299205=:7391" X-Virus-Scanned: ClamAV 0.83/798/Thu Mar 31 01:54:41 2005 on oss.sgi.com X-Virus-Scanned: by amavis-milter (http://www.amavis.org/) X-Virus-Status: Clean X-archive-position: 1112 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: olel@ans.pl Precedence: bulk X-list: netdev Content-Length: 1371 Lines: 39 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---187430788-995482138-1112299205=:7391 Content-Type: TEXT/PLAIN; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 30 Mar 2005, Herbert Xu wrote: > On Tue, Mar 29, 2005 at 01:49:26PM +0200, Ingo Molnar wrote: >> >> (i guess the debug message should be extended to do a dump_stack() so >> that we see which process does?) > > Never mind. I think I've found what it is. The only thing I can't > figure out is why we're only seeing it now when this bug has been > around since day one. > > In netlink_dump we're operating on sk after dropping the cb lock. > This is racy because the owner of the socket could close it after > we drop the cb lock. > > This is possible because netlink_dump isn't always called from the > context of the process that owns the socket. For instance, if there > is contention on rtnl then rtnetlink requests will be processed by > the process that owns the rtnl. > > The solution is to hold a ref count on the socket before we drop > the cb lock. OK. I'm no longer able to trigger this error. And the patch is=20 already in the linux-2.6 repository. Thank you. Best regards, =09=09=09Krzysztof Ol=EAdzki ---187430788-995482138-1112299205=:7391--