From mboxrd@z Thu Jan 1 00:00:00 1970 From: Milton Miller Subject: [PATCH 1/9] mm: add generic adaptive large memory allocation APIs Date: Thu, 13 May 2010 09:39:36 -0500 Message-ID: <1273761576_4060@mail4.comsite.net> References: <1273744285-8128-1-git-send-email-xiaosuo@gmail.com> Cc: akpm@linux-foundation.org, Hoang-Nam Nguyen , Christoph Raisch , Roland Dreier , Sean Hefty , Hal Rosenstock , Divy Le Ray , "James E.J. Bottomley" , "Theodore Ts'o" , Andreas Dilger , Alexander Viro , Paul Menage , Li Zefan , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, containers@lists.linux-foundation.org, Eric Dumazet , Tetsuo Handa , Peter Zijlstra , Changli Gao To: Changli Gao Return-path: In-Reply-To: <1273744285-8128-1-git-send-email-xiaosuo@gmail.com> Sender: owner-linux-mm@kvack.org List-Id: linux-ext4.vger.kernel.org On Thu, 13 May 2010 at 17:51:25 +0800, Changli Gao wrote: > +static inline void *kvcalloc(size_t n, size_t size) > +{ > + return __kvmalloc(n * size, __GFP_ZERO); > This needs multiply overflow checking like kcalloc. milton -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Milton Miller Subject: [PATCH 1/9] mm: add generic adaptive large memory allocation APIs Date: Thu, 13 May 2010 09:39:36 -0500 Message-ID: <1273761576_4060@mail4.comsite.net> References: <1273744285-8128-1-git-send-email-xiaosuo@gmail.com> Return-path: In-Reply-To: <1273744285-8128-1-git-send-email-xiaosuo@gmail.com> Sender: owner-linux-mm@kvack.org Cc: akpm@linux-foundation.org, Hoang-Nam Nguyen , Christoph Raisch , Roland Dreier , Sean Hefty , Hal Rosenstock , Divy Le Ray , "James E.J. Bottomley" , Theodore Ts'o , Andreas Dilger , Alexander Viro , Paul Menage , Li Zefan , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, containers@lists.linux-foundation.org, Eric Dumazet , Tetsuo Handa , Peter Zijlstra , Changli Gao List-Id: linux-rdma@vger.kernel.org On Thu, 13 May 2010 at 17:51:25 +0800, Changli Gao wrote: > +static inline void *kvcalloc(size_t n, size_t size) > +{ > + return __kvmalloc(n * size, __GFP_ZERO); > This needs multiply overflow checking like kcalloc. milton -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758675Ab0EMOk0 (ORCPT ); Thu, 13 May 2010 10:40:26 -0400 Received: from mail4.comsite.net ([205.238.176.238]:56185 "EHLO mail4.comsite.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753729Ab0EMOkZ (ORCPT ); Thu, 13 May 2010 10:40:25 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=71.22.98.68; From: Milton Miller To: Changli Gao Cc: akpm@linux-foundation.org, Hoang-Nam Nguyen , Christoph Raisch , Roland Dreier , Sean Hefty , Hal Rosenstock , Divy Le Ray , "James E.J. Bottomley" , "Theodore Ts'o" , Andreas Dilger , Alexander Viro , Paul Menage , Li Zefan , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, containers@lists.linux-foundation.org, Eric Dumazet , Tetsuo Handa , Peter Zijlstra , Changli Gao Subject: [PATCH 1/9] mm: add generic adaptive large memory allocation APIs In-Reply-To: <1273744285-8128-1-git-send-email-xiaosuo@gmail.com> X-Mailer: vi Date: Thu, 13 May 2010 09:39:36 -0500 X-Originating-IP: 71.22.98.68 Message-ID: <1273761576_4060@mail4.comsite.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 13 May 2010 at 17:51:25 +0800, Changli Gao wrote: > +static inline void *kvcalloc(size_t n, size_t size) > +{ > + return __kvmalloc(n * size, __GFP_ZERO); > This needs multiply overflow checking like kcalloc. milton From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with SMTP id E5A6E6B022C for ; Thu, 13 May 2010 10:40:23 -0400 (EDT) From: Milton Miller Subject: [PATCH 1/9] mm: add generic adaptive large memory allocation APIs In-Reply-To: <1273744285-8128-1-git-send-email-xiaosuo@gmail.com> Date: Thu, 13 May 2010 09:39:36 -0500 Message-ID: <1273761576_4060@mail4.comsite.net> Sender: owner-linux-mm@kvack.org To: Changli Gao Cc: akpm@linux-foundation.org, Hoang-Nam Nguyen , Christoph Raisch , Roland Dreier , Sean Hefty , Hal Rosenstock , Divy Le Ray , "James E.J. Bottomley" , Theodore Ts'o , Andreas Dilger , Alexander Viro , Paul Menage , Li Zefan , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, containers@lists.linux-foundation.org, Eric Dumazet , Tetsuo Handa , Peter Zijlstra List-ID: On Thu, 13 May 2010 at 17:51:25 +0800, Changli Gao wrote: > +static inline void *kvcalloc(size_t n, size_t size) > +{ > + return __kvmalloc(n * size, __GFP_ZERO); > This needs multiply overflow checking like kcalloc. milton -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org