From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932311Ab2DYW2Z (ORCPT ); Wed, 25 Apr 2012 18:28:25 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:54682 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932110Ab2DYW2Y (ORCPT ); Wed, 25 Apr 2012 18:28:24 -0400 Date: Wed, 25 Apr 2012 15:28:19 -0700 From: Tejun Heo To: Peter Teoh Cc: linux-kernel@vger.kernel.org, "H. Peter Anvin" , Andrew Morton , Ingo Molnar , linux-mm@kvack.org Subject: Re: [BUG]memblock: fix overflow of array index Message-ID: <20120425222819.GF8989@google.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 25, 2012 at 04:30:19PM +0800, Peter Teoh wrote: > Fixing the mismatch in signed and unsigned type assignment, which > potentially can lead to integer overflow bug. > > Thanks. > > Reviewed-by: Minchan Kim > Signed-off-by: Peter Teoh All indexes in memblock are integers. Changing that particular one to unsigned int doesn't fix anything. I think it just makes things more confusing. If there ever are cases w/ more then 2G memblocks, we're going for 64bit not unsigned. Thanks. -- tejun