On Mon, Jan 15, 2018 at 10:37 PM, Jason Wang wrote:
>
>
> On 2018年01月16日 14:33, Cong Wang wrote:
>> But __tun_detach(true) is not a hot path, a memset() doesn't harm
>> anything.
>
>
> Yes, but it looks more more like a workaround or trick to me.
>
I'd blame skb_array API for this. ;) Ideally, sk
On 2018年01月16日 14:33, Cong Wang wrote:
On Mon, Jan 15, 2018 at 10:12 PM, Jason Wang wrote:
On 2018年01月16日 14:07, Cong Wang wrote:
On Mon, Jan 15, 2018 at 10:00 PM, Jason Wang wrote:
I mean we can leave __tun_detach() as is, and just add the cleanup to
tun_detach_all(). This is because in
On Mon, Jan 15, 2018 at 10:12 PM, Jason Wang wrote:
>
>
> On 2018年01月16日 14:07, Cong Wang wrote:
>>
>> On Mon, Jan 15, 2018 at 10:00 PM, Jason Wang wrote:
>>>
>>> I mean we can leave __tun_detach() as is, and just add the cleanup to
>>> tun_detach_all(). This is because in both cases, we're sure
On 2018年01月16日 14:07, Cong Wang wrote:
On Mon, Jan 15, 2018 at 10:00 PM, Jason Wang wrote:
I mean we can leave __tun_detach() as is, and just add the cleanup to
tun_detach_all(). This is because in both cases, we're sure skb array has
been initialized before.
Oh, I thought the same before s
On Mon, Jan 15, 2018 at 10:00 PM, Jason Wang wrote:
> I mean we can leave __tun_detach() as is, and just add the cleanup to
> tun_detach_all(). This is because in both cases, we're sure skb array has
> been initialized before.
>
Oh, I thought the same before sending v3, but I believe it is easier
On 2018年01月16日 13:49, Cong Wang wrote:
On Mon, Jan 15, 2018 at 9:46 PM, Jason Wang wrote:
I think then you don't even need the memset trick since we are sure it has
been implemented?
It doesn't look like sk_alloc() zero's the memory of tfile.
Typo, for "implemented" I mean "initialized".
On Mon, Jan 15, 2018 at 9:46 PM, Jason Wang wrote:
>
>
> I think then you don't even need the memset trick since we are sure it has
> been implemented?
It doesn't look like sk_alloc() zero's the memory of tfile.
On 2018年01月16日 03:37, Cong Wang wrote:
tfile->tun could be detached before we close the tun fd,
via tun_detach_all(), so it should not be used to check for
tfile->tx_array.
As Jason suggested, we probably have to clean it up
unconditionally both in __tun_deatch() and tun_detach_all(),
but this
tfile->tun could be detached before we close the tun fd,
via tun_detach_all(), so it should not be used to check for
tfile->tx_array.
As Jason suggested, we probably have to clean it up
unconditionally both in __tun_deatch() and tun_detach_all(),
but this requires to check if it is initialized or