From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Dichtel Date: Wed, 13 May 2015 11:58:25 +0000 Subject: Re: netns: use a spin_lock to protect nsid management Message-Id: <55533C61.2030206@6wind.com> List-Id: References: <20150512175227.GA19020@mwanda> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Cong Wang , Dan Carpenter Cc: kernel-janitors@vger.kernel.org, Linux Kernel Network Developers Le 12/05/2015 21:16, Cong Wang a =C3=A9crit : [snip] > Also why do we have to disable IRQ when holding the spinlock? > IOW, which case takes the spin lock in IRQ context? peernet2id() is called by do_one_broadcast() (net/netlink/af_netlink.c). So every callers of netlink_broadcast[_filtered]()/nlmsg_unicast() /nlmsg_multicast() may needs this lock. -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Dichtel Subject: Re: netns: use a spin_lock to protect nsid management Date: Wed, 13 May 2015 13:58:25 +0200 Message-ID: <55533C61.2030206@6wind.com> References: <20150512175227.GA19020@mwanda> Reply-To: nicolas.dichtel@6wind.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kernel-janitors@vger.kernel.org, Linux Kernel Network Developers To: Cong Wang , Dan Carpenter Return-path: Received: from mail-wg0-f49.google.com ([74.125.82.49]:34386 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754491AbbEML62 (ORCPT ); Wed, 13 May 2015 07:58:28 -0400 Received: by wgic8 with SMTP id c8so40950616wgi.1 for ; Wed, 13 May 2015 04:58:27 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Le 12/05/2015 21:16, Cong Wang a =C3=A9crit : [snip] > Also why do we have to disable IRQ when holding the spinlock? > IOW, which case takes the spin lock in IRQ context? peernet2id() is called by do_one_broadcast() (net/netlink/af_netlink.c)= =2E So every callers of netlink_broadcast[_filtered]()/nlmsg_unicast() /nlmsg_multicast() may needs this lock.