[PATCH v6 07/10] proc: flush task dcache entries from all procfs instances
J Freyensee
why2jjj.linux at gmail.com
Mon Dec 30 22:03:29 UTC 2019
snip
.
.
.
>
> +#ifdef CONFIG_PROC_FS
> +static inline void pidns_proc_lock(struct pid_namespace *pid_ns)
> +{
> + down_write(&pid_ns->rw_proc_mounts);
> +}
> +
> +static inline void pidns_proc_unlock(struct pid_namespace *pid_ns)
> +{
> + up_write(&pid_ns->rw_proc_mounts);
> +}
> +
> +static inline void pidns_proc_lock_shared(struct pid_namespace *pid_ns)
> +{
> + down_read(&pid_ns->rw_proc_mounts);
> +}
> +
> +static inline void pidns_proc_unlock_shared(struct pid_namespace *pid_ns)
> +{
> + up_read(&pid_ns->rw_proc_mounts);
> +}
> +#else /* !CONFIG_PROC_FS */
> +
Apologies for my newbie question. I couldn't help but notice all these
function calls are assuming that the parameter struct pid_namespace
*pid_ns will never be NULL. Is that a good assumption?
I don't have the background in this code to answer on my own, but I
thought I'd raise the question.
Thanks,
Jay
More information about the Linux-security-module-archive
mailing list