From: Kernoulas <kernoulas@sisifus.ceid.upatras.gr>
To: Ramesh Sudini <rameshred@hotmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Copy_to_user and copy_from_user
Date: Tue, 03 Aug 2004 21:07:54 +0300 [thread overview]
Message-ID: <410FD47A.1010603@sisifus.ceid.upatras.gr> (raw)
In-Reply-To: <BAY12-F12PkQTGpaoG100000364@hotmail.com>
No you cannot call it until all data has been copied.
copy_{to,from}_user fails when a fault happens during the copy process.
So you simply cannot try again... It will fault again.
Well, not 100% true. An other running thread (same mm with the process
which copies data) can "fix" the faulty adress space. Bad thread....
Ramesh Sudini wrote:
> Hi,
>
> If copy_from_user returns non zero value, then I do not see any
> driver(for example PPP) try to copy the remaining data. It treats it as
> an error scenario.
>
> Why is this? Shouldnt it have a while loop and attempt to copy_from_user
> till all the data is copied??
>
> I am writing a driver and trying to understand what needs to be done in
> case it returns a non-zero value? I have huge amount of data to be
> copied from user space Ex: 3000byte messages.
>
> Can somebody suggest me what is the best I could do...(Please cc me
> personally with your response)
>
> Thanks
> Ramesh
>
next prev parent reply other threads:[~2004-08-03 22:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-03 20:45 Ramesh Sudini
2004-08-03 18:07 ` Kernoulas [this message]
2004-08-09 13:26 Ramesh Sudini
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=410FD47A.1010603@sisifus.ceid.upatras.gr \
--to=kernoulas@sisifus.ceid.upatras.gr \
--cc=linux-kernel@vger.kernel.org \
--cc=rameshred@hotmail.com \
/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
all inboxes | Powered by JetHome®