Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1647795pxy; Mon, 2 Aug 2021 07:02:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztpJ2qlIWiKVXSGFXFM2MX3tCmpojKwcKfKD/lYNARhIl3NS84foAzxkXLH8CZuTyHKtME X-Received: by 2002:a05:6e02:1561:: with SMTP id k1mr1561885ilu.25.1627912978332; Mon, 02 Aug 2021 07:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912978; cv=none; d=google.com; s=arc-20160816; b=NULfwjhrD2Wl8YU6JDbEbHq5Q+FCaO8bH6Vq+tdAGbpMoSIAjMsmoCgUa1dpW0BgHt qObG6ALxxzFLRPU4240FCoshQ17GcsH5FG5dvGF3kfKO1S2ktlo7LwR3eb3Un0XKcZ2y X0aMjXR5EMYs2yqco5FXka+E4DfCuDYQi2jMRYGs5gf5qsRLxECFN+3BFvOzhAzdPSV+ 3I5XIJ11N7jAq2pkjndtWm55CSLXLhuWmP31AA2SlDJWxSSnG7QIIbO88fZBLInFxTDE gTXmOSRhI59wIG8nFoIYMCT/nNUe+pPbpD6YGcNLcl2wlEbTKEN2CnH5HjKHICClthB3 v/UQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xVnXZVFv7WM9X+Gccu8Lv2aYRNYlL3BvEKB7/mu5i1w=; b=VW53QFwd1+jLfCddSsFUifP4aKSl4dMsyXJVLlou6875xFEguf3TdGWbjQ5zo4sb1X hB+kFVMBvrmzPMfVFuyPXQE0V1/CROIJArzTikf7W/D++zutzM/vsrXWf8Yk9ghUr22/ LMGzvAxvFVv120Bo2LMUjt60B9u+UQUu3m/fhTdtBZGPXCptch3Quy8aJRXw3Tp1Pj+c N9TWZOamXrHMjhO5qq6FvSkq3WZqf1WtQifIZiOGnhsmDNbJ2BjMEvEv1/xwnsX/cOjq cizw8/zJSEXYs9kN/VHcGDLTPxvyNZFOriVsPdJSUZ/qlJaXkd1xh0ueB/rsu7y+qv95 sFqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i6H2N91+; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c15si12139533ioa.59.2021.08.02.07.02.47; Mon, 02 Aug 2021 07:02:58 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=i6H2N91+; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236013AbhHBOBi (ORCPT + 99 others); Mon, 2 Aug 2021 10:01:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:40902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236231AbhHBNzK (ORCPT ); Mon, 2 Aug 2021 09:55:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7426B6113D; Mon, 2 Aug 2021 13:53:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912421; bh=ImPCBySZwg7mTQZobgxAAJo0iA67emeleqf2EXN0ehc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i6H2N91+XJSxyfZAbuP7yVZOWy2OabfAWdlF5txhjRwaAVKezL0g6Ehg/iSpsIzvo piIPnI04FoEAxkas2T+yzpasTsYJP6gLAqcqIbCFkJqkp2/QrrFLNJCvW0H7pLEXSJ IP69TzVbAYjt+RnR15EMVAR+jTIFNsSoKbZOtJ4Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cong Wang , Daniel Borkmann , John Fastabend , Jakub Sitnicki , Lorenz Bauer , Sasha Levin Subject: [PATCH 5.10 51/67] skmsg: Make sk_psock_destroy() static Date: Mon, 2 Aug 2021 15:45:14 +0200 Message-Id: <20210802134340.779743297@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134339.023067817@linuxfoundation.org> References: <20210802134339.023067817@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Cong Wang [ Upstream commit 8063e184e49011f6f3f34f6c358dc8a83890bb5b ] sk_psock_destroy() is a RCU callback, I can't see any reason why it could be used outside. Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Cc: John Fastabend Cc: Jakub Sitnicki Cc: Lorenz Bauer Link: https://lore.kernel.org/bpf/20210127221501.46866-1-xiyou.wangcong@gmail.com Signed-off-by: Sasha Levin --- include/linux/skmsg.h | 1 - net/core/skmsg.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h index 82126d529798..822c048934e3 100644 --- a/include/linux/skmsg.h +++ b/include/linux/skmsg.h @@ -395,7 +395,6 @@ static inline struct sk_psock *sk_psock_get(struct sock *sk) } void sk_psock_stop(struct sock *sk, struct sk_psock *psock); -void sk_psock_destroy(struct rcu_head *rcu); void sk_psock_drop(struct sock *sk, struct sk_psock *psock); static inline void sk_psock_put(struct sock *sk, struct sk_psock *psock) diff --git a/net/core/skmsg.c b/net/core/skmsg.c index c4c224a5b9de..5dd5569f89bf 100644 --- a/net/core/skmsg.c +++ b/net/core/skmsg.c @@ -676,14 +676,13 @@ static void sk_psock_destroy_deferred(struct work_struct *gc) kfree(psock); } -void sk_psock_destroy(struct rcu_head *rcu) +static void sk_psock_destroy(struct rcu_head *rcu) { struct sk_psock *psock = container_of(rcu, struct sk_psock, rcu); INIT_WORK(&psock->gc, sk_psock_destroy_deferred); schedule_work(&psock->gc); } -EXPORT_SYMBOL_GPL(sk_psock_destroy); void sk_psock_drop(struct sock *sk, struct sk_psock *psock) { -- 2.30.2