Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2579208imm; Thu, 11 Oct 2018 12:33:40 -0700 (PDT) X-Google-Smtp-Source: ACcGV60+m3nDs6PlFweAVoZtCutTHURtucJcsd5pqT6VPh1pGlZSES5wSRuyben8YvmXF2/VPrSf X-Received: by 2002:a63:f744:: with SMTP id f4-v6mr2622259pgk.410.1539286420114; Thu, 11 Oct 2018 12:33:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539286420; cv=none; d=google.com; s=arc-20160816; b=BxFfDXWtcNAlgV0Of8uUF4GD7URsnVkM4x93tE2GoT+etpDWC97RTzNVBz6dQYnSQ8 1GFFva+KxI+hTjSNCEE9TqmIpMks5T7Ag7IPzD0latOvMKHOqwaI2VzCyO3dhV4Bknjd K5iXZ6em1rTwveqkMl4uKfz3woWErQmAdE0q8yXuxkZdO+6UK4VhClZHezux291EH26T CZuMSRuI5WykTHkWE//DUq37T4j1w6UZmEwyq4bRyKuV45E2I0y5Z0ks68dHNPmJp9kp SDUg/rtw0AeRG3Z2lHXHagzaVkpruu6vDiGraGJZDbnaVJvPp/AVlr69FS4KavVMY/N2 6IYQ== 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=2rqmNne75xVxg60eHosAGw26TXDwd0SORyq/rd/liYs=; b=suPTgiWu4CFsR8vK54BnpMjdKAKTIDvb1BkY88RyE/uBO21wi3TsIVTLwuEw/ydaHW /jGeSH8IBQw/UgvFOVgHBdMXhtFFGNcJrYWm9/V34zE+hUfyLDfq0UJPE/Xy7zHADi5K IrFEJ7vpt0kN4Zu2QU2Fxlyj24M0hunVr4aau1YBhTNTxFl/trQ0lDwH6/qSqKT6Z+9F KfkgdqVHHJaZfbWQLx1IcmghOjYDmzZvotCpmEKcY1EX8pd6HsNcTQ6Y2H7bAUVL3Q4h ya6apZ4glx5u60SU+q862d/6f9cKxBrbJ01gmExsTYx3agTePUxBmQL7zo3wF+3KBVVb O1Eg== 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 y2-v6si28528677pli.330.2018.10.11.12.33.24; Thu, 11 Oct 2018 12:33:40 -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 S1728880AbeJLAyP (ORCPT + 99 others); Thu, 11 Oct 2018 20:54:15 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:59242 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbeJLAyP (ORCPT ); Thu, 11 Oct 2018 20:54:15 -0400 Received: from localhost (c-67-183-145-105.hsd1.wa.comcast.net [67.183.145.105]) (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 44AB912DE580E; Thu, 11 Oct 2018 10:26:04 -0700 (PDT) Date: Thu, 11 Oct 2018 10:26:03 -0700 (PDT) Message-Id: <20181011.102603.2088827315896221671.davem@davemloft.net> To: ying.xue@windriver.com Cc: jon.maloy@ericsson.com, dvyukov@google.com, parthasarathy.bhuvaragan@ericsson.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, tipc-discussion@lists.sourceforge.net Subject: Re: [PATCH net] tipc: eliminate possible recursive locking detected by LOCKDEP From: David Miller In-Reply-To: <1539259076-8562-1-git-send-email-ying.xue@windriver.com> References: <1539259076-8562-1-git-send-email-ying.xue@windriver.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) 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]); Thu, 11 Oct 2018 10:26:04 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ying Xue Date: Thu, 11 Oct 2018 19:57:56 +0800 > When booting kernel with LOCKDEP option, below warning info was found: > > WARNING: possible recursive locking detected > 4.19.0-rc7+ #14 Not tainted ... > The reason why the noise above was complained by LOCKDEP is because we > nested to hold l->wakeupq.lock and l->inputq->lock in tipc_link_reset > function. In fact it's unnecessary to move skb buffer from l->wakeupq > queue to l->inputq queue while holding the two locks at the same time. > Instead, we can move skb buffers in l->wakeupq queue to a temporary > list first and then move the buffers of the temporary list to l->inputq > queue, which is also safe for us. > > Fixes: 3f32d0be6c16 ("tipc: lock wakeup & inputq at tipc_link_reset()") > Reported-by: Dmitry Vyukov > Signed-off-by: Ying Xue Applied.