From: Linus Torvalds <torvalds@transmeta.com>
To: Benjamin LaHaise <bcrl@redhat.com>
Cc: linux-mm@kvack.org, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: weirdness with ->mm vs ->active_mm handling
Date: Thu, 29 Aug 2002 22:10:53 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.44.0208292206130.1336-100000@home.transmeta.com> (raw)
In-Reply-To: <20020829193413.H17288@redhat.com>
On Thu, 29 Aug 2002, Benjamin LaHaise wrote:
>
> In trying to track down a bug, I found routines like generic_file_read
> getting called with current->mm == NULL. This seems to be a valid state
> for lazy tlb tasks, but the code throughout the kernel doesn't seem to
> assume that.
Hmm.. Have you actually ever seen this?
When tsk->mm is NULL, you should never EVER get a page fault, except for
the one special case of the vmalloc'ed area (which is tested for in
do_page_fault() before we even _look_ at "tsk->mm").
In fact, do_page_fault() very much checks
if (in_atomic() || !mm)
goto no_context;
which says that a page fault when in a lazy TLB context should always
cause a trap, killing the thing (or, if the access has a fixup, calling
the fixup - although I don't think that should happen in any normal code)
In other words: I think your patch is "functionally correct", in that it
should work fine, but on the other hand having a NULL tsk->mm and trying
to do any user-level access is _so_ wrong that I'd much rather take a NULL
pointer fault than try to do something "sane" about it.
Linus
--
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/
prev parent reply other threads:[~2002-08-30 5:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-29 23:34 Benjamin LaHaise
2002-08-29 23:45 ` Alexander Viro
2002-08-29 23:52 ` Benjamin LaHaise
2002-08-30 5:10 ` Linus Torvalds [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44.0208292206130.1336-100000@home.transmeta.com \
--to=torvalds@transmeta.com \
--cc=bcrl@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox