All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xin Long <lucien.xin@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: network dev <netdev@vger.kernel.org>, davem <davem@davemloft.net>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>
Subject: Re: [PATCH net] route: add rcu_read_lock when lookup route and update fnhe in __ip_do_redirect
Date: Tue, 2 Feb 2016 02:14:50 +0800	[thread overview]
Message-ID: <CADvbK_eQEv+SVucvZcDrdf6y6xHt1Zuu0Fs69KvvHoHL-cw-aQ@mail.gmail.com> (raw)
In-Reply-To: <1454348968.7627.174.camel@edumazet-glaptop2.roam.corp.google.com>

On Tue, Feb 2, 2016 at 1:49 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Tue, 2016-02-02 at 01:16 +0800, Xin Long wrote:
>
>> no, no stack dump was found.
>> by reviewing code, I found it when I cooked another patch.
>>
>> and the path that __ip_do_redirect() is called should be:
>>
>> icmp_rcv |-> icmp_unreach  -\
>>               |-> icmp_redirect -> icmp_socket_deliver -> ipprot->err_handler()
>> [tcp_v4/6_err, sctp_v4/6_err, dccp_v4/6_err, udpv4/6_err ...]
>>
>> -> ... -> __ip_do_redirect()
>>
>> I checked the codes for many times, didn't find any rcu_lock on this path,
>> unless we treat BH as rcu_lock.
>
> Well I believe you missed something yes.
>
> All RX paths run in rcu_read_lock()
>
> ip_local_deliver_finish()
> ipv6_rcv()
> ip6_input_finish()

Ah, right, I never thought the lock might start from ip_rcv.
Thanks, Eric.

>
>
>

      reply	other threads:[~2016-02-01 18:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 10:22 [PATCH net] route: add rcu_read_lock when lookup route and update fnhe in __ip_do_redirect Xin Long
2016-02-01 13:46 ` Eric Dumazet
2016-02-01 17:16   ` Xin Long
2016-02-01 17:49     ` Eric Dumazet
2016-02-01 18:14       ` Xin Long [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=CADvbK_eQEv+SVucvZcDrdf6y6xHt1Zuu0Fs69KvvHoHL-cw-aQ@mail.gmail.com \
    --to=lucien.xin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=hannes@stressinduktion.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.