Re: [RESEND PATCH v2] modules: wait do_free_init correctly

2024-02-17 Thread Changbin Du
On Thu, Feb 15, 2024 at 09:18:09AM -0500, Eric Chanudet wrote: > On Tue, Jan 30, 2024 at 06:21:03AM -0800, Luis Chamberlain wrote: > > On Tue, Jan 30, 2024 at 09:40:38AM +0800, Changbin Du wrote: > > > On Mon, Jan 29, 2024 at 09:53:58AM -0800, Luis Chamberlain wrote: > > > > On Mon, Jan 29, 2024

Re: [RESEND PATCH v2] modules: wait do_free_init correctly

2024-02-15 Thread Eric Chanudet
On Tue, Jan 30, 2024 at 06:21:03AM -0800, Luis Chamberlain wrote: > On Tue, Jan 30, 2024 at 09:40:38AM +0800, Changbin Du wrote: > > On Mon, Jan 29, 2024 at 09:53:58AM -0800, Luis Chamberlain wrote: > > > On Mon, Jan 29, 2024 at 10:03:04AM +0800, Changbin Du wrote: > > > > The commit 1a7b7d922081

Re: [RESEND PATCH v2] modules: wait do_free_init correctly

2024-01-30 Thread Luis Chamberlain
On Tue, Jan 30, 2024 at 09:40:38AM +0800, Changbin Du wrote: > On Mon, Jan 29, 2024 at 09:53:58AM -0800, Luis Chamberlain wrote: > > On Mon, Jan 29, 2024 at 10:03:04AM +0800, Changbin Du wrote: > > > The commit 1a7b7d922081 ("modules: Use vmalloc special flag") moves > > > do_free_init() into a

Re: [RESEND PATCH v2] modules: wait do_free_init correctly

2024-01-29 Thread Changbin Du
On Mon, Jan 29, 2024 at 09:53:58AM -0800, Luis Chamberlain wrote: > On Mon, Jan 29, 2024 at 10:03:04AM +0800, Changbin Du wrote: > > The commit 1a7b7d922081 ("modules: Use vmalloc special flag") moves > > do_free_init() into a global workqueue instead of call_rcu(). So now > > rcu_barrier() can

Re: [RESEND PATCH v2] modules: wait do_free_init correctly

2024-01-29 Thread Luis Chamberlain
On Mon, Jan 29, 2024 at 10:03:04AM +0800, Changbin Du wrote: > The commit 1a7b7d922081 ("modules: Use vmalloc special flag") moves > do_free_init() into a global workqueue instead of call_rcu(). So now > rcu_barrier() can not ensure that do_free_init has completed. We should > wait it via

[RESEND PATCH v2] modules: wait do_free_init correctly

2024-01-28 Thread Changbin Du
The commit 1a7b7d922081 ("modules: Use vmalloc special flag") moves do_free_init() into a global workqueue instead of call_rcu(). So now rcu_barrier() can not ensure that do_free_init has completed. We should wait it via flush_work(). Without this fix, we still could encounter false positive