OT: kernel oops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris,

Thanks it worked like a charm.
No more segmentation faults and I was able to print the contents of the array I copied from userspace!

Wow I should have come here earlier in the week instead of beating my head against the wall for so long :-)
-----Original Message-----
From: Chris Brannon [mailto:chris@xxxxxxxxxxxxxxxx] 
Sent: Thursday, July 18, 2013 9:05 AM
To: Speakup is a screen review system for Linux.
Subject: Re: OT: kernel oops

Don Raikes <don.raikes at oracle.com> writes:

> The section of code that is having problems looks like this:
*SNIP*
> if (copy_from_user(&tbuf, buf, count))

This line is your problem.  You are passing a pointer-to-pointer-to-character (char **) as the first argument to copy_from_user, but you should be passing char * instead.  So ditch the ampersand, and all will be right with the world!
I could give you a thorough explanation of why this is failing, if you like, but to make a long story short, this line of code is smashing the stack!

I'm always happy to help.
-- Chris
_______________________________________________
Speakup mailing list
Speakup at linux-speakup.org
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup


[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux