From: David Chow <davidchow@rcn.com.hk>
To: unlisted-recipients:; (no To-header on input)@localhost.localdomain
Cc: "Richard B. Johnson" <root@chaos.analogic.com>,
linux-kernel@vger.kernel.org
Subject: Re: EFAULT from file read.
Date: Wed, 19 Sep 2001 18:24:47 +0800 [thread overview]
Message-ID: <3BA8726F.CC5FA2AD@rcn.com.hk> (raw)
In-Reply-To: <Pine.GSO.4.21.0109180900320.25323-100000@weyl.math.psu.edu>
Alexander Viro ¼g¹D¡G
>
> On Tue, 18 Sep 2001, Richard B. Johnson wrote:
>
> > File I/O requires a process context. Your file descriptor means
> > nothing unless associated with the process that opened the file.
>
> It fscking doesn't. He had clearly said that he calls file->f_op->read(),
> which has nothing whatsofuckingever to descriptors. Sod off and don't
> return until you learn to read.
>
> As for the original question - grep fro set_fs and you'll see what to
> do (basically, set_fs(KERNEL_DS) before the call of ->read() and restore
> afterwards).
Problem solved by calling dummy=set_fs(KERNEL_DS) . But remember to call
set_fs(dummy) to restore after the read.
regards,
David
prev parent reply other threads:[~2001-09-19 10:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-18 9:16 EFAULT from file read David Chow
2001-09-18 12:53 ` Richard B. Johnson
2001-09-18 13:04 ` Alexander Viro
2001-09-19 10:24 ` David Chow [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=3BA8726F.CC5FA2AD@rcn.com.hk \
--to=davidchow@rcn.com.hk \
--cc=linux-kernel@vger.kernel.org \
--cc=root@chaos.analogic.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.