* can i call copy_to_user with interrupts masked
@ 2001-08-27 14:56 PRASENJIT CHAKRABORTY
2001-08-27 15:05 ` Stephen C. Tweedie
0 siblings, 1 reply; 3+ messages in thread
From: PRASENJIT CHAKRABORTY @ 2001-08-27 14:56 UTC (permalink / raw)
To: linux-mm; +Cc: arund
Hello All,
This is in continuation with my previous mail.
While debugging I've noticed that __copy_to_user()
fails when I stop the Bottom Half before the call to
__copy_to_user(), so if the page in not currently
mapped then it forbids do_page_fault() to get invoked
and hence the failure.
So I would like to know whether this hypothesis is
right or not? And if not then the possible
explanation.
Thankx
Prasenjit
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: can i call copy_to_user with interrupts masked
2001-08-27 14:56 can i call copy_to_user with interrupts masked PRASENJIT CHAKRABORTY
@ 2001-08-27 15:05 ` Stephen C. Tweedie
0 siblings, 0 replies; 3+ messages in thread
From: Stephen C. Tweedie @ 2001-08-27 15:05 UTC (permalink / raw)
To: PRASENJIT CHAKRABORTY; +Cc: linux-mm, arund
Hi,
On Mon, Aug 27, 2001 at 07:56:40AM -0700, PRASENJIT CHAKRABORTY wrote:
> This is in continuation with my previous mail.
> While debugging I've noticed that __copy_to_user()
> fails when I stop the Bottom Half before the call to
> __copy_to_user(), so if the page in not currently
> mapped then it forbids do_page_fault() to get invoked
> and hence the failure.
You're doing copy_to_user from a bottom half?????? You cannot do
that. *Ever*. It's illegal to take page faults from an interrupt of
any sort.
Cheers,
STephen
--
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: can i call copy_to_user with interrupts masked
@ 2001-08-27 15:09 Viju
0 siblings, 0 replies; 3+ messages in thread
From: Viju @ 2001-08-27 15:09 UTC (permalink / raw)
To: PRASENJIT CHAKRABORTY, linux-mm; +Cc: arund
At a high level OS point of view that cannot be the cause
i would say.
When u access a page, the processor finds that the address is
not mapped in the page tables, it suspends the execution of the current
process and generates a page_fault. The OS is supposed to handle the
page_fault and it finds the corresponding page in the
backing store and faults the page in. After a transaction entry is
made inthe page tables for the newly faulted in page, it returns.
The processor starts excuting the same statement at which it stopped
and the process resumes normal execution.
I would say find what do_page_fault is returning, it shud return an
error if it couldnt find the page for some reason.(Like illegal access or
couldnt swap the page in). If the page_fault is returning
error then finding out y it is retuning that error might solve ur problem.
Thnx,
Viju.
-----Original Message-----
From: PRASENJIT CHAKRABORTY [mailto:pras_chakra@yahoo.com]
Sent: Monday, August 27, 2001 8:27 PM
To: linux-mm@kvack.org
Cc: arund@bellatlantic.net
Subject: can i call copy_to_user with interrupts masked
Hello All,
This is in continuation with my previous mail.
While debugging I've noticed that __copy_to_user()
fails when I stop the Bottom Half before the call to
__copy_to_user(), so if the page in not currently
mapped then it forbids do_page_fault() to get invoked
and hence the failure.
So I would like to know whether this hypothesis is
right or not? And if not then the possible
explanation.
Thankx
Prasenjit
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
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/
--
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-08-27 15:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-27 14:56 can i call copy_to_user with interrupts masked PRASENJIT CHAKRABORTY
2001-08-27 15:05 ` Stephen C. Tweedie
2001-08-27 15:09 Viju
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox