Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1405941ybi; Fri, 12 Jul 2019 15:35:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZQ8L13WPJaJGBIGG2UBs8POcENUj+QHL3p6/cHLSrxVKlnA8GwMRDfj6chhrub+c9V039 X-Received: by 2002:a17:90a:2385:: with SMTP id g5mr15188303pje.12.1562970926013; Fri, 12 Jul 2019 15:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562970926; cv=none; d=google.com; s=arc-20160816; b=OK6OEmExDtBwj99D84y4u0paoO2xFmK2XrH0rYfQ9RAdIhnsK7EliJbtO9UrPobyAf eO9tkFhx1Sd8bTVujOyePAFxF3HwpUSuFLNWjDLmufnuG7pdE/a2dyRKAQPeRKqL9/KX jg6xNjYVS5n1BeszJAfAWKZSqIgQN8AvsB/xuWJkjCTQ8BqQg1RQsh7xctDo14gZ/qjx 0KNzIkMO69SGWBASvGIfiqjI6Xa1Tlml2QyhgTMzMdejlhDKubxsltg0NjmSY5Mzwlow 6xL66wyrH1wiTbPMqem4K5k+SPdnF1XesWtYvo8pK3kjr50Al+bbXkPC7vQK2qinHSVV m9xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=Xqn7Vacg+w7f0jkEpipT82tQhwndlC6sav14GJyUqSQ=; b=Wx8hOS1Dye1qKbWuTSHpGjAjWol4a1v7HFIgIs15NOiVp6EOB1u0gQ50w+cHLICPGz lYTSPDiCmns0R6zZB/JyrYhNJe2zLKGw/Xz+cQh15CKFmQOG1q2NkJ0IYDODKcgXzyk9 qYS+FPtTpeCQ41yFeFxjdiGPZFEqApKbXZ4R96VRyAKOcwAn96y0iliWlkXftST7GJNe cDq3sPgOatpFCcYHqTC3aaJ77VThDCZ3b6YhtG31fVW8bxPfuj7bfO2A2Vq7sz0EaCNg qSPMAx59on1ARu+FjjmvGBa8LidbUK981G2bhQNgrRa50nhwceYHZxkwcMa2T11AOoyl 3X2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r190si9865400pfr.102.2019.07.12.15.35.10; Fri, 12 Jul 2019 15:35:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728120AbfGLWeu (ORCPT + 99 others); Fri, 12 Jul 2019 18:34:50 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:34314 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727790AbfGLWet (ORCPT ); Fri, 12 Jul 2019 18:34:49 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 0F25B14E03845; Fri, 12 Jul 2019 15:34:49 -0700 (PDT) Date: Fri, 12 Jul 2019 15:34:48 -0700 (PDT) Message-Id: <20190712.153448.2014775769142835466.davem@davemloft.net> To: chris.packham@alliedtelesis.co.nz Cc: jon.maloy@ericsson.com, eric.dumazet@gmail.com, ying.xue@windriver.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net Subject: Re: [PATCH v2] tipc: ensure head->lock is initialised From: David Miller In-Reply-To: <20190711224115.21499-1-chris.packham@alliedtelesis.co.nz> References: <20190711224115.21499-1-chris.packham@alliedtelesis.co.nz> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 12 Jul 2019 15:34:49 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chris Packham Date: Fri, 12 Jul 2019 10:41:15 +1200 > tipc_named_node_up() creates a skb list. It passes the list to > tipc_node_xmit() which has some code paths that can call > skb_queue_purge() which relies on the list->lock being initialised. > > The spin_lock is only needed if the messages end up on the receive path > but when the list is created in tipc_named_node_up() we don't > necessarily know if it is going to end up there. > > Once all the skb list users are updated in tipc it will then be possible > to update them to use the unlocked variants of the skb list functions > and initialise the lock when we know the message will follow the receive > path. > > Signed-off-by: Chris Packham Applied.