* copy_to_user count seg-fault
@ 2001-12-14 8:37 root
0 siblings, 0 replies; only message in thread
From: root @ 2001-12-14 8:37 UTC (permalink / raw)
To: linux-kernel
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?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-12-14 15:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-14 8:37 copy_to_user count seg-fault root
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox