summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-04-11 06:16:13 -0400
committerChristoph Hellwig <hch@lst.de>2018-05-14 10:13:41 -0400
commit441bc62741e6e7f8d428b827c2a7b482a467fc42 (patch)
tree2a1fe7df88635a14c15950c60e32bfde2a985dd1 /net
parent67b8d5c7081221efa252e111cd52532ec6d4266f (diff)
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')
-rw-r--r--net/can/bcm.c2
-rw-r--r--net/can/proc.c6
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 = {
249 .open = bcm_proc_open, 249 .open = bcm_proc_open,
250 .read = seq_read, 250 .read = seq_read,
251 .llseek = seq_lseek, 251 .llseek = seq_lseek,
252 .release = single_release, 252 .release = single_release_net,
253}; 253};
254#endif /* CONFIG_PROC_FS */ 254#endif /* CONFIG_PROC_FS */
255 255
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 = {
279 .open = can_stats_proc_open, 279 .open = can_stats_proc_open,
280 .read = seq_read, 280 .read = seq_read,
281 .llseek = seq_lseek, 281 .llseek = seq_lseek,
282 .release = single_release, 282 .release = single_release_net,
283}; 283};
284 284
285static int can_reset_stats_proc_show(struct seq_file *m, void *v) 285static 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 = {
449 .open = can_rcvlist_sff_proc_open, 449 .open = can_rcvlist_sff_proc_open,
450 .read = seq_read, 450 .read = seq_read,
451 .llseek = seq_lseek, 451 .llseek = seq_lseek,
452 .release = single_release, 452 .release = single_release_net,
453}; 453};
454 454
455 455
@@ -492,7 +492,7 @@ static const struct file_operations can_rcvlist_eff_proc_fops = {
492 .open = can_rcvlist_eff_proc_open, 492 .open = can_rcvlist_eff_proc_open,
493 .read = seq_read, 493 .read = seq_read,
494 .llseek = seq_lseek, 494 .llseek = seq_lseek,
495 .release = single_release, 495 .release = single_release_net,
496}; 496};
497 497
498/* 498/*