Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp25773ybh; Tue, 10 Mar 2020 18:30:07 -0700 (PDT) X-Google-Smtp-Source: ADFU+vudM7FXYNhjihAcoFIm4tpKptpGmdwXCsBky1JXhQjuwUn6Q529wy8lPoJFEmn9Db8dM43Y X-Received: by 2002:a05:6830:18d4:: with SMTP id v20mr492318ote.23.1583890207546; Tue, 10 Mar 2020 18:30:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583890207; cv=none; d=google.com; s=arc-20160816; b=Mzbmyq87o/qInvAFvR/EGGOyOTIVlje+SMtmpUxC2/jI2PAvhlyWc8MeLO2B+0+ViJ mcMqJf6UTOM9x8eIjdxeQllZRaYoeUBBMv7Jy4ClU7WDvlLY4o4AfYo1bRjW3sMSwf91 /fOzA0I2Phfuqy79PVUSDuMkIqs3fA+WqyP+an0zSbBfTiJkkvAh5nig8zfMHTnM+NvY 6UW7ehikW2q8C2j+57m7YlcoHv5gXNwMpAqTK1Gg+1prsF7X357Q8hdapBrUCns/gTOs yj8RU71QGWpmfXEebY/Ai/O5nhqI+x+e0YTunqSobyrMdmuggplWPKMg9PahQmLfMEY2 E24A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:date:from:dkim-signature; bh=i2GXwUO3qDNgYDRB9ez8I/6iO72/MRbkR6e7aAcVV0A=; b=Xi4hqkd3rmLDjk2iqo8dybN/Vueyi9TBjhDXH74CaT2/yr+GVZFhQcxyQkwGwAc65D qe301kK/ghj+CKS3rjEUDhJz8d3/4BNxmx/5QWJKsk9fVCJofO7Z0b5TdgPfsRG5/Uwx Fc8zL+ETw0i1QwMtcBKXp+Uj1UNoAHX6bO0N7RF8zyBw+mm2F7i9X+i7QLPV6zSe1hC3 ACHe4hmTqvPk+LZ7BK0NaH54equkNnox6x/Mr6vAZY9n1bdd9qP4cq1i1WN/gq0cfi7n IMoA+bRtPHd19wThqhQ6A6fRc+412+Ev01au4EyxIPGjVDhqGrgzRqywcFdcX/c1Q4VC DCPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ge+bTOm5; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l23si316192oii.20.2020.03.10.18.29.55; Tue, 10 Mar 2020 18:30:07 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ge+bTOm5; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727888AbgCKB27 (ORCPT + 99 others); Tue, 10 Mar 2020 21:28:59 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:41842 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727528AbgCKB26 (ORCPT ); Tue, 10 Mar 2020 21:28:58 -0400 Received: by mail-wr1-f67.google.com with SMTP id s14so455685wrt.8; Tue, 10 Mar 2020 18:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=i2GXwUO3qDNgYDRB9ez8I/6iO72/MRbkR6e7aAcVV0A=; b=Ge+bTOm5BYPgFpr5KskZa8tzox1HvhGVvVAdSXCMkAgacvZTQvg25yVy2z63vxWNiZ wSjsxpkN6tdYJ2QpOUAd8y37Wd+4wtfDTa/bUHaBO8kHjhiqBy76RdZaTD9hOh4paPlG qPi1XQskPxgRlUGUXZ8Ci3JfWuFXJdQZ9ziEbrIRsQj3E2dq9+lU+W9so7Oyx0Ef82V3 9+wODufvk02QtXrWBhpubnnSEsgTF9KRiL/qGWoH9mHmz5QVXQNrlSJdWQOL7htaCzGB ykIJakogtGGUZW5qDxp0WKfX6liAyLMwgtWeioo5z8WJ1HhDsQk+SWLn6EbIsyK8yiEC xEsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=i2GXwUO3qDNgYDRB9ez8I/6iO72/MRbkR6e7aAcVV0A=; b=qXPhoihmodU6dMsez5EMThDioKgAvWkAApaHYYw4lQINlnbY9UumLILapEBTXWKm3N b3do+s4q7dkOua3qLUtJYCQ2NzWD8fsSC1ej5nfL8p1Fr2V3xOMJUNOswkIuKTJqefnp sf2XbZ0aCVCHFfF9ed05TjazdxTXRQjCsKrYvahYhNVVmdufjbS83ezYEzN8yxIdG3fx 0w1lYXRnAd2XX6848KREZq3aDL64DykUXDMXPmNR4fwqpiOqXo+FsNjMbWSbtCotdUqD 747hfLKhQZneWN/znfO5tG79w5DbnYc/RRlfVBlcKSQEtHO35lEtRAeGZLBWFhzxJbra M4hg== X-Gm-Message-State: ANhLgQ0ql2yKTdCHu0ruDfTE5sjgxPlWqRBJFec6lh9/QJ/IAnB7OsKa pft7fdJnsycM89sxJsUjsg== X-Received: by 2002:adf:ef0f:: with SMTP id e15mr869826wro.213.1583890137091; Tue, 10 Mar 2020 18:28:57 -0700 (PDT) Received: from ninjahub.lan (host-2-102-15-144.as13285.net. [2.102.15.144]) by smtp.gmail.com with ESMTPSA id a7sm5929804wmb.0.2020.03.10.18.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2020 18:28:56 -0700 (PDT) From: Jules Irenge X-Google-Original-From: Jules Irenge Date: Wed, 11 Mar 2020 01:28:49 +0000 (GMT) To: Eric Dumazet cc: Jules Irenge , boqun.feng@gmail.com, LKML , bpf , netdev , "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Jakub Kicinski Subject: Re: [PATCH 3/8] tcp: Add missing annotation for tcp_child_process() In-Reply-To: Message-ID: References: <20200311010908.42366-1-jbi.octave@gmail.com> <20200311010908.42366-4-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for the feedbacks. Good to know I have not used lockdep but I will try it. On Tue, 10 Mar 2020, Eric Dumazet wrote: > On Tue, Mar 10, 2020 at 6:09 PM Jules Irenge wrote: > > > > Sparse reports warning at tcp_child_process() > > warning: context imbalance in tcp_child_process() - unexpected unlock > > The root cause is the missing annotation at tcp_child_process() > > > > Add the missing __releases(&((child)->sk_lock.slock)) annotation > > > > Signed-off-by: Jules Irenge > > --- > > net/ipv4/tcp_minisocks.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c > > index ad3b56d9fa71..0e8a5b6e477c 100644 > > --- a/net/ipv4/tcp_minisocks.c > > +++ b/net/ipv4/tcp_minisocks.c > > @@ -817,6 +817,7 @@ EXPORT_SYMBOL(tcp_check_req); > > > > int tcp_child_process(struct sock *parent, struct sock *child, > > struct sk_buff *skb) > > + __releases(&((child)->sk_lock.slock)) > > { > > int ret = 0; > > int state = child->sk_state; > > > Yeah, although we prefer to use lockdep these days ;) > > Reviewed-by: Eric Dumazet >