diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-02-22 20:07:13 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:21:24 -0400 |
commit | fd2f7cb5bcac58b63717cd45366bff9a6ab961c6 (patch) | |
tree | 4271223c22f541510331e806ac178df920d3b69c /include/linux/fs.h | |
parent | 6e8a1f8741d6f1179cb3b03991caeac9e4bfd9e2 (diff) |
kill struct filename.separate
just make const char iname[] the last member and compare name->name with
name->iname instead of checking name->separate
We need to make sure that out-of-line name doesn't end up allocated adjacent
to struct filename refering to it; fortunately, it's easy to achieve - just
allocate that struct filename with one byte in ->iname[], so that ->iname[0]
will be inside the same object and thus have an address different from that
of out-of-line name [spotted by Boqun Feng <boqun.feng@gmail.com>]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index b4d71b5e1ff2..d70e333988f1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2144,7 +2144,7 @@ struct filename { | |||
2144 | const __user char *uptr; /* original userland pointer */ | 2144 | const __user char *uptr; /* original userland pointer */ |
2145 | struct audit_names *aname; | 2145 | struct audit_names *aname; |
2146 | int refcnt; | 2146 | int refcnt; |
2147 | bool separate; /* should "name" be freed? */ | 2147 | const char iname[]; |
2148 | }; | 2148 | }; |
2149 | 2149 | ||
2150 | extern long vfs_truncate(struct path *, loff_t); | 2150 | extern long vfs_truncate(struct path *, loff_t); |