Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC2E7C433F5 for ; Tue, 14 Dec 2021 21:57:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237855AbhLNV5p (ORCPT ); Tue, 14 Dec 2021 16:57:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232829AbhLNV5o (ORCPT ); Tue, 14 Dec 2021 16:57:44 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8737C061574 for ; Tue, 14 Dec 2021 13:57:43 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id p27-20020a05600c1d9b00b0033bf8532855so14738127wms.3 for ; Tue, 14 Dec 2021 13:57:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2QyzlaEvGftgMM8DTXQodMrr/OBpAbRBg3r+WHz53PU=; b=UkIn6MuatFncBY4nnc6Ob1g/v+sstRf43AWf8CSJ9LarrthuyEpzEUO9/JfVDYN1hQ R0NjN60m8xrB6vUnHIHW2ur6FmzgVsTeqScRQs+xvVhUq8jG5GezLfIJzJqvEESh/FWZ HSUc+5FDjTOLhG/+ntOmTM6/Q/NL4+JzWUOhzQq2ukFCZguoLcfXs66B3poauVd8tNgz QbiGUfq3LMonzwZnHhOphoP/sBwQT1+hEMdrFm/lfbh8IZfOKEJKZB7e+MB1S6Kf6qj8 l2EjqlyyM9t1e7je/VjzpRBKKszneyrdOzNzeqAqeCgnIzPtY3e8WUSWdHfl4w0T+mbl KK6g== 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=2QyzlaEvGftgMM8DTXQodMrr/OBpAbRBg3r+WHz53PU=; b=RY9SqWkfwz2M8iV/izzcYk0/OQ9HHpVkrvHZDF4BQT10jBsuzaRBRbKCmnhAbA6cY9 pJicu9Cjy8xJEeoztW7rK73GMHpSNrmfy2EatsnDANQzPRii7nBOL08l/ocMjwJuSmo+ EsxF/poRnRmkj12fU6NQydgNFnq7U41w1flUImDsWJAkNaDx3yv0uu18Sufx18b9e91V LULKhacT3I+E8jb8CJt15sxeEtZt4h3Yoo6udX9QWgazGWu5n8ts8aiX+bADDvsmzZxI ajVBZZR2S6K1BVK7lLMv+s3hx1AhQ2Hll/oXAWokXQBSXrzT7yWMBWim49HdUVEk6Ma/ wBig== X-Gm-Message-State: AOAM531S7AzzV3ghDc72vXu0CwBA0/kuXrkhQePqn/hSnBC9VY6N+78/ esbismXYv0b2yUKWnQdnjv9Pv8lwuuiuWg== X-Google-Smtp-Source: ABdhPJx2yH+Z25DQk22J6l9wWexwTfXulU5Erm2Nt5fUwPzVzm5FrUE1F7Fv1r3tHCrukQP1gYIK1g== X-Received: by 2002:a05:600c:35c8:: with SMTP id r8mr1862972wmq.8.1639519062161; Tue, 14 Dec 2021 13:57:42 -0800 (PST) Received: from localhost.localdomain ([2.31.167.18]) by smtp.gmail.com with ESMTPSA id d15sm145504wri.50.2021.12.14.13.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Dec 2021 13:57:41 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, Vlad Yasevich , Neil Horman , Marcelo Ricardo Leitner , "David S. Miller" , Jakub Kicinski , lksctp developers , "H.P. Yarroll" , Karl Knutson , Jon Grimm , Xingang Guo , Hui Huang , Sridhar Samudrala , Daisy Chang , Ryan Layer , Kevin Gao , netdev@vger.kernel.org Subject: [RESEND 1/2] sctp: export sctp_endpoint_{hold,put}() for use by seperate modules Date: Tue, 14 Dec 2021 21:57:31 +0000 Message-Id: <20211214215732.1507504-1-lee.jones@linaro.org> X-Mailer: git-send-email 2.34.1.173.g76aa8bc2d0-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org net/sctp/diag.c for instance is built into its own separate module (sctp_diag.ko) and requires the use of sctp_endpoint_{hold,put}() in order to prevent a recently found use-after-free issue. Cc: Vlad Yasevich Cc: Neil Horman Cc: Marcelo Ricardo Leitner Cc: "David S. Miller" Cc: Jakub Kicinski Cc: lksctp developers Cc: "H.P. Yarroll" Cc: Karl Knutson Cc: Jon Grimm Cc: Xingang Guo Cc: Hui Huang Cc: Sridhar Samudrala Cc: Daisy Chang Cc: Ryan Layer Cc: Kevin Gao Cc: linux-sctp@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones --- net/sctp/endpointola.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index 48c9c2c7602f7..7c36056f3a1b4 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c @@ -226,6 +226,7 @@ void sctp_endpoint_hold(struct sctp_endpoint *ep) { refcount_inc(&ep->base.refcnt); } +EXPORT_SYMBOL_GPL(sctp_endpoint_hold); /* Release a reference to an endpoint and clean up if there are * no more references. @@ -235,6 +236,7 @@ void sctp_endpoint_put(struct sctp_endpoint *ep) if (refcount_dec_and_test(&ep->base.refcnt)) sctp_endpoint_destroy(ep); } +EXPORT_SYMBOL_GPL(sctp_endpoint_put); /* Is this the endpoint we are looking for? */ struct sctp_endpoint *sctp_endpoint_is_match(struct sctp_endpoint *ep, -- 2.34.1.173.g76aa8bc2d0-goog