From: David Miller <davem@davemloft.net>
To: edumazet@google.com
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com,
jakub.kicinski@netronome.com, dhowells@redhat.com
Subject: Re: [PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data
Date: Wed, 16 Oct 2019 12:21:05 -0700 (PDT) [thread overview]
Message-ID: <20191016.122105.1270802508720509186.davem@davemloft.net> (raw)
In-Reply-To: <20191014130438.163688-1-edumazet@google.com>
From: Eric Dumazet <edumazet@google.com>
Date: Mon, 14 Oct 2019 06:04:38 -0700
> 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.
>
> The compiler wont reload sk->sk_user_data at will, and RCU rules
> prevent memory beeing freed too soon.
>
> Fixes: f0308fb07080 ("rxrpc: Fix possible NULL pointer access in ICMP handling")
> Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: David Howells <dhowells@redhat.com>
Applied, thanks Eric.
next prev parent reply other threads:[~2019-10-16 19:21 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 [this message]
2019-10-16 23:24 ` David Howells
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=20191016.122105.1270802508720509186.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dhowells@redhat.com \
--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).