From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olav Haugan Subject: Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success Date: Wed, 06 Nov 2013 16:00:02 -0800 Message-ID: <527AD802.6020902@codeaurora.org> References: <1383699252-8898-1-git-send-email-ohaugan@codeaurora.org> <20131106015645.GA28769@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.codeaurora.org ([198.145.11.231]:58650 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750813Ab3KGAAD (ORCPT ); Wed, 6 Nov 2013 19:00:03 -0500 In-Reply-To: <20131106015645.GA28769@kroah.com> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Greg KH Cc: ngupta@vflare.org, sjenning@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, minchan@kernel.org, linux-arm-msm@vger.kernel.org On 11/5/2013 5:56 PM, Greg KH wrote: > On Tue, Nov 05, 2013 at 04:54:12PM -0800, Olav Haugan wrote: >> zsmalloc encodes a handle using the page pfn and an object >> index. On some hardware platforms the pfn could be 0 and this >> causes the encoded handle to be 0 which is interpreted as an >> allocation failure. > > What platforms specifically have this issue? Currently some of Qualcomm SoC's have physical memory that starts at address 0x0 which causes this problem. I believe this could be a problem on any platforms if memory is configured to be starting at physical address 0x0 for these platforms. >> >> To prevent this false error we ensure that the encoded handle >> will not be 0 when allocation succeeds. >> >> Change-Id: Ifff930dcf254915b497aec5cb36f152a5e5365d6 > > What is this? What can anyone do with it? This is an identifier used by "Gerrit Code Review" to track changes to the same patch. I will remove it. Olav Haugan -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation