linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: viro@zeniv.linux.org.uk, thierry.reding@gmail.com,
	jonas.jensen@gmail.com,
	Murilo Opsfelder Araujo <mopsfelder@gmail.com>
Subject: [PATCH] fs: Initialize mountpoint list head in new_mountpoint()
Date: Mon, 18 Aug 2014 23:43:54 -0300	[thread overview]
Message-ID: <1408416234-7923-1-git-send-email-mopsfelder@gmail.com> (raw)
In-Reply-To: <20140818153327.GA12278@ulmo>

The commit 89f7ca1af15bdfe7a6aed343032a84af2a69f736 makes next-20140818
to panic because mountpoint list head was not initialized.  Initializing
it with NULL fixes the problem.

commit 89f7ca1af15bdfe7a6aed343032a84af2a69f736
Author: Eric W. Biederman <ebiederman@twitter.com>
Date:   Sun Sep 22 19:37:01 2013 -0700

    vfs: Keep a list of mounts on a mount point

    To spot any possible problems call BUG if a mountpoint
        is put when it's list of mounts is not empty.

    AV: use hlist instead of list_head

Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
---
 fs/namespace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/namespace.c b/fs/namespace.c
index 1a2bbef..1a00bac 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -736,6 +736,7 @@ static struct mountpoint *new_mountpoint(struct dentry *dentry)
 		return ERR_PTR(ret);
 	}
 
+	INIT_HLIST_HEAD(&mp->m_list);
 	mp->m_dentry = dentry;
 	mp->m_count = 1;
 	hlist_add_head(&mp->m_hash, chain);
-- 
2.1.0.rc2.234.ge4c5f60


  parent reply	other threads:[~2014-08-19  2:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18 11:09 fs: panic in mnt_set_mountpoint Jonas Jensen
2014-08-18 12:08 ` Ming Lei
2014-08-18 15:33 ` Thierry Reding
2014-08-18 19:33   ` Kevin Hilman
2014-08-19  2:43   ` Murilo Opsfelder Araujo [this message]
2014-08-19  7:01     ` [PATCH] fs: Initialize mountpoint list head in new_mountpoint() Thierry Reding
2014-08-19 13:49       ` Murilo Opsfelder Araújo
2014-08-20 12:35   ` fs: panic in mnt_set_mountpoint Jonas Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1408416234-7923-1-git-send-email-mopsfelder@gmail.com \
    --to=mopsfelder@gmail.com \
    --cc=jonas.jensen@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).