From: root <ngustavson@emacinc.com>
To: linux-kernel@vger.kernel.org
Subject: copy_to_user count seg-fault
Date: Fri, 14 Dec 2001 09:37:04 +0100 [thread overview]
Message-ID: <20011214093704.C376@nate> (raw)
I am working on a device driver for a 2.4.14 kernel.
In my standard read function I use copy_to_user(buff,&reloc,count);
buff is the buffer passed from the read function, reloc is a char, and
count is the size_t count paramenter from the read function.
as long as I pass it count it works fine, however if I replace count
with a constant 1 I get a seg fault.
if I set count=1 I get a seg fault.
and finally and weirdest of all, if I do an if(count==1) I get a seg
fault.
has anyone seen anything like this before, what could possibly be
causing this?
reply other threads:[~2001-12-14 15:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20011214093704.C376@nate \
--to=ngustavson@emacinc.com \
--cc=linux-kernel@vger.kernel.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 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.