Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp15777ybh; Tue, 10 Mar 2020 18:15:46 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuJBYb25rYhSHz9ShwhASaYTA1/ekG2ZYmYxjjF9HxpaRRGRAqLQonN6X693i/p66PIIstk X-Received: by 2002:a9d:53c4:: with SMTP id i4mr489564oth.48.1583889345933; Tue, 10 Mar 2020 18:15:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583889345; cv=none; d=google.com; s=arc-20160816; b=hXz7C9vkMZKezU+J8wtVYQPxz9v63tNxkv90ZWp17DQBoF3aU7IegmQcQI4+ycPG9i FwnDFtvqFFw9s6msgleD5rIJbgZw+qSkhbNjIHYtRO7j/9iy1N8PUflBd96Kc/YdBLD7 PW3RlE7pb+GBuRxY/nQIDNxk5Hr0ZP67CjILBz1ZpQ9NJbmmnlrBhQl8lJbBvvswUMNq fHWOrTBtKySr/glrVwYICEYkux2rsI5DibjXgV+rQLDZ1QD+a8XNx4mFOVJPY3Jja0Xq EZz2hrTlRGpCQcqXf9b22wkRp/RjCAbXTiqZ4u1M2t5lhjABVbZOoZ7gI0KQdEfm8AE5 uF7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=X9RdD7dG4OSnH/ITM7CpyzLcUBxqAje79nHZ8XeIV6g=; b=yo3CMYItooHtd/O+RiPrKvpiSOtfkRevQj7SQjCFldleEgaNnXRFlIPAr72Sm2sdrm dQxq0Sz7B3tZfjJwN1v4Qfbyoo/PYeFiS5z/0qhABtk/cV/4BNOrZh13hPYH9qWnmM3s lZGeCW3a1vTjugQ6XSOVd3gHEU1zAOBhS0yUBjdlBZeL4pMpFg7TDfRbKd0YzEkecegI pj1PYTWJU3UteSpZp/rscK0Yu/qFb3oP9By6ASuu+MPCVBS+AeIdJS9rEacO3v+gZRmv RCZNyhKxs3xn+QcAKGS1JzdHNI7r4yFRvO/ldojO45IW5jsumu2olef9FGcWmV5jm0um IXGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="FY7/W01w"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si269226oic.222.2020.03.10.18.15.22; Tue, 10 Mar 2020 18:15:45 -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=@google.com header.s=20161025 header.b="FY7/W01w"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727685AbgCKBON (ORCPT + 99 others); Tue, 10 Mar 2020 21:14:13 -0400 Received: from mail-yw1-f65.google.com ([209.85.161.65]:32829 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726463AbgCKBOM (ORCPT ); Tue, 10 Mar 2020 21:14:12 -0400 Received: by mail-yw1-f65.google.com with SMTP id j186so523498ywe.0 for ; Tue, 10 Mar 2020 18:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X9RdD7dG4OSnH/ITM7CpyzLcUBxqAje79nHZ8XeIV6g=; b=FY7/W01wzvgaIOdYQmMKo/yPAcX5tUr8fyE9PXSm5dg0lBfJjqqut+QRmbH6fe8sDo aCsNgyAJXvIs87SGiKHBGxPe0yoCGIjRZ9Z12r5bTKc+q2KRl6a/g3QW3TGXh48i8JBH VFdU1bEVxp5m4XEXuxBNsaem5cxDyuVEzaxpJ/F00Q/3fbqOEIRtuuk0Kh5Gevldzk3Y a04u9tzfasIpXemR3KyUivgq8HCj4lF9GQkPCCTrh4TpSEPkWBUoOQ96UtqGCU81SJOS p3bzk+ugjtyM0uaaWFkwForh3BEqmXWA42Z086x6RTMO1ChvbkKWSXcRGT+K5gw3ZGHR Y4gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X9RdD7dG4OSnH/ITM7CpyzLcUBxqAje79nHZ8XeIV6g=; b=L02odQcCdQyCbd7DUT0ZmU9N69et4dJRJyXWQtijz/qVQnSpFgyttJGa+gEdy64WKE YtLfcEm3p8gAJe1PxyBOFV0YWYc9uTDE1NM7cmssbUj48P18NpIGjMedomMIauim1PNS BeR6zdnVjtgJ+o7Z06BntiXWk5JLXuZy5Uk1jngwheHg095AjSHQnZi/po0YnfifU9UV FaHeAuR1oikQhRoBpx+zeSHMweJXuAcP8/ZMKJPYc4EgkuXnv6a1UbQbO5HfHcNdP+10 21ulMYK6TcNYhFW3H8YubSJSjgB8UOhE+GnLn9TI/bMyY/qNIbQFGLtPFM9IAg+4HRCO YgKQ== X-Gm-Message-State: ANhLgQ0HnAfLpUWAtt2JyLyJYnwK497pW2dDsUXxeQOmAhMuS3paoIqi gDShLZsm+Pk7EIlNQl/irauPThbzUinbQPG3l0tZ4g== X-Received: by 2002:a25:2688:: with SMTP id m130mr524689ybm.408.1583889251315; Tue, 10 Mar 2020 18:14:11 -0700 (PDT) MIME-Version: 1.0 References: <20200311010908.42366-1-jbi.octave@gmail.com> <20200311010908.42366-4-jbi.octave@gmail.com> In-Reply-To: <20200311010908.42366-4-jbi.octave@gmail.com> From: Eric Dumazet Date: Tue, 10 Mar 2020 18:14:00 -0700 Message-ID: Subject: Re: [PATCH 3/8] tcp: Add missing annotation for tcp_child_process() To: Jules Irenge Cc: boqun.feng@gmail.com, LKML , bpf , netdev , "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Jakub Kicinski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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