Commit 0f08190f authored by Hans Schillstrom's avatar Hans Schillstrom Committed by Pablo Neira Ayuso

IPVS: fix netns if reading ip_vs_* procfs entries

Without this patch every access to ip_vs in procfs will increase
the netns count i.e. an unbalanced get_net()/put_net().
(ipvsadm commands also use procfs.)
The result is you can't exit a netns if reading ip_vs_* procfs entries.
Signed-off-by: default avatarHans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent d8083deb
...@@ -572,7 +572,7 @@ static const struct file_operations ip_vs_app_fops = { ...@@ -572,7 +572,7 @@ static const struct file_operations ip_vs_app_fops = {
.open = ip_vs_app_open, .open = ip_vs_app_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = seq_release_net,
}; };
#endif #endif
......
...@@ -1046,7 +1046,7 @@ static const struct file_operations ip_vs_conn_fops = { ...@@ -1046,7 +1046,7 @@ static const struct file_operations ip_vs_conn_fops = {
.open = ip_vs_conn_open, .open = ip_vs_conn_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = seq_release_net,
}; };
static const char *ip_vs_origin_name(unsigned flags) static const char *ip_vs_origin_name(unsigned flags)
...@@ -1114,7 +1114,7 @@ static const struct file_operations ip_vs_conn_sync_fops = { ...@@ -1114,7 +1114,7 @@ static const struct file_operations ip_vs_conn_sync_fops = {
.open = ip_vs_conn_sync_open, .open = ip_vs_conn_sync_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = seq_release_net,
}; };
#endif #endif
......
...@@ -2066,7 +2066,7 @@ static const struct file_operations ip_vs_info_fops = { ...@@ -2066,7 +2066,7 @@ static const struct file_operations ip_vs_info_fops = {
.open = ip_vs_info_open, .open = ip_vs_info_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release_private, .release = seq_release_net,
}; };
#endif #endif
...@@ -2109,7 +2109,7 @@ static const struct file_operations ip_vs_stats_fops = { ...@@ -2109,7 +2109,7 @@ static const struct file_operations ip_vs_stats_fops = {
.open = ip_vs_stats_seq_open, .open = ip_vs_stats_seq_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = single_release, .release = single_release_net,
}; };
static int ip_vs_stats_percpu_show(struct seq_file *seq, void *v) static int ip_vs_stats_percpu_show(struct seq_file *seq, void *v)
...@@ -2178,7 +2178,7 @@ static const struct file_operations ip_vs_stats_percpu_fops = { ...@@ -2178,7 +2178,7 @@ static const struct file_operations ip_vs_stats_percpu_fops = {
.open = ip_vs_stats_percpu_seq_open, .open = ip_vs_stats_percpu_seq_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = single_release, .release = single_release_net,
}; };
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment