All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Kees Cook <keescook@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Dave Hansen <dave.hansen@intel.com>,
	Ying Huang <ying.huang@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm, vmstat: Make sure mutex is a global static
Date: Wed, 8 Nov 2017 15:20:43 +0100	[thread overview]
Message-ID: <20171108142043.hipnymxez67mbyi5@dhcp22.suse.cz> (raw)
In-Reply-To: <da45fb2f-d630-3152-6138-6f67518e2b1c@suse.cz>

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

  reply	other threads:[~2017-11-08 14:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07 21:38 Kees Cook
2017-11-08  7:43 ` Vlastimil Babka
2017-11-08 14:20   ` Michal Hocko [this message]
2017-11-08 15:21   ` Kees Cook
2017-11-09  7:50     ` Michal Hocko
2017-11-09  1:10 ` kemi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171108142043.hipnymxez67mbyi5@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=brouer@redhat.com \
    --cc=dave.hansen@intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vbabka@suse.cz \
    --cc=ying.huang@intel.com \
    --subject='Re: [PATCH] mm, vmstat: Make sure mutex is a global static' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.