From: David Howells <dhowells@redhat.com>
To: Eric Dumazet <edumazet@google.com>
Cc: dhowells@redhat.com, "David S . Miller" <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
Eric Dumazet <eric.dumazet@gmail.com>,
Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: Re: [PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data
Date: Thu, 17 Oct 2019 00:24:36 +0100 [thread overview]
Message-ID: <8142.1571268276@warthog.procyon.org.uk> (raw)
In-Reply-To: <20191014130438.163688-1-edumazet@google.com>
Eric Dumazet <edumazet@google.com> wrote:
> We need to extend the rcu_read_lock() section in rxrpc_error_report()
> and use rcu_dereference_sk_user_data() instead of plain access
> to sk->sk_user_data to make sure all rules are respected.
Should I take it that the caller won't be guaranteed to be holding the RCU
read lock?
Looking at __udp4_lib_err(), that calls __udp4_lib_err_encap(), which calls
__udp4_lib_err_encap_no_sk(), which should throw a warning if the RCU read
lock is not held.
Similarly, icmp_socket_deliver() and icmpv6_notify() should also throw a
warning before calling ->err_handler().
Does that mean something further up the CPU stack is going to be holding the
RCU read lock?
David
next prev parent reply other threads:[~2019-10-16 23:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 13:04 [PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data Eric Dumazet
2019-10-16 3:15 ` David Miller
2019-10-16 19:21 ` David Miller
2019-10-16 23:24 ` David Howells [this message]
2019-10-16 23:35 ` Eric Dumazet
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=8142.1571268276@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=jakub.kicinski@netronome.com \
--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;
as well as URLs for NNTP newsgroup(s).