From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752690AbbCXWA7 (ORCPT ); Tue, 24 Mar 2015 18:00:59 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37747 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752148AbbCXWA4 (ORCPT ); Tue, 24 Mar 2015 18:00:56 -0400 Date: Tue, 24 Mar 2015 15:00:54 -0700 From: Andrew Morton To: Roman Pen Cc: Eric Dumazet , David Rientjes , WANG Chao , Fabian Frederick , Christoph Lameter , Gioh Kim , Rob Jones , linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [RFC v2 1/3] mm/vmalloc: fix possible exhaustion of vmalloc space caused by vm_map_ram allocator Message-Id: <20150324150054.a9050b7814860790e1d9b0d0@linux-foundation.org> In-Reply-To: <1426773881-5757-2-git-send-email-r.peniaev@gmail.com> References: <1426773881-5757-1-git-send-email-r.peniaev@gmail.com> <1426773881-5757-2-git-send-email-r.peniaev@gmail.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 Mar 2015 23:04:39 +0900 Roman Pen wrote: > If suitable block can't be found, new block is allocated and put into a head > of a free list, so on next iteration this new block will be found first. > > ... > > Cc: stable@vger.kernel.org > > ... > > --- a/mm/vmalloc.c > +++ b/mm/vmalloc.c > @@ -837,7 +837,7 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask) > > vbq = &get_cpu_var(vmap_block_queue); > spin_lock(&vbq->lock); > - list_add_rcu(&vb->free_list, &vbq->free); > + list_add_tail_rcu(&vb->free_list, &vbq->free); > spin_unlock(&vbq->lock); > put_cpu_var(vmap_block_queue); > I'm not sure about the cc:stable here. There is potential for unexpected side-effects and I don't *think* people are hurting from this issue in real life. Or maybe I'm wrong about that?