On Wed, 2016-08-24 at 02:24 +0900, Lorenzo Colitti wrote:
> On Wed, Aug 24, 2016 at 2:16 AM, David Ahern wrote:
> >> So you'd remove the sock_put and sock_gen_put calls from tcp_abort and
> >> just add one sock_gen_put in tcp_diag_destroy? That does seem simpler.
> >
> > untested and mangled on a
On Wed, Aug 24, 2016 at 2:16 AM, David Ahern wrote:
>> So you'd remove the sock_put and sock_gen_put calls from tcp_abort and
>> just add one sock_gen_put in tcp_diag_destroy? That does seem simpler.
>
> untested and mangled on a copy and paste but the intent is:
...
> if (IS_ERR(sk))
>
On Wed, Aug 24, 2016 at 2:02 AM, David Ahern wrote:
>> Looking at the code again, it seems that there's a bug in
>> sock_diag_destroy. If the destroy operation does not occur (e.g., if
>> sock_diag_destroy returns EPERM, or the protocol doesn't support
>> destroy), then it doesn't release the refc
On 8/23/16 11:13 AM, Lorenzo Colitti wrote:
> On Wed, Aug 24, 2016 at 2:02 AM, David Ahern wrote:
>>> Looking at the code again, it seems that there's a bug in
>>> sock_diag_destroy. If the destroy operation does not occur (e.g., if
>>> sock_diag_destroy returns EPERM, or the protocol doesn't supp
On 8/23/16 10:37 AM, Lorenzo Colitti wrote:
> On Wed, Aug 24, 2016 at 12:02 AM, David Ahern
> wrote:
>> +int udp_abort(struct sock *sk, int err)
>> +{
>> + lock_sock(sk);
>> +
>> + sk->sk_err = err;
>> + sk->sk_error_report(sk);
>> + udp_disconnect(sk, 0);
>
> I notice th
On Wed, Aug 24, 2016 at 12:02 AM, David Ahern wrote:
> +int udp_abort(struct sock *sk, int err)
> +{
> + lock_sock(sk);
> +
> + sk->sk_err = err;
> + sk->sk_error_report(sk);
> + udp_disconnect(sk, 0);
I notice that udp_disconnect does "inet->inet_daddr = 0" but doesn't
to
CC Lorenzo Colitti
On Tue, 2016-08-23 at 08:02 -0700, David Ahern wrote:
> This implements SOCK_DESTROY for UDP sockets similar to what was done
> for TCP with commit c1e64e298b8ca ("net: diag: Support destroying TCP
> sockets.") A process with a UDP socket targeted for destroy is awakened
> and
On Tue, 2016-08-23 at 08:02 -0700, David Ahern wrote:
> This implements SOCK_DESTROY for UDP sockets similar to what was done
> for TCP with commit c1e64e298b8ca ("net: diag: Support destroying TCP
> sockets.") A process with a UDP socket targeted for destroy is awakened
> and recvmsg fails with EC
This implements SOCK_DESTROY for UDP sockets similar to what was done
for TCP with commit c1e64e298b8ca ("net: diag: Support destroying TCP
sockets.") A process with a UDP socket targeted for destroy is awakened
and recvmsg fails with ECONNABORTED.
Signed-off-by: David Ahern
---
v3
- add missing