Re: [PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data

2019-10-16 Thread Eric Dumazet
On Wed, Oct 16, 2019 at 4:24 PM David Howells wrote: > > Eric Dumazet 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 ta

Re: [PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data

2019-10-16 Thread David Howells
Eric Dumazet 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

Re: [PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data

2019-10-16 Thread David Miller
From: Eric Dumazet 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_d

Re: [PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data

2019-10-15 Thread David Miller
From: Eric Dumazet 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_d

[PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data

2019-10-14 Thread Eric Dumazet
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. Fix