Re: [PATCH 14/33] vfs: Implement a filesystem superblock creation/configuration context [ver #11]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux