[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230529111859.GA15193@redhat.com>
Date: Mon, 29 May 2023 13:19:39 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Mike Christie <michael.christie@...cle.com>,
linux@...mhuis.info, nicolas.dichtel@...nd.com, axboe@...nel.dk,
linux-kernel@...r.kernel.org,
virtualization@...ts.linux-foundation.org, mst@...hat.com,
sgarzare@...hat.com, jasowang@...hat.com, stefanha@...hat.com,
brauner@...nel.org
Subject: Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps
regression
On 05/27, Eric W. Biederman wrote:
>
> Looking forward I don't see not asking the worker threads to stop
> for the coredump right now causing any problems in the future.
> So I think we can use this to resolve the coredump issue I spotted.
But we have almost the same problem with exec.
Execing thread will wait for vhost_worker() while vhost_worker will wait for
.release -> vhost_task_stop().
And even O_CLOEXEC won't help, do_close_on_exec() is called after de_thread().
Or suppose that vhost_worker's sub-thread forks a child with CLONE_FILES...
If we want CLONE_THREAD, I think vhost_worker() should exit after get_signal()
returns SIGKILL. Perhaps it should "disable" vhost_work_queue() somehow and
flush the pending works on ->work_list before exit, I dunno. But imo it should
not wait for the final fput().
Oleg.
Powered by blists - more mailing lists