Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3253162pxb; Mon, 24 Jan 2022 05:59:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyspOfOEM+TDBzkzh/TDCCiHkLpbls8mVBQS5kd/6Iqy9KLtqBTylW4FTGQbJp7muaskeLc X-Received: by 2002:a17:902:6b06:b0:14b:550b:4caa with SMTP id o6-20020a1709026b0600b0014b550b4caamr3924793plk.111.1643032747568; Mon, 24 Jan 2022 05:59:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643032747; cv=none; d=google.com; s=arc-20160816; b=We/PNfbnK5g0j+W+5vKzEq4/wwm7SkvErOLv6hpJf3Beo974rhMBertOu+lCXyBqwV Z50MjM69qEs+BBRAeKgfQg3FY2lG0cEkTIHiEFJn9XjcxJghEPGyPXQRad3fqMu1TeT0 oJFV8HuLWZj4TjBeCzOZN6Y1eXr6N21XZaSQLeuhD9UwGtznusoHDFXxivH4LXC/ehm+ S1QMFfI6hc700mbNrhkcuA8ACm7IIDhYO0sR84NW9c6gI4e2rPkkfc50gYPf9o6y0iwS Js8BnpxbI4hkirohrFcYLvWwpOqsCHrrB/fZvyUjsKzZYxm0q+j9sDFQkgijdKNE1EeF cxdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vUBxUoo0e8G16QaWMdWu9QFYTFLGS+0ehY8WAD+BN28=; b=sZNNkFR5rPqaWhbJlXxvX+urAq5nohvcw0u1Mh+yHBd776CQtpPcR7atcfbgZEgAAU /RjT2Ri72UQ9Sg7INZj08DVIbMkS/0ZqNvb8haXVgpx+Y44jvH3O4RSqIG2V5OOwW1DR WDzCiyXq8KP8ojvrHNAioGrz0BFh2iBaYpNzVBpH36wvGrH61LN6JcVRYv2dFSUikXGT ZtW4wKU4vi3FrY/fsAG73JgsvQNTCId3dDJRuIq0LTKoJ8a2WUIrrlc8cIIhAXFzvASl CZpJ5s9tU+Bf1SUnX02Q+fAtLLVwEw2S6HE7yXYNSPAoqlLje3+9WXG/853WWT4pFbXz RE9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UGmommU6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id r83si13521861pgr.15.2022.01.24.05.58.55; Mon, 24 Jan 2022 05:59:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UGmommU6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S239903AbiAWT5s (ORCPT + 99 others); Sun, 23 Jan 2022 14:57:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234957AbiAWT5q (ORCPT ); Sun, 23 Jan 2022 14:57:46 -0500 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7507CC06173B; Sun, 23 Jan 2022 11:57:46 -0800 (PST) Received: by mail-qt1-x835.google.com with SMTP id f5so17155322qtp.11; Sun, 23 Jan 2022 11:57:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=vUBxUoo0e8G16QaWMdWu9QFYTFLGS+0ehY8WAD+BN28=; b=UGmommU6ZoC0S/JBVlhZvYrIDgZPcAa1UVMldu69+OUVlqjN/GRRQNq07y2VykwWng 3OwXXRp3RepsuVS7pmbXTCoKqYFUpGd1FGUyUYlZ9kUwkVMYzQMVshkLdbU5xEjnIZJE 97/dAjXtf/DZvB0uO0iI25yfZCQ4P9rDkna5tjPMvHPlhuBivWNt6LmGX33hvPjCPTMQ ZdIrOwilzxGt8T8lggcSI2pKLjf80D2TJ8sdKUXRMHYDb73VD66kp0SbE/oGMuE0GsE2 SY7ZjItWctaonHBePFO/eFGK4BoHpSUu+quEmOyRYrl++VNNgaDzWc91RVYTzwC0BT+n WiBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vUBxUoo0e8G16QaWMdWu9QFYTFLGS+0ehY8WAD+BN28=; b=TfARsEUggyn3iv0fyG1+tdABcYbQIepDEX0IeyQ3tck+IgZlpa9fBADJB1Q1MpI2WL Z6pYW/wnZkwdm/tjccgk0HA0SIrUfmPrr6vZon8h4vB5UxlTAmfWkrwPjCSG+RKrX+O6 HVTpqZj+49XOAToCuDzg9CRtJET0tkktuB15aPIaLnmLU8YRBOMoyvDEDf46sCbbc+Tp jdPQHdGBvSFilo1+nK45oLrbRdKk5YKhUgPsSTIxxEDvVc74uHp6xZ6xtGePLRqUmC+5 S00u6R1xvBTRCp5UWeJSTrgtNYADQrLwcSHI5WjDheL0g+2f8VIhAhX7eyy0PRF8f8tr vhKQ== X-Gm-Message-State: AOAM531Nh8w+wFQ2pgvPngDLnFZD29kbnCqtLmBqxy37/g+c3TLOLfJU 10wJWZJOkQJSwwBwVC9jVX0= X-Received: by 2002:a05:622a:14a:: with SMTP id v10mr10395206qtw.446.1642967865549; Sun, 23 Jan 2022 11:57:45 -0800 (PST) Received: from localhost ([2600:1700:65a0:ab60:4388:ab9b:beec:5dea]) by smtp.gmail.com with ESMTPSA id y5sm1466588qkj.28.2022.01.23.11.57.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 11:57:45 -0800 (PST) Date: Sun, 23 Jan 2022 11:57:43 -0800 From: Cong Wang To: ycaibb Cc: davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org, kuba@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH] inet: missing lock releases in udp.c Message-ID: References: <20220121031553.5342-1-ycaibb@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220121031553.5342-1-ycaibb@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 21, 2022 at 11:15:53AM +0800, ycaibb wrote: > From: Ryan Cai > > In method udp_get_first, the lock hslot->lock is not released when afinfo->family == AF_UNSPEC || sk->sk_family == afinfo->family is true. This patch fixes the problem by adding the unlock statement. > It should be unlocked by udp_seq_stop(). Do you see any real lockdep warning or bug report? Thanks.