[lkml]   [2001]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectcopy_to_user count seg-fault
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

has anyone seen anything like this before, what could possibly be
causing this?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:18    [W:0.027 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site