Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2747673imj; Mon, 11 Feb 2019 07:54:39 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ4TJYh3HgGBlcZipgTehRj8wfr+fevmU9KouKntjlUzs0BWFZfTtWxqo5NYApRsBBVANGs X-Received: by 2002:a62:528e:: with SMTP id g136mr38749913pfb.111.1549900479922; Mon, 11 Feb 2019 07:54:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549900479; cv=none; d=google.com; s=arc-20160816; b=etbBpAEUvdOSti/5FrkvAomPfSIsnMY0qpBBDYqpvh/mkvVkR1qgME+LWd2AbakKl7 wR1o5U+Sch3bUZSvjtFxEarZcBm5rsbBjOsELsQWtke8kKiBaK4Bt4R6X3yrBXs/0FZb 9i/zoYkY8i2jjTocPPztq4P5LNzvp11+ekIhf4W5uQWMxQZ1fkQNl9IKjEIR1RTp8jFA IMnFRsLIafG65dHZtLsLvgUprEo4FrIygYcwnW+AkfmftLrSePuSzW0A7SVD8vtswCa5 RkCunr/hchD5MXaA0YUjNz4mVRefw6klVWhHs49aln108E8oHxMMJNmEQSUSAhpu8rtk tb+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aenJ++T8fUwmnbNzgg542e2rN8a0SdKHNXgf3lrGM+c=; b=pJOf6qL+iQElgi+0YpQPpnARXgLK6K78lm4bp2/8I5VM5RGSWEUjlT1ncEnOO/7G/t Lj++DzL78Bjserug5TKiKGI0A5bsStB+5CAUWI9L63tbkp1ga7AuU6LcA/Kgz1Y+lq3U sGbkB98zeEDYbYAJqfxkHltew75a2Ksfp94hw3BDnz831AJSJ7EYVVCtSA3kFvPg0poR i1u0Dvrl1QDR3jtrZoDtacFKtyZuaQV8SeKfDgXnSYDxhoOw0hqlt0F0nVGplSb4/axn Smau34tYlHX88guJSmVOKZmlZ1zE3xJrnpH62ynyRtfFjQDgq25mt/6VEqOkNn/+GFv3 EvKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hDWZ3Z3Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r27si9637447pgl.494.2019.02.11.07.54.23; Mon, 11 Feb 2019 07:54:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hDWZ3Z3Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732271AbfBKPxb (ORCPT + 99 others); Mon, 11 Feb 2019 10:53:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:45566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731249AbfBKOg2 (ORCPT ); Mon, 11 Feb 2019 09:36:28 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1FD4E2080F; Mon, 11 Feb 2019 14:36:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895787; bh=E8xfGsJuPtt/9/J/WgB9uCyaXhkDXxHGjH8F0jV3js4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hDWZ3Z3Zqk3M/ZURUlzGXpKWXLhvycK6QX7Y/SjcbRWAcpAZEPDmfgZoRTlKVhWOq Ybaah4Rku8oYg2Gloi7IEazIARNamFLzPTv/xXahbmc4AGtVdUXXAwAj7VmRDm1r8W N/Jn0RkVLFa3uJkBAu/E0MCMClkBbdZltbbLGlqo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andreas Steinmetz , Miklos Szeredi Subject: [PATCH 4.20 323/352] cuse: fix ioctl Date: Mon, 11 Feb 2019 15:19:10 +0100 Message-Id: <20190211141907.390871565@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ From: Miklos Szeredi commit 8a3177db59cd644fde05ba9efee29392dfdec8aa upstream. cuse_process_init_reply() doesn't initialize fc->max_pages and thus all cuse bases ioctls fail with ENOMEM. Reported-by: Andreas Steinmetz Fixes: 5da784cce430 ("fuse: add max_pages to init_out") Cc: # v4.20 Signed-off-by: Miklos Szeredi Signed-off-by: Greg Kroah-Hartman --- fs/fuse/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -628,6 +628,7 @@ void fuse_conn_init(struct fuse_conn *fc get_random_bytes(&fc->scramble_key, sizeof(fc->scramble_key)); fc->pid_ns = get_pid_ns(task_active_pid_ns(current)); fc->user_ns = get_user_ns(user_ns); + fc->max_pages = FUSE_DEFAULT_MAX_PAGES_PER_REQ; } EXPORT_SYMBOL_GPL(fuse_conn_init); @@ -1162,7 +1163,6 @@ static int fuse_fill_super(struct super_ fc->user_id = d.user_id; fc->group_id = d.group_id; fc->max_read = max_t(unsigned, 4096, d.max_read); - fc->max_pages = FUSE_DEFAULT_MAX_PAGES_PER_REQ; /* Used by get_root_inode() */ sb->s_fs_info = fc;