From: Christoph Hellwig Subject: [PATCH 01/42] net/can: single_open_net needs to be paired with single_release_net Date: Wed, 16 May 2018 11:43:05 +0200 Message-ID: <20180516094346.20506-2-hch@lst.de> References: <20180516094346.20506-1-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-rtc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alessandro Zummo , Alexandre Belloni , devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Greg Kroah-Hartman , jfs-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-afs-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netfilter-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jiri Slaby , linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alexey Dobriyan , megaraidlinux.pdl-dY08KVG/lbpWk0Htik3J/w@public.gmane.org, drbd-dev-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org To: Andrew Morton , Alexander Viro Return-path: In-Reply-To: <20180516094346.20506-1-hch-jcswGhMUV9g@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: drbd-dev-bounces-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org Errors-To: drbd-dev-bounces-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org List-Id: linux-ext4.vger.kernel.org Otherwise we will leak a reference to the network namespace. Signed-off-by: Christoph Hellwig --- net/can/bcm.c | 2 +- net/can/proc.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/can/bcm.c b/net/can/bcm.c index ac5e5e34fee3..8073fa14e143 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c @@ -249,7 +249,7 @@ static const struct file_operations bcm_proc_fops = { .open = bcm_proc_open, .read = seq_read, .llseek = seq_lseek, - .release = single_release, + .release = single_release_net, }; #endif /* CONFIG_PROC_FS */ diff --git a/net/can/proc.c b/net/can/proc.c index fdf704e9bb8c..fde2fd55b826 100644 --- a/net/can/proc.c +++ b/net/can/proc.c @@ -279,7 +279,7 @@ static const struct file_operations can_stats_proc_fops = { .open = can_stats_proc_open, .read = seq_read, .llseek = seq_lseek, - .release = single_release, + .release = single_release_net, }; static int can_reset_stats_proc_show(struct seq_file *m, void *v) @@ -449,7 +449,7 @@ static const struct file_operations can_rcvlist_sff_proc_fops = { .open = can_rcvlist_sff_proc_open, .read = seq_read, .llseek = seq_lseek, - .release = single_release, + .release = single_release_net, }; @@ -492,7 +492,7 @@ static const struct file_operations can_rcvlist_eff_proc_fops = { .open = can_rcvlist_eff_proc_open, .read = seq_read, .llseek = seq_lseek, - .release = single_release, + .release = single_release_net, }; /* -- 2.17.0