From patchwork Wed Jun 30 19:00:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guilherme G. Piccoli" X-Patchwork-Id: 1499081 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GFVz42Hfcz9sW6; Thu, 1 Jul 2021 05:00:16 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lyfRU-0002bD-5S; Wed, 30 Jun 2021 19:00:12 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lyfRS-0002aw-J9 for kernel-team@lists.ubuntu.com; Wed, 30 Jun 2021 19:00:10 +0000 Received: from mail-pg1-f198.google.com ([209.85.215.198]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lyfRS-0004S6-8e for kernel-team@lists.ubuntu.com; Wed, 30 Jun 2021 19:00:10 +0000 Received: by mail-pg1-f198.google.com with SMTP id x9-20020a6541490000b0290222fe6234d6so2300343pgp.14 for ; Wed, 30 Jun 2021 12:00:10 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=QcfG3Av/smDhjNf7/0xy1yKRV73hpnvVjvBl0imy+7c=; b=rh2/ziGOc1huWj4F/+0m30XPQKy8YF0wQFWSEpnbt3S1cPCC2fbuzbLq3Bs7fmq6YW sfTfCYFhh3xjdEJgau2FQgR/mQfVTIiv2momMzzVCFn/z/qdcvNEj6E9bhqB0fHimQtv 3APVA89zarvzbAEt5No3UB5SAw1XBHlU3lQXaoBC2lzpcwOSdhal2ksiiD1ctInhskxr ZzHOve/lviBOktDZ06ehD964ZiVGtjeP3sgKSy+PM9K6mlXOB3900TvvPJ+VeDEIdfLq xGjdB/pnU88V+sl5jWc86ncAFWschUBh3KUeePZh0K75dHd1frOw4Y7iufpRAQcODAey vGig== X-Gm-Message-State: AOAM530SWCEl+7/0LgVOuyTO3aMlsqhll4JFFSChr9nqh2vR21Tzw/b4 Qol9lCeckJ+99hLjJ94vhICz9Q5NMCcM1kreCAiLg/o7OeW9w8mLKRbacGyR63UUxobpgAdwhfc HErSzWj7qUu0cQft/fc1/RFfJk6qoq/H8b93Hb4DxUA== X-Received: by 2002:a63:5d65:: with SMTP id o37mr35237787pgm.79.1625079608975; Wed, 30 Jun 2021 12:00:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLQY2WaQ1BeKHfxtMLk3fNyUeYw3pjDfy32xnPFiBBib6PJ0kKpLKzZJZXzQ3/vRCjuO/mlQ== X-Received: by 2002:a63:5d65:: with SMTP id o37mr35237755pgm.79.1625079608744; Wed, 30 Jun 2021 12:00:08 -0700 (PDT) Received: from localhost ([187.183.41.59]) by smtp.gmail.com with ESMTPSA id v3sm4497785pfm.198.2021.06.30.12.00.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jun 2021 12:00:08 -0700 (PDT) From: "Guilherme G. Piccoli" To: kernel-team@lists.ubuntu.com Subject: [B][PATCH 1/2] kernfs: deal with kernfs_fill_super() failures Date: Wed, 30 Jun 2021 16:00:00 -0300 Message-Id: <20210630190001.6112-2-gpiccoli@canonical.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210630190001.6112-1-gpiccoli@canonical.com> References: <20210630190001.6112-1-gpiccoli@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pedro.principeza@canonical.com Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Al Viro BugLink: https://bugs.launchpad.net/bugs/1934175 make sure that info->node is initialized early, so that kernfs_kill_sb() can list_del() it safely. Signed-off-by: Al Viro (cherry picked from commit 82382acec0c97b91830fff7130d0acce4ac4f3f3) Signed-off-by: Guilherme G. Piccoli Acked-by: Thadeu Lima de Souza Cascardo --- fs/kernfs/mount.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c index 23ddba589552..0b22c39dad47 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);