lkml.org 
[lkml]   [2018]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/7] proc/kcore: replace kclist_lock rwlock with rwsem
On Thu, 12 Jul 2018 17:09:34 -0700 Omar Sandoval <osandov@osandov.com> wrote:

> From: Omar Sandoval <osandov@fb.com>
>
> Now we only need kclist_lock from user context and at fs init time, and
> the following changes need to sleep while holding the kclist_lock.
>
> ...
>
> --- a/fs/proc/kcore.c
> +++ b/fs/proc/kcore.c
> @@ -59,8 +59,8 @@ struct memelfnote
> };
>
> static LIST_HEAD(kclist_head);
> -static DEFINE_RWLOCK(kclist_lock);
> -static int kcore_need_update = 1;
> +static DECLARE_RWSEM(kclist_lock);
> +static atomic_t kcore_need_update = ATOMIC_INIT(1);

It's unclear why kcore_need_update was changed to atomic_t - it's still
updated under kclist_lock?

Maybe it's for a later patch.


\
 
 \ /
  Last update: 2018-07-18 04:39    [W:0.098 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site