Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1361766pxb; Fri, 21 Jan 2022 16:32:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEZWL5ZXtnKZeGVnR+Aszfc4a+bY7MK3hrrLQ1GAQE7vyVz7Y3GqZYG5vsEITQmbJW6Fwj X-Received: by 2002:a17:90b:384d:: with SMTP id nl13mr3087416pjb.46.1642811521904; Fri, 21 Jan 2022 16:32:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642811521; cv=none; d=google.com; s=arc-20160816; b=zbh98Ksyxzr5Om1U6gdJYGk+jEAFVDfBPiPxRHyq2Mh6R24Sj5Mw6+tXh9ZTkiHrj3 dPBuBNkOzc1+7/TCNmmAEX5f3oFOQGKP2uO5hd8kbLURUcJjbV/izExY6NBGsrsVdKuE 46Hf3ulNJg4HStBIvTuSgEzvNTsl8OOdHYvvNMZINF8xudWjhhETwGZRapHOub1/FD57 FFeVrb7PyT0lHJktJatkXLgY4TiarE6T7+o6uRL7SgfPbdn5hJn7dEHIhW0XtHJ9c+KZ iyLI6qGuoB4ySS3Gs5HZC0Q+2ja/sWtcF6twS/bE55XfMA3D3gma/PXAU+OHV12HHcVr +qYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CGitTWNmCApPfercouJnCpmunwtb4U1B1S9nDxOAfUY=; b=RZtPdP2oecbCQqO7BmXhzedqzRnPNGvZT1KuoSicnVBGIEA77+jTNWcTpzsp82yVE8 50Bxl4KHr4RLJpCELC82pS9poaLHytvPeZAKZXgP+ehcULC1sUDwwl9VCz+oWnm8c3kP YnN7Sff/E+S0Tfe5Ulkc6ih07lMm0JwGgCUHHiIx+cj3+zLp48aC6hrx+nbiw1U9vvch xd1mG9oA1xFWEJs9MZ9ygD3+q9S1Nk5NU+KL+2rcJoJB2SbqtecBWusm2WGbkZYbBsit TDMWx1gZDV6jGpdGWk1adiiIDFXQhV2mVmdrL9V3zDWs6dilk8TVvay8VnwEg/XMqov7 5EVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qPM5pBm7; 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 n1si1610546plf.417.2022.01.21.16.31.49; Fri, 21 Jan 2022 16:32:01 -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=qPM5pBm7; 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 S232645AbiAUDTT (ORCPT + 99 others); Thu, 20 Jan 2022 22:19:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230085AbiAUDTS (ORCPT ); Thu, 20 Jan 2022 22:19:18 -0500 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98FB5C061574; Thu, 20 Jan 2022 19:19:18 -0800 (PST) Received: by mail-pf1-x42c.google.com with SMTP id e28so3217297pfj.5; Thu, 20 Jan 2022 19:19:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CGitTWNmCApPfercouJnCpmunwtb4U1B1S9nDxOAfUY=; b=qPM5pBm7UJ+1/zUu7fTPbIs4gTRtuFzYxiovsxCPfquDFxKngb4lW73EArboB9uIZF 8+479yhIE1ld3jPnfSZF1k0ZVmxuPMUj1Wwztib2o0DayeCD+1CifryLSKiDPqgBw75W ApkM4UnKuVbTzUUTVX2qUwJNWpnvATsOOH2YiaLV0ilX2XpI7fDpuTK+xG63wFa7a2kG UYW3YaN2+waOSrj1jjQ9cWHGPOWL03oeM1OZNbZt/0UYOclcDpaoESpFxnyDKoiVc6xP DMb9UUUyzBcBKa0w9tUHROXPzwGXZcxC/9M3lxHFREkqvOYoI4S3u1QzFcJ4VI41/fGy GP9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CGitTWNmCApPfercouJnCpmunwtb4U1B1S9nDxOAfUY=; b=qBF2l3d0HsOzWeBp1DSp4bU/Vm1GTNBn05FUlIVy7d+fbk19F3vOV+3ox3M7hcM91S TMpcaogKGb/HjlOfuVo6jBiXl4drS6D46FQ/yBBI0G9QVjXgryfonWtyKn1MSTYS73a7 HT9MalVXMHM5YP/XF28Ystm7luuyAsPEmRMb9ZyPPA9xwqpFHw8iHKd7GtK5HkMkRtls qls3xrYwp/46X+ulOWK+55J0Gev1+k4XTNF1nPkkNJN2k7QXRREmEubHpZkl4l+sTIE9 t5ZsffgXnIADXX6eE3UsbPTzISAvblGBKrNd3elW5HfXMpcnzdC2WyDZ4MKs1B6Ujasg VaZg== X-Gm-Message-State: AOAM533R5c0Bz/VNgKlLqLGxWN2NyPZWSa05jlp7LowDG7jhKQLwOpvn siCdVk7ZnJSSzwFDQ9ve1Oo= X-Received: by 2002:a63:6e4e:: with SMTP id j75mr1505084pgc.293.1642735158089; Thu, 20 Jan 2022 19:19:18 -0800 (PST) Received: from localhost.localdomain ([106.11.30.62]) by smtp.gmail.com with ESMTPSA id t8sm4705456pfg.210.2022.01.20.19.19.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jan 2022 19:19:17 -0800 (PST) From: ycaibb To: davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org, kuba@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ycaibb@gmail.com Subject: [PATCH] inet: missing lock releases in igmp.c Date: Fri, 21 Jan 2022 11:19:11 +0800 Message-Id: <20220121031911.5570-1-ycaibb@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ryan Cai In method igmp_mcf_get_next, the lock state->im->lock is not released when likely(psf) returns true. Signed-off-by: Ryan Cai --- net/ipv4/igmp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index d2e2b3d18c66..db6c7bfba1b8 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -2903,6 +2903,7 @@ static inline struct ip_sf_list *igmp_mcf_get_first(struct seq_file *seq) if (likely(psf)) { state->im = im; state->idev = idev; + spin_unlock_bh(&im->lock); break; } spin_unlock_bh(&im->lock); -- 2.33.0