From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx149.postini.com [74.125.245.149]) by kanga.kvack.org (Postfix) with SMTP id 243286B004D for ; Tue, 1 May 2012 19:18:59 -0400 (EDT) Received: by obbwd18 with SMTP id wd18so105927obb.14 for ; Tue, 01 May 2012 16:18:58 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1335516144-3486-1-git-send-email-minchan@kernel.org> Date: Wed, 2 May 2012 09:18:58 +1000 Message-ID: Subject: Re: [RFC] vmalloc: add warning in __vmalloc From: Nick Piggin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: David Rientjes Cc: Minchan Kim , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kamezawa.hiroyu@jp.fujitsu.com, kosaki.motohiro@gmail.com, Neil Brown , Artem Bityutskiy , David Woodhouse , Theodore Ts'o , Adrian Hunter , Steven Whitehouse , "David S. Miller" , James Morris , Alexander Viro , Sage Weil On 2 May 2012 06:22, David Rientjes wrote: > On Tue, 1 May 2012, Nick Piggin wrote: > >> > I disagree with this approach since it's going to violently spam an >> > innocent kernel user's log with no ratelimiting and for a situation th= at >> > actually may not be problematic. >> >> With WARN_ON_ONCE, it should be good. >> > > To catch a single instance of this per-boot, sure. =C2=A0I've never seen = us add > WARN_ON_ONCE()'s where we have concrete examples of kernel code that will > trigger it, though. =C2=A0Not sure why spamming the kernel log and gettin= g > users to think something is wrong and report the bug when it's possible t= o > audit the code and make a report to the subsystem maintainer. Because it needs to be an ongoing thing, which is caught as soon as the developer writes some code, rather than continually audited for and fixed up after the fact. There is not a good way to enforce this at compile time. The existing callers do need to be fixed too, of course. -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org