Sasha Levin f830b0223c net: Revert "fib_trie: use seq_file_net rather than seq->private"
This reverts commit 30f38d2fdd79f13fc929489f7e6e517b4a4bfe63.

fib_triestat is surrounded by a big lie: while it claims that it's a
seq_file (fib_triestat_seq_open, fib_triestat_seq_show), it isn't:

	static const struct file_operations fib_triestat_fops = {
	        .owner  = THIS_MODULE,
	        .open   = fib_triestat_seq_open,
	        .read   = seq_read,
	        .llseek = seq_lseek,
	        .release = single_release_net,
	};

Yes, fib_triestat is just a regular file.

A small detail (assuming CONFIG_NET_NS=y) is that while for seq_files
you could do seq_file_net() to get the net ptr, doing so for a regular
file would be wrong and would dereference an invalid pointer.

The fib_triestat lie claimed a victim, and trying to show the file would
be bad for the kernel. This patch just reverts the issue and fixes
fib_triestat, which still needs a rewrite to either be a seq_file or
stop claiming it is.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-04 15:11:41 -07:00
..
2014-05-23 16:28:53 -04:00
2013-12-06 07:24:39 +01:00
2014-05-18 21:10:29 -04:00
2014-06-02 11:00:41 -07:00
2013-12-29 16:34:25 -05:00
2013-10-08 23:19:24 -04:00
2014-06-02 11:00:41 -07:00
2014-05-12 14:03:41 -04:00
2014-04-23 14:53:36 -04:00
2014-06-02 11:00:41 -07:00
2014-06-02 11:00:41 -07:00
2013-09-03 21:41:43 -04:00
2014-02-25 07:04:16 +01:00
2014-02-19 11:41:25 +01:00
2014-05-07 16:06:05 -04:00
2014-06-02 11:00:41 -07:00
2014-06-02 11:00:41 -07:00
2012-03-11 23:42:51 -07:00
2014-05-23 16:28:53 -04:00
2013-05-31 17:19:05 -07:00