lkml.org 
[lkml]   [2021]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 4/9] fork: add option to not clone or dup files
On Tue, Sep 21, 2021 at 04:52:13PM -0500, Mike Christie wrote:
> Each vhost device gets a thread that is used to perform IO and management
> operations. Instead of a thread that is accessing a device, the thread is
> part of the device, so when it calls the kernel_worker() function added in
> the next patch we can't dup or clone the parent's files/FDS because it would
> do an extra increment on ourself.
>
> Later, when we do:
>
> Qemu process exits:
> do_exit -> exit_files -> put_files_struct -> close_files
>
> we would leak the device's resources because of that extra refcount
> on the fd or file_struct.
>
> This patch adds a no_files option so these worker threads can prevent
> taking an extra refcount on themselves.
>
> Signed-off-by: Mike Christie <michael.christie@oracle.com>

Ok,
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>

\
 
 \ /
  Last update: 2021-09-22 14:47    [W:0.142 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site