Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754695AbZCFHha (ORCPT ); Fri, 6 Mar 2009 02:37:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751857AbZCFHhU (ORCPT ); Fri, 6 Mar 2009 02:37:20 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:33487 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751406AbZCFHhT (ORCPT ); Fri, 6 Mar 2009 02:37:19 -0500 From: KOSAKI Motohiro To: Americo Wang Subject: Re: [RFC][PATCH] kmemdup_from_user(): introduce Cc: kosaki.motohiro@jp.fujitsu.com, Li Zefan , Andrew Morton , LKML , "linux-mm@kvack.org" In-Reply-To: <20090306072328.GL22605@hack.private> References: <49B0CAEC.80801@cn.fujitsu.com> <20090306072328.GL22605@hack.private> Message-Id: <20090306163600.3469.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.50 [ja] Date: Fri, 6 Mar 2009 16:37:12 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 830 Lines: 29 > > /** > >+ * kmemdup_from_user - duplicate memory region from user space > >+ * > >+ * @src: source address in user space > >+ * @len: number of bytes to copy > >+ * @gfp: GFP mask to use > >+ */ > >+void *kmemdup_from_user(const void __user *src, size_t len, gfp_t gfp) > >+{ > >+ void *p; > >+ > >+ p = kmalloc_track_caller(len, gfp); > > > Well, you use kmalloc_track_caller, instead of kmalloc as you showed > above. :) Why don't you mention this? kmalloc() wrapper function must use kmalloc_track_caller(). his code is right. if not, kmalloc tracking feature is breaked. -- 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/