Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp577609img; Fri, 22 Mar 2019 04:24:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2CHJ66dDKtz/LeOLqp0eCeGYiIz7Mqa7CfkiOdkG7z6CE/+w8wsn65cmmp7Su/QRhXHfB X-Received: by 2002:a17:902:9a4c:: with SMTP id x12mr8961616plv.157.1553253889948; Fri, 22 Mar 2019 04:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553253889; cv=none; d=google.com; s=arc-20160816; b=YlE+5sRbGmHr2dY9Y4DbnA8HBk1u4OVCG5ncuf93ev3aEj2uExxBRq26bSvmlP2LA2 G7AMecpBOVEAr8vp+BzT8jNvAY7RjK4Nlha0dqZB3d2Nx98yzUt8lPcFhWFQay8HLhPa H9j8EzPZf+9PFKlzcnE5K4qYVIhZhcTqSrF6sWhzzMvQ8/CSTuYae8ie8C27TUW2zzOg mPA+X3jprfsEk+C6TqkeGJ2Jyqt8DE2WTOGp4k5nXEEcJsAvILPeT0PouMHpZ6YfBh+R fbBDdQociTf47z1C+DNj0DtANKywzIwxC1fpWx9kqdWy77k9MG3ZDU166Y69Iz4imosL X+WQ== 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=MC/uG3uXqAyETzJ4ah3/K4ZaMrI3PDd8iD+CeaTUxLU=; b=fT+Za4doKYZJdY+p+FmxKV1yiyE8SZoWsoZg9Hcmw5+G93d9TpS7B/DUFM8c4JaCRm LM4qTH2cMPHGeFKTZq9aZ5LBBrBcFG0rhGpB2QuGPm3A3NENInpATinSK5kk8Zxmw7Ur Bn5bLufn5cUW97AMYKSCYU+KE5B6MIuiMyBsTBCrJa93E6lwTnwNh7gOGlImi+E1DeDN toW/gs3rzUtlLLlS1B4HLE6Ovvqat3NOMbjq1AcnITFK3/0soeNpjesN+tMDzuGLxtNF wka8xeNEUO/9w4NeFRJ5/i2v1GAwRT8pVO+CzxHIoQY2RXHuyPPcYjdQll8SXBhpjAo0 1/VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=d4JKgYq0; 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 s14si6354643pgs.98.2019.03.22.04.24.35; Fri, 22 Mar 2019 04:24:49 -0700 (PDT) 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=d4JKgYq0; 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 S1728919AbfCVLXG (ORCPT + 99 others); Fri, 22 Mar 2019 07:23:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:49970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728478AbfCVLXE (ORCPT ); Fri, 22 Mar 2019 07:23:04 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 2057D21916; Fri, 22 Mar 2019 11:23:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553253784; bh=9FffrXrr5zwvEVgB1Y+UhtcAW3CBLM6bazHnolYnt44=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d4JKgYq0FlUh295Sr5Ix/TOh9UPkXuvZQPAM6mSmf2ZSJZtgyXexmG+mmEloQ3YHI Wr3qQ2NCoqXAshwz/uNaaw6sGYGL0fL5u9fGRFdkYkpo6zSsqM6ej/DXPVTvgcIWMS T4C4T0AptpyTAqwIsnXVT5DXwxKoiURIkwTGFUDM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ian Kent , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 3.18 071/134] autofs: fix error return in autofs_fill_super() Date: Fri, 22 Mar 2019 12:14:44 +0100 Message-Id: <20190322111215.219451094@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111210.465931067@linuxfoundation.org> References: <20190322111210.465931067@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 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit f585b283e3f025754c45bbe7533fc6e5c4643700 ] In autofs_fill_super() on error of get inode/make root dentry the return should be ENOMEM as this is the only failure case of the called functions. Link: http://lkml.kernel.org/r/154725123240.11260.796773942606871359.stgit@pluto-themaw-net Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- fs/autofs4/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c index 1c55388ae633..512f70fade24 100644 --- a/fs/autofs4/inode.c +++ b/fs/autofs4/inode.c @@ -256,8 +256,10 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) } root_inode = autofs4_get_inode(s, S_IFDIR | 0755); root = d_make_root(root_inode); - if (!root) + if (!root) { + ret = -ENOMEM; goto fail_ino; + } pipe = NULL; root->d_fsdata = ino; -- 2.19.1