lkml.org 
[lkml]   [2012]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] SUNRPC: set desired file system root before connecting local transports
On Tue, Nov 06, 2012 at 08:10:18AM -0500, Christoph Hellwig wrote:
> On Tue, Nov 06, 2012 at 08:07:06AM -0500, J. Bruce Fields wrote:
> > So you're worried that a bug in the nfs code could modify the root and
> > then not restore it?
>
> At least the link you pointed to earlier never sets it back.

This? http://thread.gmane.org/gmane.linux.kernel/1259986/focus=47687

+ get_fs_root(current->fs, &root);
+ set_fs_root(current->fs, &transport->root);
+
status = xs_local_finish_connecting(xprt, sock);
+
+ set_fs_root(current->fs, &root);
+ path_put(&root);

> Instead
> of messing with it I'd rather have the sunrpc code use vfs_path_lookup
> and not care about current->fs->root at all.

The annoyance is that the lookup happens somewhere lower down in the
networking code (net/unix/af_unix.c:unix_find_other, I think). So we'd
need some new (internal) API. We'd likely be the only user of that new
API.

--b.


\
 
 \ /
  Last update: 2012-11-06 15:23    [W:2.600 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site