From patchwork Sun Dec 6 20:56:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Priebe - Profihost AG X-Patchwork-Id: 7779401 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E1486BEEE1 for ; Sun, 6 Dec 2015 20:56:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23761203EC for ; Sun, 6 Dec 2015 20:56:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 469DF203E9 for ; Sun, 6 Dec 2015 20:56:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754734AbbLFU4h (ORCPT ); Sun, 6 Dec 2015 15:56:37 -0500 Received: from mail-ph.de-nserver.de ([85.158.179.214]:41763 "EHLO mail-ph.de-nserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754544AbbLFU4f (ORCPT ); Sun, 6 Dec 2015 15:56:35 -0500 Received: (qmail 20835 invoked from network); 6 Dec 2015 21:56:34 +0100 X-Fcrdns: No Received: from phoffice.de-nserver.de (HELO [10.242.2.22]) (185.39.223.5) (smtp-auth username s.priebe@profihost.ag, mechanism plain) by mail-ph.de-nserver.de (qpsmtpd/0.92) with (ECDHE-RSA-AES256-SHA encrypted) ESMTPSA; Sun, 06 Dec 2015 21:56:34 +0100 Subject: Re: Asterisk deadlocks since Kernel 4.1 To: Herbert Xu References: <564DB5F5.9060208@profihost.ag> <1447936902.1986892.444251921.3928A049@webmail.messagingengine.com> <564DC4A5.70104@profihost.ag> <564DCC4C.1090009@redhat.com> <564E2852.8000200@profihost.ag> <56530A42.6030609@profihost.ag> <1448283451.4019628.447573353.3659E447@webmail.messagingengine.com> <565EBDC1.1090808@profihost.ag> <8737vlt6xb.fsf@stressinduktion.org> <5661DAC4.8040909@profihost.ag> <20151205010819.GA21889@gondor.apana.org.au> Cc: Hannes Frederic Sowa , Florian Weimer , Thomas Gleixner , netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, jannik Winkel , Marco Schinkel From: Stefan Priebe Message-ID: <5664A102.2030602@profihost.ag> Date: Sun, 6 Dec 2015 21:56:34 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151205010819.GA21889@gondor.apana.org.au> X-User-Auth: Auth by s.priebe@profihost.ag through 185.39.223.5 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Herbert, i think i found the issue in 4.1 with netlink. Somebody made a mistake while backporting or cherry-picking your patch "netlink: Fix autobind race condition that leads to zero port ID" to 4.1. It misses a goto in 4.1. This goto is missing in 4.1: Can you please confirm, that this is not correct and might cause those issues. Stefan Am 05.12.2015 um 02:08 schrieb Herbert Xu: > On Fri, Dec 04, 2015 at 07:26:12PM +0100, Stefan Priebe wrote: >> >> * 9f87e0c - (2 months ago) netlink: Replace rhash_portid with bound >> - Herbert Xu >> * 35e9890 - (3 months ago) netlink: Fix autobind race condition that >> leads to zero port ID - Herbert Xu >> * 30c6472 - (7 months ago) netlink: Use random autobind rover - Herbert Xu > > These three patches are absolutely required in any kernel where the > netlink insertion is lockless. So yes they should be applied to > 4.1. > > Thanks, > --- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 4017e12..f15c001 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1132,7 +1132,6 @@ static int netlink_insert(struct sock *sk, u32 portid) if (err == -EEXIST) err = -EADDRINUSE; sock_put(sk); - goto err; } /* We need to ensure that the socket is hashed and visible. */