Re: [Mesa-dev] [PATCH v2] virgl: Use right key to insert resource to hash.

2019-04-08 Thread Dave Airlie
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/605 Can you try that please and maybe discuss there as well? I cleaned up the code a bit and realigned it with the radeon code. Dave. On Tue, 9 Apr 2019 at 04:44, Chia-I Wu wrote: > > > > On Mon, Apr 8, 2019 at 11:24 AM Lepton Wu wrote: >

Re: [Mesa-dev] [PATCH v2] virgl: Use right key to insert resource to hash.

2019-04-08 Thread Chia-I Wu
On Mon, Apr 8, 2019 at 11:24 AM Lepton Wu wrote: > On Mon, Apr 8, 2019 at 11:10 AM Chia-I Wu wrote: > > > > > > > > On Mon, Apr 8, 2019 at 9:34 AM Lepton Wu wrote: > >> > >> The old code could use gem name as key when inserting it to bo_handles > >> hash table while trying to remove it from has

Re: [Mesa-dev] [PATCH v2] virgl: Use right key to insert resource to hash.

2019-04-08 Thread Lepton Wu
On Mon, Apr 8, 2019 at 11:10 AM Chia-I Wu wrote: > > > > On Mon, Apr 8, 2019 at 9:34 AM Lepton Wu wrote: >> >> The old code could use gem name as key when inserting it to bo_handles >> hash table while trying to remove it from hash table with bo_handle as >> key in virgl_hw_res_destroy and then i

Re: [Mesa-dev] [PATCH v2] virgl: Use right key to insert resource to hash.

2019-04-08 Thread Chia-I Wu
On Mon, Apr 8, 2019 at 9:34 AM Lepton Wu wrote: > The old code could use gem name as key when inserting it to bo_handles > hash table while trying to remove it from hash table with bo_handle as > key in virgl_hw_res_destroy and then it fail to remove it from bo_handles > hash table. This triggers

[Mesa-dev] [PATCH v2] virgl: Use right key to insert resource to hash.

2019-04-08 Thread Lepton Wu
The old code could use gem name as key when inserting it to bo_handles hash table while trying to remove it from hash table with bo_handle as key in virgl_hw_res_destroy and then it fail to remove it from bo_handles hash table. This triggers use after free. Also, we should insert resource to bo_nam