From patchwork Mon Jan 16 15:43:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 13103482 X-Patchwork-Delegate: kuba@kernel.org 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 A6783C46467 for ; Mon, 16 Jan 2023 16:27:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233106AbjAPQ13 (ORCPT ); Mon, 16 Jan 2023 11:27:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233038AbjAPQ1C (ORCPT ); Mon, 16 Jan 2023 11:27:02 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED65123C6C; Mon, 16 Jan 2023 08:15:11 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AB8A3B80DC7; Mon, 16 Jan 2023 16:15:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A516C433D2; Mon, 16 Jan 2023 16:15:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1673885709; bh=WqXCNM8e2JOAaSm9hO5sOOrv/C98ZtNtqiUbyI+LPL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e16vqbLvoLQZWbGWxBwTkO+S4PnZlZjEGyUA5JW/24rfIEM1EKqv4hH1oFZTKFFYj 3frNInuAKlC3jC3wzAdDAd6ydAbuZyVbcBpoT3R0yBQYcruIEwXn7a9lI3NvghMxUr lYV+QU76nQX6wGLo/SVkaf4JXiPzbz3oIGwC/MrA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, kernel test robot , David Howells , Marc Dionne , linux-afs@lists.infradead.org, netdev@vger.kernel.org, Sasha Levin Subject: [PATCH 5.4 125/658] net, proc: Provide PROC_FS=n fallback for proc_create_net_single_write() Date: Mon, 16 Jan 2023 16:43:33 +0100 Message-Id: <20230116154915.183915053@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230116154909.645460653@linuxfoundation.org> References: <20230116154909.645460653@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: David Howells [ Upstream commit c3d96f690a790074b508fe183a41e36a00cd7ddd ] Provide a CONFIG_PROC_FS=n fallback for proc_create_net_single_write(). Also provide a fallback for proc_create_net_data_write(). Fixes: 564def71765c ("proc: Add a way to make network proc files writable") Reported-by: kernel test robot Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org Signed-off-by: Sasha Levin --- include/linux/proc_fs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 865d02c224ad..b8d41d0e7b46 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -127,8 +127,10 @@ static inline void proc_remove(struct proc_dir_entry *de) {} static inline int remove_proc_subtree(const char *name, struct proc_dir_entry *parent) { return 0; } #define proc_create_net_data(name, mode, parent, ops, state_size, data) ({NULL;}) +#define proc_create_net_data_write(name, mode, parent, ops, write, state_size, data) ({NULL;}) #define proc_create_net(name, mode, parent, state_size, ops) ({NULL;}) #define proc_create_net_single(name, mode, parent, show, data) ({NULL;}) +#define proc_create_net_single_write(name, mode, parent, show, write, data) ({NULL;}) static inline struct pid *tgid_pidfd_to_pid(const struct file *file) {