Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756977AbcJNApQ (ORCPT ); Thu, 13 Oct 2016 20:45:16 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:33705 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753140AbcJNApI (ORCPT ); Thu, 13 Oct 2016 20:45:08 -0400 Date: Thu, 13 Oct 2016 20:28:43 -0400 From: Tejun Heo To: zijun_hu Cc: zijun_hu@htc.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, cl@linux.com Subject: Re: [RFC PATCH 1/1] mm/percpu.c: fix memory leakage issue when allocate a odd alignment area Message-ID: <20161014002843.GH32534@mtj.duckdns.org> References: <20161013233139.GE32534@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 318 Lines: 14 Hello, On Fri, Oct 14, 2016 at 08:23:06AM +0800, zijun_hu wrote: > for the current code, only power of 2 alignment value can works well > > is it acceptable to performing a power of 2 checking and returning error code > if fail? Yeah, just add is_power_of_2() test to the existing sanity check. Thanks. -- tejun