Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3596863pxv; Mon, 28 Jun 2021 08:13:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2kcyAxOTKkc2QRr+BwryBnfbkGkhbU/XrsZuenVRRC6ysVxUlC7YqttdvfzyHy/FXOvHL X-Received: by 2002:a92:cdab:: with SMTP id g11mr19097093ild.240.1624893239039; Mon, 28 Jun 2021 08:13:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624893239; cv=none; d=google.com; s=arc-20160816; b=mkWOrrwpNhzabSWypKt2CBfppQi9EJnJ7vTefD6Cyp76bx32yyER8lz6KgLtLQnqaB AlPN8K6YuMOh5qt5zrTxL6oIgurXxh0HqpyrsWNw2/WKnCwruZU1RDJ6+G3dvGNKXXvz CTEoIrsQ40YI6bzvwgYXWNm0OhjJFcsNAREZucm8+kFPSw8kULyDacu4CsVQl0ajr80X LIpeBiyIvnhrF9hytmiKteIEeZZ/a+5kQ7jk4Ht0xB+wE3Ch4CMR3Nwf8D9W+KI0zJI0 WOu/+7KQtUfPMSSr67pYYqnO+2QFo6fNqO7Vvm5S4Mvv12jRzsXdnpzW3t/65jz5nPQn OcAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8W15V9ueLbK8w0f9OVQPycCOzHudXE7Tu3IWlnws7uA=; b=QC9u51bIN6HomgLIzlhTIZq4OaKw1U3RvQvbdPxmC6WAkan6cTChNDoLYZ6469jtL8 GP3Y2BcRfb3KVWJwaunQ+APmlvKNZP8pDCgRlVZaBV7Nm0PIfPkHVLNgrr+DZw15Fi04 dMjp4or6o0eUxYBjP3CLdDOUcZFNsG97PEmGuewbur17MYK8wIuQ2nLN7d4BipR2zCz+ ulD9IHZ/Tq2iMfXd66hC1Yw2KZ43tyxNMT//K9agsce9vWRf0Q8B/7p+UPuT9MeaLezB aKD70p9RnEIpR/a5ZFWHh5dXA/cAEGo5IFwBh+xyEZYug0WSs3VMMIf8jNY0403yFIId 9anw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fJZpnEFk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si17375879jam.40.2021.06.28.08.13.42; Mon, 28 Jun 2021 08:13:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fJZpnEFk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237494AbhF1POe (ORCPT + 99 others); Mon, 28 Jun 2021 11:14:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:59740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235249AbhF1OxC (ORCPT ); Mon, 28 Jun 2021 10:53:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6FE1361D3B; Mon, 28 Jun 2021 14:37:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891043; bh=5WSj3ImtPWylynG+rVpYnClBOB1ekjAsw4fw4ioC/ok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fJZpnEFkwgS5q+vh9PFh3RxscO+pVDLaLFXA2RxgNi0VvJAtKIGUOtiQ1mgReENv4 mqfdBmd9UG3jNMRtR4ivROAQNkIQsQrmJT/emNHI03e3pY1kuN83QquBAZm3lsyr/j 7W3RT+Ix+FjStqmDamA+G+MW9Z1Tqv53aeZBICzEug3z27xFbRxnw8oPKx98yTRAqn 5AwOc8FSI2H2sZwxUCeDChk7ElCRX6rjfBQKkSfxDaHaJCarcXFBdzsSFTWg3OQDzR FWmTDVe4LqZbsQG/3L03R8Q+uWJ9IVCVsmRLIxNYfVwOTOJaQfOi7vzNgj++zuzncv PmoIizXGxuIBg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Al Viro , "Guilherme G . Piccoli" , Greg Kroah-Hartman Subject: [PATCH 4.14 62/88] kernfs: deal with kernfs_fill_super() failures Date: Mon, 28 Jun 2021 10:36:02 -0400 Message-Id: <20210628143628.33342-63-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143628.33342-1-sashal@kernel.org> References: <20210628143628.33342-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.238-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.238-rc1 X-KernelTest-Deadline: 2021-06-30T14:36+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Viro commit 82382acec0c97b91830fff7130d0acce4ac4f3f3 upstream. make sure that info->node is initialized early, so that kernfs_kill_sb() can list_del() it safely. Signed-off-by: Al Viro Signed-off-by: Guilherme G. Piccoli Signed-off-by: Greg Kroah-Hartman --- fs/kernfs/mount.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c index 5019058e0f6a..610267585f8f 100644 --- a/fs/kernfs/mount.c +++ b/fs/kernfs/mount.c @@ -320,6 +320,7 @@ struct dentry *kernfs_mount_ns(struct file_system_type *fs_type, int flags, info->root = root; info->ns = ns; + INIT_LIST_HEAD(&info->node); sb = sget_userns(fs_type, kernfs_test_super, kernfs_set_super, flags, &init_user_ns, info); -- 2.30.2