Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758805AbXKCSbd (ORCPT ); Sat, 3 Nov 2007 14:31:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755903AbXKCSbY (ORCPT ); Sat, 3 Nov 2007 14:31:24 -0400 Received: from netops-testserver-4-out.sgi.com ([192.48.171.29]:43132 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756541AbXKCSbY (ORCPT ); Sat, 3 Nov 2007 14:31:24 -0400 Date: Sat, 3 Nov 2007 11:31:23 -0700 (PDT) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Hugh Dickins cc: Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] slub: fix leakage In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 778 Lines: 16 On Sat, 3 Nov 2007, Hugh Dickins wrote: > The culprit turns out to be __slab_alloc(), where it copes with the race > that another task has assigned the cpu slab while we were allocating one. > Don't rush off to load_freelist there: that assumes c->freelist is empty, > and will lose all of its free slots when c->page->freelist is not empty. > Instead just do a local allocation from c->freelist when it has one. Hmmm.. Right. This will require some fixes to the optimizations in mm. Acked-by: Christoph Lameter - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/