From patchwork Thu Dec 11 23:05:21 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeniy Polyakov X-Patchwork-Id: 13632 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.176.167]) by ozlabs.org (Postfix) with ESMTP id B7E5FDDF37 for ; Fri, 12 Dec 2008 10:05:35 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758697AbYLKXF0 (ORCPT ); Thu, 11 Dec 2008 18:05:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758064AbYLKXFZ (ORCPT ); Thu, 11 Dec 2008 18:05:25 -0500 Received: from kandzendo.ru ([195.178.208.66]:44864 "EHLO tservice.net.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757873AbYLKXFX (ORCPT ); Thu, 11 Dec 2008 18:05:23 -0500 Received: by tservice.net.ru (Postfix, from userid 1000) id B8FABFFC5; Fri, 12 Dec 2008 02:05:21 +0300 (MSK) Date: Fri, 12 Dec 2008 02:05:21 +0300 From: Evgeniy Polyakov To: Andrew Morton Cc: mike@nauticaltech.com, bugme-daemon@bugzilla.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Al Viro Subject: Re: [Bugme-new] [Bug 12201] New: long wait in call_usermodehelper() / queue_work() / wait_for_completion() Message-ID: <20081211230521.GA2392@ioremap.net> References: <20081211143758.510b51b6.akpm@linux-foundation.org> <20081211225158.GA2169@ioremap.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20081211225158.GA2169@ioremap.net> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Dec 12, 2008 at 01:51:58AM +0300, Evgeniy Polyakov (zbr@ioremap.net) wrote: > > > If I write a small pilot program that calls socket(PF_NETLINK, SOCK_RAW, > > > NETLINK_AUDIT), it will delay by 1-2 seconds 100% of the time (assuming server > > > has been online for a while). Certain protocol types given to socket() have > > > zero delay (because no module needs to be loaded). > > > > > > Steps to reproduce: > > > Once server has been online for a while, a simple call to socket(PF_NETLINK, > > > SOCK_RAW, NETLINK_AUDIT) shows the problem. > > > > OK, weird. > > > > Please get sysrq working then get us a task trace, so we can see who is > > sleeping where. Do this: > > > > > > - run your "small pilot program" > > Or send it to us and we will quickly fix the bug :) > > Thank you! Btw, does this ugly hack fix the problem? According to your description it may be the case. diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 480184a..2b64eb5 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -434,6 +434,10 @@ static int netlink_create(struct net *net, struct socket *sock, int protocol) if (protocol < 0 || protocol >= MAX_LINKS) return -EPROTONOSUPPORT; +#ifndef CONFIG_AUDIT + if (protocol == NETLINK_AUDIT) + return -EPROTONOSUPPORT; +#endif netlink_lock_table(); #ifdef CONFIG_MODULES if (!nl_table[protocol].registered) {