lkml.org 
[lkml]   [2018]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2018-09-18 11:42    [W:0.159 / U:1.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site