[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfpegteyt_+g59skASpubFBSgs-c8XoOG-3Y+coKyr1nvyKfw@mail.gmail.com>
Date: Fri, 22 Aug 2014 16:04:10 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: Maxim Patlasov <MPatlasov@...allels.com>
Cc: fuse-devel <fuse-devel@...ts.sourceforge.net>,
Anand Avati <avati@...ster.org>,
Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/6] fuse: enable close_wait synchronous release
On Thu, Aug 21, 2014 at 6:09 PM, Maxim Patlasov <MPatlasov@...allels.com> wrote:
> The patch enables the feature by passing 'true' to fuse_file_put in
> fuse_release_common.
>
> Previously, this was safe only in special cases when we sure that
> multi-threaded userspace won't deadlock if we'll synchronously send
> FUSE_RELEASE in the context of read-ahead or write-back callback. Now, it's
> always safe because callbacks don't send requests to userspace anymore.
But we do want to make this privileged, as there are unlikely but
possible DoS scenarios with a sync release.
Thanks,
Miklos
>
> Signed-off-by: Maxim Patlasov <mpatlasov@...allels.com>
> ---
> fs/fuse/file.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
> index 73bce1b..cd55488 100644
> --- a/fs/fuse/file.c
> +++ b/fs/fuse/file.c
> @@ -333,7 +333,8 @@ void fuse_release_common(struct file *file, int opcode)
> * synchronous RELEASE is allowed (and desirable) in this case
> * because the server can be trusted not to screw up.
> */
> - fuse_file_put(ff, ff->fc->destroy_req != NULL);
> + fuse_file_put(ff, ff->fc->destroy_req != NULL ||
> + must_release_synchronously(ff));
> }
>
> static int fuse_open(struct inode *inode, struct file *file)
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists