All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Erez Zadok <ezk@fsl.cs.sunysb.edu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	akpm@linux-foundation.org, Christoph Hellwig <hch@infradead.org>,
	linux-fsdevel@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH] 2.6.39/40 kernel BUG at fs/namei.c:1381
Date: Sat, 21 May 2011 23:27:37 +0100	[thread overview]
Message-ID: <20110521222737.GH19987@ZenIV.linux.org.uk> (raw)
In-Reply-To: <EB998D26-7B85-41ED-B279-A9DBCB67AF9A@fsl.cs.sunysb.edu>

On Sat, May 21, 2011 at 01:19:59AM -0400, Erez Zadok wrote:
> VFS: move BUG_ON test for symlink nd->depth after current->link_count test
> 
> This solves a serious VFS-level bug in nested_symlink (which was rewritten from
> do_follow_link), and follows the order of depth tests that existed before.
> The bug triggers a BUG_ON in fs/namei.c:1381, when running racer with
> symlink and rename ops.

Racer has nothing to do with that; just a deeply nested symlink in the middle
of pathname will do.

> -	BUG_ON(nd->depth >= MAX_NESTED_LINKS);
>  	if (unlikely(current->link_count >= MAX_NESTED_LINKS)) {
>  		path_put_conditional(path, nd);
>  		path_put(&nd->path);
>  		return -ELOOP;
>  	}
> +	BUG_ON(nd->depth >= MAX_NESTED_LINKS);

ACK (and AFAICS Linus has already applied that).

      reply	other threads:[~2011-05-21 22:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-21  5:19 [PATCH] 2.6.39/40 kernel BUG at fs/namei.c:1381 Erez Zadok
2011-05-21 22:27 ` Al Viro [this message]

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=20110521222737.GH19987@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=ezk@fsl.cs.sunysb.edu \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.