Re: [PATCH 5/6] nbd/server: only traverse NBDExport->clients from main loop thread

2024-01-02 Thread Eric Blake
On Wed, Dec 20, 2023 at 08:49:02PM -0500, Stefan Hajnoczi wrote: > The NBD clients list is currently accessed from both the export > AioContext and the main loop thread. When the AioContext lock is removed > there will be nothing protecting the clients list. > > Adding a lock around the clients li

Re: [PATCH 5/6] nbd/server: only traverse NBDExport->clients from main loop thread

2023-12-21 Thread Stefan Hajnoczi
On Thu, Dec 21, 2023 at 08:23:15AM +0100, Paolo Bonzini wrote: > On 12/21/23 02:49, Stefan Hajnoczi wrote: > > The NBD clients list is currently accessed from both the export > > AioContext and the main loop thread. When the AioContext lock is removed > > there will be nothing protecting the client

Re: [PATCH 5/6] nbd/server: only traverse NBDExport->clients from main loop thread

2023-12-20 Thread Paolo Bonzini
On 12/21/23 02:49, Stefan Hajnoczi wrote: The NBD clients list is currently accessed from both the export AioContext and the main loop thread. When the AioContext lock is removed there will be nothing protecting the clients list. Adding a lock around the clients list is tricky because NBDClient

[PATCH 5/6] nbd/server: only traverse NBDExport->clients from main loop thread

2023-12-20 Thread Stefan Hajnoczi
The NBD clients list is currently accessed from both the export AioContext and the main loop thread. When the AioContext lock is removed there will be nothing protecting the clients list. Adding a lock around the clients list is tricky because NBDClient structs are refcounted and may be freed from