summaryrefslogtreecommitdiffstats
path: root/net/can/proc.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-04-11 12:16:13 +0200
committerChristoph Hellwig <hch@lst.de>2018-05-14 16:13:41 +0200
commit441bc62741e6e7f8d428b827c2a7b482a467fc42 (patch)
tree2a1fe7df88635a14c15950c60e32bfde2a985dd1 /net/can/proc.c
parentLinux 4.17-rc5 (diff)
downloadlinux-441bc62741e6e7f8d428b827c2a7b482a467fc42.tar.xz
linux-441bc62741e6e7f8d428b827c2a7b482a467fc42.zip
net/can: single_open_net needs to be paired with single_release_net
Otherwise we will leak a reference to the network namespace. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'net/can/proc.c')
-rw-r--r--net/can/proc.c6
1 files changed, 3 insertions, 3 deletions
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,
};
/*