From: Andreas Schultz
Date: Wed, 15 Feb 2017 08:04:56 +0100 (CET)
> - On Feb 14, 2017, at 6:48 PM, David S. Miller da...@davemloft.net wrote:
>
>> From: Andreas Schultz
>> Date: Mon, 13 Feb 2017 16:36:18 +0100
>>
>>> + if (gtp->sk0) {
>>> + udp_sk(gtp->sk0)->encap_type = 0;
>>>
- On Feb 14, 2017, at 6:48 PM, David S. Miller da...@davemloft.net wrote:
> From: Andreas Schultz
> Date: Mon, 13 Feb 2017 16:36:18 +0100
>
>> +if (gtp->sk0) {
>> +udp_sk(gtp->sk0)->encap_type = 0;
>> +rcu_assign_sk_user_data(gtp->sk0, NULL);
>> +sock_
From: Andreas Schultz
Date: Mon, 13 Feb 2017 16:36:18 +0100
> + if (gtp->sk0) {
> + udp_sk(gtp->sk0)->encap_type = 0;
> + rcu_assign_sk_user_data(gtp->sk0, NULL);
> + sock_put(gtp->sk0);
> }
This does "sock_put(NULL);" because you are assigning gtp->
After enabling the UDP encapsulation, only the sk member is used.
Holding the socket would prevent user space from closing the socket,
but holding a reference to the sk member does not have the same
effect.
This change will make it simpler to later detach the sockets from
the netdevice.
Signed-o