From: David Miller <davem@davemloft.net>
To: sasha.levin@oracle.com
Cc: kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
kaber@trash.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, dsahern@gmail.com
Subject: Re: [PATCH] net: Revert "fib_trie: use seq_file_net rather than seq->private"
Date: Wed, 04 Jun 2014 15:12:02 -0700 (PDT) [thread overview]
Message-ID: <20140604.151202.2143622064529754958.davem@davemloft.net> (raw)
In-Reply-To: <1401919352-32263-1-git-send-email-sasha.levin@oracle.com>
From: Sasha Levin <sasha.levin@oracle.com>
Date: Wed, 4 Jun 2014 18:02:32 -0400
> 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>
Thanks a lot for catching this, applied.
prev parent reply other threads:[~2014-06-04 22:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 22:02 Sasha Levin
2014-06-04 22:11 ` David Ahern
2014-06-04 22:44 ` David Ahern
2014-06-04 22:11 ` Sergei Shtylyov
2014-06-04 22:12 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140604.151202.2143622064529754958.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sasha.levin@oracle.com \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®