Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754269Ab2HSPzQ (ORCPT ); Sun, 19 Aug 2012 11:55:16 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:47768 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752825Ab2HSPzO (ORCPT ); Sun, 19 Aug 2012 11:55:14 -0400 Subject: Re: IPv4 BUG: held lock freed! From: Eric Dumazet To: Lin Ming Cc: Fengguang Wu , David Miller , networking , LKML In-Reply-To: References: <20120818021918.GA6499@localhost> <1345380682.5158.201.camel@edumazet-glaptop> <1345387532.5158.222.camel@edumazet-glaptop> Content-Type: text/plain; charset="UTF-8" Date: Sun, 19 Aug 2012 17:55:08 +0200 Message-ID: <1345391708.5158.225.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 765 Lines: 26 On Sun, 2012-08-19 at 23:05 +0800, Lin Ming wrote: > On Sun, Aug 19, 2012 at 10:45 PM, Eric Dumazet wrote: > > On Sun, 2012-08-19 at 22:15 +0800, Lin Ming wrote: > > > >> Will it still has problem if code goes here without sock_hold(sk)? > > > > Not sure of what you mean. > > See my comments in the function. > Is that a potential problem? > No problem. It always been like that. Thats the whole point having a refcount at the first place. The last sock_put(sk) should free the socket. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/