Re: [Xen-devel] [PATCH 08/29] drivers, md: convert mddev.active from atomic_t to refcount_t

2017-03-08 Thread gre...@linuxfoundation.org
On Wed, Mar 08, 2017 at 09:42:09AM +, Reshetova, Elena wrote:
> > On Mon, Mar 06, 2017 at 04:20:55PM +0200, Elena Reshetova wrote:
> > > refcount_t type and corresponding API should be
> > > used instead of atomic_t when the variable is used as
> > > a reference counter. This allows to avoid accidental
> > > refcounter overflows that might lead to use-after-free
> > > situations.
> > 
> > Looks good. Let me know how do you want to route the patch to upstream.
> 
> Greg, you previously mentioned that driver's conversions can go via your 
> tree. Does this still apply?
> Or should I be asking maintainers to merge these patches via their trees? 

You should ask them to take them through their trees, if they have them.
I'll be glad to scoop up all of the remaining ones that get missed, or
for subsystems that do not have trees.

thanks,

greg k-h

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] 4.4: INFO: rcu_sched self-detected stall on CPU

2016-05-02 Thread gre...@linuxfoundation.org
On Wed, Mar 30, 2016 at 05:04:28AM +1100, Steven Haigh wrote:
> Greg, please see below - this is probably more for you...
> 
> On 03/29/2016 04:56 AM, Steven Haigh wrote:
> >
> > Interestingly enough, this just happened again - but on a different
> > virtual machine. I'm starting to wonder if this may have something to do
> > with the uptime of the machine - as the system that this seems to happen
> > to is always different.
> >
> > Destroying it and monitoring it again has so far come up blank.
> >
> > I've thrown the latest lot of kernel messages here:
> >  http://paste.fedoraproject.org/346802/59241532
> 
> So I just did a bit of digging via the almighty Google.
> 
> I started hunting for these lines, as they happen just before the stall:
> BUG: Bad rss-counter state mm:88007b7db480 idx:2 val:-1
> BUG: Bad rss-counter state mm:880079c638c0 idx:0 val:-1
> BUG: Bad rss-counter state mm:880079c638c0 idx:2 val:-1
> 
> I stumbled across this post on the lkml:
> http://marc.info/?l=linux-kernel=145141546409607
> 
> The patch attached seems to reference the following change in
> unmap_mapping_range in mm/memory.c:
> > -   struct zap_details details;
> > +   struct zap_details details = { };
> 
> When I browse the GIT tree for 4.4.6:
> https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/mm/memory.c?id=refs/tags/v4.4.6
> 
> I see at line 2411:
> struct zap_details details;
> 
> Is this something that has been missed being merged into the 4.4 tree?
> I'll admit my kernel knowledge is not enough to understand what the code
> actually does - but the similarities here seem uncanny.

I'm sorry, I have no idea what you are asking me about here.  Did I miss
a patch that should be backported?  Did I backport something
incorrectly?

confused,

greg k-h

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel