lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 8 Nov 2017 15:20:43 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     Kees Cook <keescook@...omium.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Ying Huang <ying.huang@...el.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm, vmstat: Make sure mutex is a global static

On Wed 08-11-17 08:43:44, Vlastimil Babka wrote:
> On 11/07/2017 10:38 PM, Kees Cook wrote:
[...]
> > +static DEFINE_MUTEX(vm_numa_stat_lock);
> > +
> >  int sysctl_vm_numa_stat_handler(struct ctl_table *table, int write,
> >  		void __user *buffer, size_t *length, loff_t *ppos)
> >  {
> >  	int ret, oldval;
> > -	DEFINE_MUTEX(vm_numa_stat_lock);
> 
> Yeah it was Michal who suggested scoping the mutex here instead of
> global scope, but I think he didn't mean to remove the 'static'
> qualifier, and we both missed that in the review :(
> So the scope under sysctl_vm_numa_stat_handler() should be okay, just
> with the 'static' added.

exactly! Sorry that I've missed the missing static and thanks for
catching that Kees.

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ