Messages in this thread | | | Date | Wed, 10 Jun 2020 18:41:52 +0100 | From | Al Viro <> | Subject | Re: [PATCH] proc: s_fs_info may be NULL when proc_kill_sb is called |
| |
On Wed, Jun 10, 2020 at 12:12:54PM -0500, Eric W. Biederman wrote:
> > { > > struct proc_fs_info *fs_info = proc_sb_info(sb); > > > > - if (fs_info->proc_self) > > - dput(fs_info->proc_self); > > + if (fs_info) { > > + if (fs_info->proc_self) > > + dput(fs_info->proc_self); > > > > - if (fs_info->proc_thread_self) > > - dput(fs_info->proc_thread_self); > > + if (fs_info->proc_thread_self) > > + dput(fs_info->proc_thread_self); > > + > > + put_pid_ns(fs_info->pid_ns); > > + kfree(fs_info);
While we are at it, dput(NULL) is an explicit no-op.
| |