Messages in this thread | | | Date | Tue, 18 Sep 2018 18:40:53 +0900 | From | Sergey Senozhatsky <> | Subject | Re: [PATCH 14/33] vfs: Implement a filesystem superblock creation/configuration context [ver #11] |
| |
On (09/18/18 18:07), Sergey Senozhatsky wrote: > emergency_remount() > do_emergency_remount() > do_emergency_remount_callback() > reconfigure_super() > > At fc->ops dereference: > > 981 if (fc->ops->reconfigure) { > ^^^^^^^^^ > 982 retval = fc->ops->reconfigure(fc); > 983 if (retval == 0) { > 984 security_sb_reconfigure(fc); > > > So the check either better be > > if (fc->ops && fc->ops->reconfigure)
I guess I was pretty lucky to have leading zeroes in that fc.
David, do you want to add a macro which would make `struct fs_context fc' misuse less possible? There are 3 users right now who don't use vfs_new_fs_context(), and none of them appear to properly set all of `struct fs_context fc' members. This can cause problems in the future, right?
fs/namespace.c: struct fs_context fc = { fs/super.c: struct fs_context fc = { fs/super.c: struct fs_context fc = {
-ss
| |