From: Eric Dumazet <eric.dumazet@gmail.com>
To: Benjamin LaHaise <bcrl@kvack.org>
Cc: David Miller <davem@davemloft.net>,
socketcan@hartkopp.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] pkt_sched: namespace aware ifb
Date: Sat, 12 Jan 2013 21:49:59 -0800 [thread overview]
Message-ID: <1358056199.20249.2121.camel@edumazet-glaptop> (raw)
In-Reply-To: <20130113035013.GJ5259@kvack.org>
On Sat, 2013-01-12 at 22:50 -0500, Benjamin LaHaise wrote:
> On Sat, Jan 12, 2013 at 07:06:14PM -0800, Eric Dumazet wrote:
> > From: Eric Dumazet <edumazet@google.com>
> >
> > act_mirred needs to find the current net_ns, and struct net
> > pointer is not provided in the call chain. We run in process
> > context and current->nsproxy->net_ns is the needed pointer.
> ...
>
> I don't think this is correct. Going by the call chain, tcf_action_add can
> be called because of a netlink message, and that netlink message may not be
> in the same "struct net" as the current process. It looks like the ->init
> operation is going to need to have the namespace passed in for this to work
> correctly.
But it is working in my tests.
I added a WARN and the call stack is :
[ 701.522282] [<ffffffff8108634f>] warn_slowpath_common+0x7f/0xc0
[ 701.522284] [<ffffffff810863aa>] warn_slowpath_null+0x1a/0x20
[ 701.522286] [<ffffffffa00e00e3>] tcf_mirred_init+0x43/0x340 [act_mirred]
[ 701.522289] [<ffffffff81506385>] ? __rtnl_unlock+0x15/0x20
[ 701.522293] [<ffffffff815195e8>] tcf_action_init_1+0x198/0x1e0
[ 701.522295] [<ffffffff815196c8>] tcf_action_init+0x98/0x100
[ 701.522298] [<ffffffff81517f30>] tcf_exts_validate+0x90/0xb0
[ 701.522300] [<ffffffff8151e55b>] u32_set_parms.isra.11+0x3b/0x270
[ 701.522303] [<ffffffff812ffdf0>] ? nla_parse+0x90/0xe0
[ 701.522304] [<ffffffff8151ed16>] u32_change+0x2e6/0x4c0
[ 701.522306] [<ffffffff81518432>] tc_ctl_tfilter+0x4e2/0x720
[ 701.522308] [<ffffffff815064ad>] rtnetlink_rcv_msg+0x11d/0x310
[ 701.522310] [<ffffffff81506390>] ? __rtnl_unlock+0x20/0x20
[ 701.522312] [<ffffffff81522d39>] netlink_rcv_skb+0xa9/0xd0
[ 701.522314] [<ffffffff81503875>] rtnetlink_rcv+0x25/0x40
[ 701.522316] [<ffffffff81522681>] netlink_unicast+0x1b1/0x230
[ 701.522317] [<ffffffff815229fe>] netlink_sendmsg+0x2fe/0x3b0
[ 701.522321] [<ffffffff814dbdf2>] sock_sendmsg+0xd2/0xf0
[ 701.522323] [<ffffffff814dbca0>] ? sock_recvmsg+0xe0/0x100
[ 701.522326] [<ffffffff814dd0f0>] __sys_sendmsg+0x380/0x390
[ 701.522329] [<ffffffff815b20b4>] ? __do_page_fault+0x214/0x460
[ 701.522331] [<ffffffff814df4e9>] sys_sendmsg+0x49/0x90
[ 701.522334] [<ffffffff815b68c2>] system_call_fastpath+0x16/0x1b
Could you elaborate on what could be the problem ?
We hold the RTNL, so I dont think another process could possibly call
tcf_mirred_init()
next prev parent reply other threads:[~2013-01-13 5:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-12 13:48 [RFC davem] revert: net: Make skb->skb_iif always track skb->dev Oliver Hartkopp
2013-01-12 18:13 ` Jiri Pirko
2013-01-12 18:40 ` Oliver Hartkopp
2013-01-12 19:37 ` Jiri Pirko
2013-01-12 20:14 ` Oliver Hartkopp
2013-01-12 21:23 ` David Miller
2013-01-12 21:36 ` David Miller
2013-01-13 3:06 ` [PATCH net-next] pkt_sched: namespace aware ifb Eric Dumazet
2013-01-13 3:50 ` Benjamin LaHaise
2013-01-13 5:49 ` Eric Dumazet [this message]
2013-01-13 14:44 ` Jamal Hadi Salim
2013-01-13 16:41 ` Benjamin LaHaise
2013-01-13 16:57 ` Eric Dumazet
2013-01-13 17:25 ` Jamal Hadi Salim
2013-01-14 5:40 ` Eric Dumazet
2013-01-13 17:46 ` [PATCH net-next] ifb: dont hard code inet_net use Eric Dumazet
2013-01-14 13:13 ` Jamal Hadi Salim
2013-01-14 15:15 ` [PATCH net-next] pkt_sched: namespace aware act_mirred Benjamin LaHaise
2013-01-14 20:10 ` David Miller
2013-01-14 20:13 ` [PATCH net-next] ifb: dont hard code inet_net use David Miller
2013-01-13 14:59 ` [PATCH net-next] pkt_sched: namespace aware ifb Benjamin LaHaise
2013-01-13 16:35 ` Eric Dumazet
2013-01-13 11:01 ` [RFC davem] revert: net: Make skb->skb_iif always track skb->dev Oliver Hartkopp
2013-01-13 13:20 ` David Miller
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=1358056199.20249.2121.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=bcrl@kvack.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=socketcan@hartkopp.net \
/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