Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1907400imm; Sun, 8 Jul 2018 14:11:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeW+HApQgYLrcKOK5zKrv+Anq5kN0dKB2ZtoNGdWugcKGKUQzcgMgrpa/XYksOBfpn+iIlZ X-Received: by 2002:a62:6303:: with SMTP id x3-v6mr18722408pfb.91.1531084285411; Sun, 08 Jul 2018 14:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531084285; cv=none; d=google.com; s=arc-20160816; b=bG3UoEl4bxnCFga6GBmIWFgMTAy0D8s5CnmgVvUkslINb2hct/zMVJfzymRL8j7+ML TAGqMhEkY0FV4VaSfU1mM3hDghRFQkO7+ExTzgluI+wDC0Et4Wbzu5kKHg+Pnf2Jly/B NSJCx2p08m08SQwE80lNERaM9i4C5mdMVz+Ln9S9SBIbfPccTCNuD3qAf6nt9OKQwAfr 5fC6FhWri310jqir7IngBNJWnlHrB+xK2JGhRnjcqF1iUkg1nezqnCJcnXY9DcI9FS4l l/r1/4GLxI/5oY4UpJ/Y6Qsnm6JIUa/6ozYoZ/WYaU3341edOK77Jn2/OcdY+7DxV/ox OJsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=m+LdV/pmeJyJm9tTxstEoWVA+vZwxwkjj/3avd2tO4Q=; b=onWBGQRQrWEwBdvkkd0Q40jslzh3R8pDA5ExGfO+UU9/9KwvBvcXprJx8+JT9I+bXx GuuXEPak1k1GdsuXDZiD2iymVMlh2sclw4gG6unHjMKfpolmecNyDP/ypZjlfR5FJkvP lgXQvax20z3Y3UnuqmuB0JBzB9LFH4z9cmvaXST3O7YI6X7t4jUIOBCQCN0aKLs8AzpG K962jov4UAg4soBSOarfldSuUIQBmZw5syg1XMrh61VsD8Ei6f0m2TnytBeYxUyyRGUz O+12/b9QOBBg3yKj9PsnM9TPdvESit98P1B2wN6xqxY0QNARbFhkX7ZtpIMlOZxO4Y3G QKBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=F3a63zlk; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e10-v6si12962680pge.48.2018.07.08.14.11.11; Sun, 08 Jul 2018 14:11:25 -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=@gmail.com header.s=20161025 header.b=F3a63zlk; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933259AbeGHVFg (ORCPT + 99 others); Sun, 8 Jul 2018 17:05:36 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:41263 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933079AbeGHVFe (ORCPT ); Sun, 8 Jul 2018 17:05:34 -0400 Received: by mail-pf0-f173.google.com with SMTP id c21-v6so7529563pfn.8; Sun, 08 Jul 2018 14:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=m+LdV/pmeJyJm9tTxstEoWVA+vZwxwkjj/3avd2tO4Q=; b=F3a63zlkqDYlhuVy6amEpPi+cvKITbR+tlZ6twx1Q8ZUKdI0zjuCqDENBK2ylvboZd Rda5LfUUHsOn7HxNqEmDIG2D4SU6Rk57l66cOADyyD4hHVgmcRACwf1PG4oHP9DtwnLF hn5ki2zn/SA4G6bgPo0togLFOJHN0Y2aJTRnTckYICDltlfPzFe+2Qr81rIRo1MNsFMj ZPFNALhs1c3s7VyoGE9h1g/iXp/tABOONrA8fdOjWWeSZokjG6VavFLniE/S9Ob/oHXR w1K8C0sLdk+ZySluRJMYMeL/Ra/ZKlegWPUKGDhmrmeN02N+391sRaviSg6NrIkjTtDx hA9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=m+LdV/pmeJyJm9tTxstEoWVA+vZwxwkjj/3avd2tO4Q=; b=kOgUStlf6nmPPiBoGooE0cqMi3+8Ropkd+d11jSqRnx8fwagsBq1N0qi5Z5TajW9it ffjHLj3/hzDfNnijn4xXUvrpAe4ezOalknUdDwKP116ZP4omxMSRboLFzHdpw77vsCJY 0put06u07ljqOHyHikj+oh+g4vZHDJh2lDRNk5l7aS2rSB8PlzGl2iDFIS59fCtlwVoT LVXoonyygvhdvxb09r6SIkrwJrRqpz5X/rQGD6ZlC+zaNt74buqkfuaijTTOzjYDNXUU fUIDqBl+8mgjDt2V0NxUe8rIMOEzdnMpX30VWWgRdp8kEl2y526aq1mF3OOPNLAu1qWe CgfA== X-Gm-Message-State: APt69E1TvKkqeLdJPFusrX1uzrtbavLhCC6l0qQMjfRZ5BEApJ2JoCml ZUY4fLfTCoQPxSmi0nvpeNwxMbFK X-Received: by 2002:a63:a502:: with SMTP id n2-v6mr16767816pgf.263.1531083933781; Sun, 08 Jul 2018 14:05:33 -0700 (PDT) Received: from sol.localdomain (c-67-185-97-198.hsd1.wa.comcast.net. [67.185.97.198]) by smtp.gmail.com with ESMTPSA id x68-v6sm23355681pfb.138.2018.07.08.14.05.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Jul 2018 14:05:33 -0700 (PDT) From: Eric Biggers To: David Howells , Alexander Viro , linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Eric Biggers Subject: [PATCH 01/18] sysfs: check return value of kernfs_get_tree() Date: Sun, 8 Jul 2018 14:01:37 -0700 Message-Id: <20180708210154.10423-2-ebiggers3@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180708210154.10423-1-ebiggers3@gmail.com> References: <20180708210154.10423-1-ebiggers3@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Biggers Reported-by: syzbot+0977fcb74b8a12a967b8@syzkaller.appspotmail.com Fixes: a5195193b1e5 ("kernfs, sysfs, cgroup, intel_rdt: Support fs_context") Signed-off-by: Eric Biggers --- fs/sysfs/mount.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 0a016dd49300a..1e1c0ccc6a367 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -27,6 +27,9 @@ static int sysfs_get_tree(struct fs_context *fc) int ret; ret = kernfs_get_tree(fc); + if (ret) + return ret; + if (kfc->new_sb_created) fc->root->d_sb->s_iflags |= SB_I_USERNS_VISIBLE; return 0; -- 2.18.0