Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1279775

Re: [PATCH 2.6.32 00/38] 2.6.32.69-longterm review

From Willy Tarreau <w@1wt.eu>
Newsgroups linux.kernel
Subject Re: [PATCH 2.6.32 00/38] 2.6.32.69-longterm review
Date 2015-11-30 12:30 +0100
Message-ID <qAuOB-2S8-1@gated-at.bofh.it> (permalink)
References <qAikp-3oq-3@gated-at.bofh.it> <qAmHo-5XY-3@gated-at.bofh.it> <qAqBk-7t-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Mon, Nov 30, 2015 at 07:51:48AM +0100, Willy Tarreau wrote:
> > Commit 397d425dc26d ("vfs: Test for and handle paths that are
> > unreachable from their mnt_root") is missing.
> 
> OK I'm seeing it in your 3.2 branch, I'll try to backport it.

The code in 2.6.32 looks like a plate of spaghetti, which was heavily
reworked in 2.6.38-rc1 by commit 31e6b01 ("fs: rcu-walk for path lookup").
It even does something suspiciously useless :

		if (this.name[0] == '.') switch (this.len) {
			default:
				break;
			case 2:	
				if (this.name[1] != '.')
					break;
				follow_dotdot(nd);
				inode = nd->path.dentry->d_inode;
				/* fallthrough */
			case 1:
				goto return_reval;
		}

Look how inode is assigned after follow_dotdot() and is never used
between the moment it's assigned and the moment it's re-assigned. I
think I got it right though. I checked that I don't need to pass
via path_put() on exit since follow_dotdot() does it on the error
path. I'd appreciate that you, Eric, or anyone else would review it
though.

Thanks,
Willy

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 2.6.32 00/38] 2.6.32.69-longterm review Ben Hutchings <ben@decadent.org.uk> - 2015-11-30 03:50 +0100
  Re: [PATCH 2.6.32 00/38] 2.6.32.69-longterm review Willy Tarreau <w@1wt.eu> - 2015-11-30 08:00 +0100
    Re: [PATCH 2.6.32 00/38] 2.6.32.69-longterm review Willy Tarreau <w@1wt.eu> - 2015-11-30 12:30 +0100
    Re: [PATCH 2.6.32 00/38] 2.6.32.69-longterm review Ben Hutchings <ben@decadent.org.uk> - 2015-11-30 15:50 +0100
      Re: [PATCH 2.6.32 00/38] 2.6.32.69-longterm review Willy Tarreau <w@1wt.eu> - 2015-11-30 16:20 +0100

csiph-web