[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120327151238.302a5920.akpm@linux-foundation.org>
Date: Tue, 27 Mar 2012 15:12:38 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Kautuk Consul <consul.kautuk@...il.com>
Cc: Hugh Dickins <hughd@...gle.com>, Al Viro <viro@...iv.linux.org.uk>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] mmap.c: find_vma: remove if(mm) check
On Mon, 26 Mar 2012 19:49:27 -0400
Kautuk Consul <consul.kautuk@...il.com> wrote:
> find_vma is called from kernel code where it is absolutely
> sure that the mm_struct arg being passed to it is non-NULL.
>
> Remove the if(mm) check.
It's odd that the if(mm) test exists - I wonder why it was originally
added. My repo only goes back ten years, and it's there in 2.4.18.
Any code which calls find_vma() without an mm is surely pretty busted?
Still, I think I'd prefer to do
if (WARN_ON_ONCE(!mm))
return NULL;
then let that bake for a kernel release, just to find out if we have a
weird caller out there, such as a function which is called by both user
threads and by kernel threads.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists