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 01:16:03 +0800	[thread overview]
Message-ID: <CADvbK_fScqzKzo-dfRWoAwdYBimEeXjns-1D0uD3WoERoL30hw@mail.gmail.com> (raw)
In-Reply-To: <1454334407.7627.163.camel@edumazet-glaptop2.roam.corp.google.com>

>
> But the whole __ip_do_redirect() needs to be called from rcu_read_lock()
> already.
>
> No need to add another rcu_read_lock() around fib_lookup()
>
> How did you come doing this patch ? Any particular stack dump or
> something ?
>
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.

did I miss something ?

Thanks.

>
>
>
>
>

  reply	other threads:[~2016-02-01 17:16 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 [this message]
2016-02-01 17:49     ` Eric Dumazet
2016-02-01 18:14       ` Xin Long

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_fScqzKzo-dfRWoAwdYBimEeXjns-1D0uD3WoERoL30hw@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.