Miklos Szeredi
eed8100766
vfs: check unlinked ancestors before mount
...
We check submounts before doing d_drop() on a non-empty directory dentry in
NFS (have_submounts()), but we do not exclude a racing mount. Nor do we
prevent mounts to be added to the disconnected subtree using relative paths
after the d_drop().
This patch fixes these issues by checking for unlinked (unhashed, non-root)
ancestors before proceeding with the mount. This is done with rename
seqlock taken for write and with ->d_lock grabbed on each ancestor in turn,
including our dentry itself. This ensures that the only one of
check_submounts_and_drop() or has_unlinked_ancestor() can succeed.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu >
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
2013-09-05 16:23:50 -04:00
..
2013-07-11 10:21:23 -07:00
2013-06-29 12:57:36 +04:00
2013-06-29 12:57:36 +04:00
2013-07-03 09:10:19 -07:00
2013-07-05 18:59:33 +04:00
2013-06-29 12:56:55 +04:00
2013-08-24 12:10:22 -04:00
2013-09-05 08:50:26 -07:00
2013-07-03 16:07:31 -07:00
2013-07-09 12:39:10 -07:00
2013-09-04 09:23:46 -04:00
2013-07-05 18:59:33 +04:00
2013-07-14 11:42:26 -07:00
2013-06-29 12:56:46 +04:00
2013-07-31 12:16:31 -04:00
2013-08-12 15:22:43 -05:00
2013-07-11 10:20:18 -07:00
2013-07-14 17:48:35 +04:00
2013-08-24 12:10:22 -04:00
2013-07-02 09:39:34 -07:00
2013-06-29 12:57:05 +04:00
2013-06-29 12:57:10 +04:00
2013-08-28 14:40:12 -04:00
2013-09-05 08:50:26 -07:00
2013-07-08 13:35:48 +04:00
2013-07-09 10:33:25 -07:00
2013-06-29 12:56:53 +04:00
2013-06-19 14:16:47 +01:00
2013-07-29 12:30:13 -07:00
2013-08-19 09:33:57 +01:00
2013-06-29 12:57:36 +04:00
2013-06-29 12:57:36 +04:00
2013-06-29 12:56:59 +04:00
2013-07-04 11:22:55 -07:00
2013-07-03 16:07:41 -07:00
2013-08-24 12:10:17 -04:00
2013-06-29 12:57:36 +04:00
2013-05-21 23:26:36 -04:00
2013-08-28 14:59:58 -04:00
2013-06-29 12:56:47 +04:00
2013-08-15 17:22:29 -05:00
2013-08-05 15:03:46 -04:00
2013-07-02 09:39:34 -07:00
2013-06-29 12:57:35 +04:00
2013-07-09 10:33:25 -07:00
2013-08-07 20:47:26 -04:00
2013-09-03 22:50:28 -04:00
2013-09-05 08:50:26 -07:00
2013-07-09 10:33:20 -07:00
2013-07-02 09:39:34 -07:00
2013-09-05 08:50:26 -07:00
2013-06-29 12:56:37 +04:00
2013-06-29 12:56:32 +04:00
2013-08-25 12:25:38 -07:00
2013-08-30 15:57:01 -07:00
2013-06-29 12:56:38 +04:00
2013-06-29 12:56:39 +04:00
2013-08-17 09:32:32 -04:00
2013-08-05 17:37:37 +04:00
2013-06-29 12:56:29 +04:00
2013-06-29 12:56:28 +04:00
2013-08-22 09:23:28 -07:00
2013-06-29 12:57:36 +04:00
2013-07-05 12:08:47 -07:00
2013-06-29 12:57:12 +04:00
2013-06-29 12:46:47 +04:00
2013-09-04 09:23:46 -04:00
2013-07-03 16:08:06 -07:00
2013-06-29 12:57:04 +04:00
2013-07-10 18:11:34 -07:00
2013-05-02 10:16:16 -07:00
2013-07-10 18:11:34 -07:00
2013-04-30 17:04:03 -07:00
2013-09-03 18:25:03 -07:00
2013-09-04 09:23:46 -04:00
2013-07-03 16:07:29 -07:00
2013-06-29 12:46:44 +04:00
2013-06-29 12:57:05 +04:00
2013-07-03 16:08:02 -07:00
2013-09-05 16:23:50 -04:00
2013-09-04 09:23:46 -04:00
2013-09-03 23:04:44 -04:00
2013-08-16 08:52:46 -07:00
2013-08-05 18:25:32 +04:00
2013-09-03 22:50:28 -04:00
2013-05-01 17:31:42 -04:00
2013-07-09 10:33:22 -07:00
2013-09-03 22:52:45 -04:00
2013-09-05 16:23:50 -04:00
2013-04-30 17:04:04 -07:00
2013-07-14 17:43:25 +04:00
2013-07-08 13:36:42 +04:00
2013-05-01 17:51:54 -07:00
2013-09-05 08:50:26 -07:00
2013-09-05 16:23:50 -04:00
2013-09-03 23:04:45 -04:00
2013-05-07 20:16:25 -07:00
2013-05-31 15:16:33 -04:00
2013-05-01 17:51:54 -07:00
2013-07-03 16:23:27 +04:00
2013-06-29 12:57:05 +04:00
2013-07-10 17:08:27 -07:00
2013-07-08 13:36:41 +04:00
2013-07-03 09:10:19 -07:00
2013-08-17 09:32:32 -04:00
2013-09-04 09:23:46 -04:00
2013-05-29 12:57:34 -07:00