From: Christoph Paasch <christoph.paasch@uclouvain.be>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] ipv4: Use netinet->inet_opt in inet_csk_route_child_sock()
Date: Mon, 20 Aug 2012 14:11:08 +0200 [thread overview]
Message-ID: <5983241.9X7tkM4Yyi@cpaasch-mac> (raw)
In-Reply-To: <20120820.025147.936465141809418575.davem@davemloft.net>
On Monday 20 August 2012 02:51:47 David Miller wrote:
> From: Christoph Paasch <christoph.paasch@uclouvain.be>
> Date: Fri, 17 Aug 2012 23:35:12 +0200
>
> > @@ -404,7 +404,7 @@ struct dst_entry *inet_csk_route_child_sock(struct
> > sock *sk,>
> > {
> > const struct inet_request_sock *ireq = inet_rsk(req);
> > struct inet_sock *newinet = inet_sk(newsk);
> >
> > - struct ip_options_rcu *opt = ireq->opt;
> > + struct ip_options_rcu *opt = rcu_dereference(newinet->inet_opt);
> >
> > struct net *net = sock_net(sk);
>
> We're not inside of a rcu_read_lock() protected section, so this access
> is not legitimate. If you enabled RCU lock debugging, you would have
> triggered a warning in the kernel log.
Oh, sorry... I will resubmit a v2.
Although, I enabled CONFIG_PROVE_RCU (and all other RCU-related debug I could
find) and no warning was triggered.
By the way, in dccp_v4_request_recv_sock() is the code:
newinet->inet_opt = ireq->opt;
Shouldn't this rather be an rcu_assign_pointer() ?
And in cipso_v4_sock_delattr() I believe we should also rather access 'opt'
instead of doing cipso_v4_delopt(&sk_inet->inet_opt) ?
Christoph
--
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://mptcp.info.ucl.ac.be
Université Catholique de Louvain
--
prev parent reply other threads:[~2012-08-20 12:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 21:35 [PATCH] ipv4: Use netinet->inet_opt in inet_csk_route_child_sock() Christoph Paasch
2012-08-20 9:51 ` David Miller
2012-08-20 12:11 ` Christoph Paasch [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=5983241.9X7tkM4Yyi@cpaasch-mac \
--to=christoph.paasch@uclouvain.be \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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