Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1783532ybv; Sun, 23 Feb 2020 15:18:25 -0800 (PST) X-Google-Smtp-Source: APXvYqxfOXDdAOLxzXkjXUBzIH5mbKINWAV4XU7FL3PIKSQaNtJ5sMMhfZ7r0vEoONvvVrILjSeX X-Received: by 2002:aca:3114:: with SMTP id x20mr10664313oix.121.1582499905830; Sun, 23 Feb 2020 15:18:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582499905; cv=none; d=google.com; s=arc-20160816; b=udfJCATYWkWt2Ld3kLFjTaSwqug9Ug2jy+03e8KmzJG/woUlGx0LHS9OiCCvPbU249 DNqdxEyww+x6fWFZF0yk/uQIoVzP+TE9ug02X/VmUDP4HlZ7SdozNwdraNif/wUl8LgI PkV5Eo6f154vLGbGCTgnhm5nWeEic0glQ7cRj7tJ5lbaZryjVV4yCW+ZTLSMezduASHV oSY1o19boPmgs72uRDgTuGEu7mh3ME1bXxYQKcj0J1OCw4GIEVBk+ssWT1qwgDqPUgQl c1SRSUZzkH/BRQn9e+0xLX0xlRIiLvV4bI0IxDtZ63sQ6FRzu3SVSIUKK29Ff4tSRlry c18g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IxPYnFwdm6HYoZarbVA1a85F6D8H58D7m4Xg57cuQ3I=; b=RGVG+TyAIOWg99lOWppcU7ikYTDHUEXDQlXxzmPAsW0kO9sz2eymoTsmomxbVhddC6 6W2VX3FDqvKKOuwE8Y9xVQ9808YV4iQTDHTNm+2jJL1VD1Oa39IEoHVr4jDdIQ+Ph0aO Y3BYRIMCjUjDwP2YXbX2kT7uA0WwiR/RGWKYDytffB2h33p/ZkPKrXdVOrBkQghCeFkO aIDunk0ZXwZ2IVyHEXc99uvcZ/PJjDp1FcVJsjfKBniVlK/tYVNwxGFpnWq9SknW1A/z A4jmiTGb29X01BYXo7WSFLZ6a7o9vp1Ht0IBcwAJ7em6NdlCtiLypXV7RcQk9Uh6tMr2 OVTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hJEfNdUl; 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 w4si5262392otl.214.2020.02.23.15.18.14; Sun, 23 Feb 2020 15:18:25 -0800 (PST) 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=hJEfNdUl; 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 S1727268AbgBWXSB (ORCPT + 99 others); Sun, 23 Feb 2020 18:18:01 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:35757 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727207AbgBWXR7 (ORCPT ); Sun, 23 Feb 2020 18:17:59 -0500 Received: by mail-wm1-f66.google.com with SMTP id b17so7457625wmb.0; Sun, 23 Feb 2020 15:17:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IxPYnFwdm6HYoZarbVA1a85F6D8H58D7m4Xg57cuQ3I=; b=hJEfNdUlRN46gddN4A6STA4svNTqFZlPSiI77hwK1jiYQT1XP65YDz+AlW4FiOnLUN ryNH7h1lp3DKqmBLABQWCa6SRfyU6cw/+F3UExOapJkj5Ne3LsP5wFvLnv4tOXXQP1ki eDO3INSfT9gfjsTUH//R3yOJp3akeoG1nSenyKm4m+HF1PQEG+xajZLxI/yX+B0t96FB RmQC58oGzsCLkL+uqrlzEOEQ9uQNCPtzNiyr9tSw/NFW/is5v9cGV0MFw80AoOqUEsOm ptSZae0ykgit8MCCAJhThawefmjmu6NO2oo7cluWhqsRvQpB0yCxRWj0ixjsef5SnY6S LX5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IxPYnFwdm6HYoZarbVA1a85F6D8H58D7m4Xg57cuQ3I=; b=OJLpB0vEepckurDFnPiY1QkRfm3tS0aqc+CuuqAN9JNSy3+uUjzcA8XGnRvuCoAOxv CxSxnp3qI2IPssSzBgHv8VKjTwGXAeACL4RXHDWZ3HUCQ2N4q+MdFjQ0ImTlZXrE7aOC mtDBMWbc2MqMtpQTIFCXtOEuYG0C7p7X47Ct9svOddx1nok2yYrKeGKBxPqxKuQROtHv 8pUPWOCTLj91gHDHOsFoh77FsazNm1K7Wd3/TWikR6+7/fEFX/HqGYA0d6FcHD6+puNE CX9z8fcpHC0SBMtO6SB9vsoZWCofwpgtOlXVgYa2MPVurhcHi1tLeBrTP2w40SIdOcO9 mIxQ== X-Gm-Message-State: APjAAAUQGvg9NQ+9aqK9M1s388QUSsIivr4DsDCN/ZJ1443rwwX/p2i5 fJPdWvl60hGzyXbh0zIJuQ== X-Received: by 2002:a1c:df09:: with SMTP id w9mr17047688wmg.143.1582499877478; Sun, 23 Feb 2020 15:17:57 -0800 (PST) Received: from ninjahost.lan (host-2-102-13-223.as13285.net. [2.102.13.223]) by smtp.googlemail.com with ESMTPSA id q6sm8968203wrf.67.2020.02.23.15.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 15:17:57 -0800 (PST) From: Jules Irenge To: boqun.feng@gmail.com Cc: jbi.octave@gmail.com, linux-kernel@vger.kernel.org, Vlad Yasevich , Neil Horman , Marcelo Ricardo Leitner , "David S. Miller" , Jakub Kicinski , linux-sctp@vger.kernel.org (open list:SCTP PROTOCOL), netdev@vger.kernel.org (open list:NETWORKING [GENERAL]) Subject: [PATCH 04/30] sctp: Add missing annotation for sctp_err_finish() Date: Sun, 23 Feb 2020 23:16:45 +0000 Message-Id: <20200223231711.157699-5-jbi.octave@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200223231711.157699-1-jbi.octave@gmail.com> References: <0/30> <20200223231711.157699-1-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse reports a warning at sctp_err_finish() warning: context imbalance in sctp_err_finish() - unexpected unlock The root cause is a missing annotation at sctp_err_finish() Add the missing __releases(&((__sk)->sk_lock.slock)) annotation Signed-off-by: Jules Irenge --- net/sctp/input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sctp/input.c b/net/sctp/input.c index efaaefc3bb1c..55d4fc6f371d 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c @@ -548,6 +548,7 @@ struct sock *sctp_err_lookup(struct net *net, int family, struct sk_buff *skb, /* Common cleanup code for icmp/icmpv6 error handler. */ void sctp_err_finish(struct sock *sk, struct sctp_transport *t) + __releases(&((__sk)->sk_lock.slock)) { bh_unlock_sock(sk); sctp_transport_put(t); -- 2.24.1