Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp453829rdg; Tue, 10 Oct 2023 15:51:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGssdWjC3+yUTf26VurhQyQGxN2xOZjTnrP7spn76kDM4hITRMbToIVqwBW7oiG8ZRDVF0M X-Received: by 2002:a54:4002:0:b0:3a7:4876:6044 with SMTP id x2-20020a544002000000b003a748766044mr19782629oie.52.1696978309745; Tue, 10 Oct 2023 15:51:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696978309; cv=none; d=google.com; s=arc-20160816; b=KYtnbDa9nZ/IIdAoatFrX1RctWfP0KIosoFdYrYSw2kk9q210oeHoSnkid33w1+LG1 VVNp010W2PCM4G7moLlpdkBQiALgdQGlKUrcgnd9/KUBre/wn3gSbuRVhB8cG9tMELot 0zwKaqqsS+StEw0YnoywFRImjZKDKAnxHvge79xWr9nDQCdJEL3BKIP7FOUWi2MxOsda YtY4+sPo0kmlut8EfKq31oP8LB+sSbaglbeKW2Ru2fTGAxrM42Px0i+hXxBdA0k2r09P szKJ2ciRAzEJPlSGUb7pJGyRClvm39C7GIcRQOKC71SNCMCFeC0/NedlRtPtg7PgTIlC /57w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=MAPx7emm+jvc2q+Bc3jRC8KUctxaIgAys23gkHTb/Ng=; fh=W4Vs403E9KFfLMMArugCJ6znJAgkQnNXNkVMOCYiuzU=; b=MIGxdwCrADIxCT3hQd3MGdFyRW1zfehDX82xvNJ9C1hsfJ1M4T3A5giKynH14kGCRg KAVX7U68zrJnGCxdl6Il1BFlbV+BIE5Ja8dl6mSajIFkMgK18tekn1rypzMCBRH9j2i5 kurFQDgzWtlTGQBWtU/ac2fVsZkKnD54Hz6mlX9niOZzLoVuCNVfi4oQmDKMen3xMh+j 9r9RkkG8bIVQAateSrOuG6hdAIgi5iGuu9RfD5E/uZWioQdPsFB97nFIdruzvwYQ4Dw+ oLx/Vo3KI2awxbWWSDjpyyvKeFLfmdRvtmynL98FdiL2IJ46SkWlmR08KfnHRdvK1DJL N6MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MtF6M9bZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id a22-20020a637f16000000b00565701e9a36si12463142pgd.752.2023.10.10.15.51.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 15:51:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MtF6M9bZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id B399980E6C76; Tue, 10 Oct 2023 15:51:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234654AbjJJWvh (ORCPT + 99 others); Tue, 10 Oct 2023 18:51:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234733AbjJJWvW (ORCPT ); Tue, 10 Oct 2023 18:51:22 -0400 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E72F7E3; Tue, 10 Oct 2023 15:51:16 -0700 (PDT) Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6c67060fdfaso4270598a34.2; Tue, 10 Oct 2023 15:51:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696978276; x=1697583076; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=MAPx7emm+jvc2q+Bc3jRC8KUctxaIgAys23gkHTb/Ng=; b=MtF6M9bZ/NnRGwat9LutdqYWFFBegynfMrSQDEbc/N5yBgtfSitCWRI3DCT0hwFfFQ V+oBnVxQN9OwOnBPDg3iCGgkp7FVKiIVvimEnyGQVF5olaWdgCSSqYzqRBjbAYqEH9/Q oIWv9Ougp6zTHsCreSAZrhGnVtMkMskTFqTcit2Kpe4A2dHqPf/gNg68VMMG8iZkOj0e x3WL+oFBxeBQlHuoD5fCd53pCwoJqoUwRzYNWNQHGVwLnQRaocIaINN6MiKsnNij/c5p gAgr8mMxuXPGuuwIKcefWVECxu0QG/cshuzEdasQQA2H50C/SIA0kFvD/wpqkPOmfX/a JtSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696978276; x=1697583076; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MAPx7emm+jvc2q+Bc3jRC8KUctxaIgAys23gkHTb/Ng=; b=mICC7/ib+xGjQ3v1TZtvktvw9sp+yOUqd/tfROo0+ZDU8ZSNvjJrAbXihEmybLNwcp wqg/3CpUc4KkYBzEslyaUvksr/l93s3MFDMOfWV8FHaeeVrpmWmW3vdv0f7BbV5Gm0kw mhkbJNPrpSCjzqJ5QEJPq7cmTFSW/m7iY1akW8V5NCmaBU4o2o+cbrCbtGgpplSu4Qp3 QLdsK28XyXliISuBt21PGDq+2SNbfc9t317tny4L3IB7cYdZVcH6CpC9Z8+QMv9gUI92 tsVoAnYsBMK76bzi/OUJmdQDe5bf5c2S3G1QShbcYc9o8maC5hQMHZbzFLdPvjd/m672 hPrg== X-Gm-Message-State: AOJu0YypkZ6ImCUaEGC6ImTJ4jGVAKE9Jn9RaWd/biY0eDRBiBhbmbOW hXn9wBHQYouKmhztH1m5mRs= X-Received: by 2002:a05:6830:442:b0:6c6:42ca:ed52 with SMTP id d2-20020a056830044200b006c642caed52mr20713072otc.30.1696978276144; Tue, 10 Oct 2023 15:51:16 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id s29-20020a63925d000000b0059a1c256bb2sm2545977pgn.60.2023.10.10.15.51.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Oct 2023 15:51:15 -0700 (PDT) Message-ID: Date: Tue, 10 Oct 2023 15:51:13 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Remove extra unlock for the mutex Content-Language: en-US To: Abhinav Singh , davem@davemloft.net, dsahern@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org References: <20231010224630.238254-1-singhabhinav9051571833@gmail.com> From: Florian Fainelli In-Reply-To: <20231010224630.238254-1-singhabhinav9051571833@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 10 Oct 2023 15:51:47 -0700 (PDT) X-Spam-Level: ** On 10/10/23 15:46, Abhinav Singh wrote: > There is a double unlock on mutex. This can cause undefined behaviour. Where is the double unlock of head->lock (which is a spinlock and not a mutex, btw)? > > Signed-off-by: Abhinav Singh > --- > net/ipv4/inet_connection_sock.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c > index aeebe8816689..f11fe8c727a4 100644 > --- a/net/ipv4/inet_connection_sock.c > +++ b/net/ipv4/inet_connection_sock.c > @@ -597,7 +597,6 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum) > } > if (head2_lock_acquired) > spin_unlock(&head2->lock); > - spin_unlock_bh(&head->lock); > return ret; > } > EXPORT_SYMBOL_GPL(inet_csk_get_port); -- Florian