Re: [PATCH] drm/virtio: fix virtio-gpu resource id creation race

2020-02-20 Thread Chia-I Wu
On Thu, Feb 20, 2020 at 5:30 AM Emil Velikov wrote: > > Hi John, > > On Thu, 20 Feb 2020 at 08:45, John Bates wrote: > > > > The previous code was not thread safe and caused > > undefined behavior from spurious duplicate resource IDs. > > In this patch, an atomic_t is used instead. We no longer >

Re: [PATCH] drm/virtio: fix virtio-gpu resource id creation race

2020-02-20 Thread Emil Velikov
Hi John, On Thu, 20 Feb 2020 at 08:45, John Bates wrote: > > The previous code was not thread safe and caused > undefined behavior from spurious duplicate resource IDs. > In this patch, an atomic_t is used instead. We no longer > see any duplicate IDs in tests with this change. > > Signed-off-by:

[PATCH] drm/virtio: fix virtio-gpu resource id creation race

2020-02-20 Thread John Bates
The previous code was not thread safe and caused undefined behavior from spurious duplicate resource IDs. In this patch, an atomic_t is used instead. We no longer see any duplicate IDs in tests with this change. Signed-off-by: John Bates --- drivers/gpu/drm/virtio/virtgpu_object.c | 4 ++-- 1 f

Re: [PATCH] drm/virtio: fix virtio-gpu resource id creation race

2020-02-19 Thread Gurchetan Singh
On Wed, Feb 19, 2020 at 4:20 PM John Bates wrote: > > > > On Wed, Feb 19, 2020 at 12:40 PM John Bates wrote: >> >> The previous code was not thread safe and caused >> undefined behavior from spurious duplicate resource IDs. >> In this patch, an atomic_t is used instead. We no longer >> see any du