Re: [PATCH v2] chardev: avoid use-after-free when client disconnect

2022-07-20 Thread Wangjing(Hogan)
> On Wed, Jul 20, 2022 at 08:55:46AM +, Wangjing(Hogan) wrote: > > > > > On Wed, Jul 20, 2022 at 11:36:07AM +0400, Marc-André Lureau wrote: > > > > Hi > > > > > > > > On Wed, Jul 20, 2022 at 11:13 AM Hogan Wang via > > > > > > > > wrote: > > > > > > > > > IOWatchPoll object did not hold th

Re: [PATCH v2] chardev: avoid use-after-free when client disconnect

2022-07-20 Thread Daniel P . Berrangé
On Wed, Jul 20, 2022 at 08:55:46AM +, Wangjing(Hogan) wrote: > > > On Wed, Jul 20, 2022 at 11:36:07AM +0400, Marc-André Lureau wrote: > > > Hi > > > > > > On Wed, Jul 20, 2022 at 11:13 AM Hogan Wang via > > > > > > wrote: > > > > > > > IOWatchPoll object did not hold the @ioc and @src obje

Re: [PATCH v2] chardev: avoid use-after-free when client disconnect

2022-07-20 Thread Wangjing(Hogan)
> On Wed, Jul 20, 2022 at 11:36:07AM +0400, Marc-André Lureau wrote: > > Hi > > > > On Wed, Jul 20, 2022 at 11:13 AM Hogan Wang via > > > > wrote: > > > > > IOWatchPoll object did not hold the @ioc and @src objects reference, > > > then io_watch_poll_prepare execute in IO thread, if IOWatchPo

Re: [PATCH v2] chardev: avoid use-after-free when client disconnect

2022-07-20 Thread Daniel P . Berrangé
On Wed, Jul 20, 2022 at 11:36:07AM +0400, Marc-André Lureau wrote: > Hi > > On Wed, Jul 20, 2022 at 11:13 AM Hogan Wang via > wrote: > > > IOWatchPoll object did not hold the @ioc and @src objects reference, > > then io_watch_poll_prepare execute in IO thread, if IOWatchPoll > > removed by mian

Re: [PATCH v2] chardev: avoid use-after-free when client disconnect

2022-07-20 Thread Marc-André Lureau
Hi On Wed, Jul 20, 2022 at 11:13 AM Hogan Wang via wrote: > IOWatchPoll object did not hold the @ioc and @src objects reference, > then io_watch_poll_prepare execute in IO thread, if IOWatchPoll > removed by mian thread, then io_watch_poll_prepare access @ioc or > mian->main > @src concurrent

[PATCH v2] chardev: avoid use-after-free when client disconnect

2022-07-20 Thread Hogan Wang via
IOWatchPoll object did not hold the @ioc and @src objects reference, then io_watch_poll_prepare execute in IO thread, if IOWatchPoll removed by mian thread, then io_watch_poll_prepare access @ioc or @src concurrently lead to coredump. In IO thread monitor scene, the IO thread used to accept client