Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759308Ab0KPDwj (ORCPT ); Mon, 15 Nov 2010 22:52:39 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:56920 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755877Ab0KPDwi (ORCPT ); Mon, 15 Nov 2010 22:52:38 -0500 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Tue, 16 Nov 2010 12:47:04 +0900 From: KAMEZAWA Hiroyuki To: Greg Thelen Cc: Andrew Morton , Balbir Singh , Daisuke Nishimura , Johannes Weiner , Wu Fengguang , Minchan Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] memcg: avoid "free" overflow in memcg_hierarchical_free_pages() Message-Id: <20101116124704.c68288b5.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <1289292853-7022-1-git-send-email-gthelen@google.com> References: <1289292853-7022-1-git-send-email-gthelen@google.com> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 3.0.3 (GTK+ 2.10.14; i686-pc-mingw32) 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 Content-Length: 829 Lines: 19 On Tue, 9 Nov 2010 00:54:13 -0800 Greg Thelen wrote: > memcg limit and usage values are stored in res_counter, as 64-bit > numbers, even on 32-bit machines. The "free" variable in > memcg_hierarchical_free_pages() stores the difference between two > 64-bit numbers (limit - current_usage), and thus should be stored > in a 64-bit local rather than a machine defined unsigned long. > > Reported-by: Daisuke Nishimura > Signed-off-by: Greg Thelen Acked-by: KAMEZAWA Hiroyuki -- 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/