Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d85ba43-0759-358e-137d-246107bac747@gmail.com>
Date: Mon, 30 Dec 2019 14:03:29 -0800
From: J Freyensee <why2jjj.linux@...il.com>
To: Alexey Gladkov <gladkov.alexey@...il.com>,
 LKML <linux-kernel@...r.kernel.org>,
 Kernel Hardening <kernel-hardening@...ts.openwall.com>,
 Linux API <linux-api@...r.kernel.org>,
 Linux FS Devel <linux-fsdevel@...r.kernel.org>,
 Linux Security Module <linux-security-module@...r.kernel.org>
Cc: Akinobu Mita <akinobu.mita@...il.com>,
 Alexander Viro <viro@...iv.linux.org.uk>,
 Alexey Dobriyan <adobriyan@...il.com>,
 Andrew Morton <akpm@...ux-foundation.org>, Andy Lutomirski
 <luto@...nel.org>, Daniel Micay <danielmicay@...il.com>,
 Djalal Harouni <tixxdz@...il.com>, "Dmitry V . Levin" <ldv@...linux.org>,
 "Eric W . Biederman" <ebiederm@...ssion.com>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Ingo Molnar <mingo@...nel.org>, "J . Bruce Fields" <bfields@...ldses.org>,
 Jeff Layton <jlayton@...chiereds.net>, Jonathan Corbet <corbet@....net>,
 Kees Cook <keescook@...omium.org>,
 Linus Torvalds <torvalds@...ux-foundation.org>,
 Oleg Nesterov <oleg@...hat.com>, Solar Designer <solar@...nwall.com>,
 Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH v6 07/10] proc: flush task dcache entries from all procfs
 instances

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.