public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
From: Don Raikes <don.raikes@oracle.com>
To: "Speakup is a screen review system for Linux."
	<speakup@linux-speakup.org>
Subject: OT: kernel oops
Date: Wed, 17 Jul 2013 23:55:50 -0700 (PDT)	[thread overview]
Message-ID: <0d30e6e5-261e-47e0-b5da-2ce5fe6bad24@default> (raw)

Hi again,

 

After browsing some of both Linux Device Drivers and Linux Kernel Development, I modified my kernel module code and now I get a kernel oops.

 

I am trying to hook the sys_write() system call based on some code from my professor.

 

The section of code that is having problems looks like this:

 

Char *tbuf = NULL;

tbuf = kmalloc(count, GFP_ATOMIC); // count is passed in from userspace

if (!tbuf)

                return -ENOMEM;

if (copy_from_user(&tbuf, buf, count))

return -EFAULT;

printk(KERN_INFO "Copy_from_user succeeded."\n");

kfree(tbuf);

 

I get a segmentation fault immediately after it prints copy_from_user succeeded into the log.

 

Oops message:

Oops: 0000 [#9] SMP

 

And as far as I can tell it is pointing to the kfree function at offset 0xba of 0xc0.

 

If there is a better place to post this (say a Linux developers list), I am happy to take my questions there, but this list is my first port of call for errors with Linux.

-- 
Best Regards, Donald

HYPERLINK "http://www.oracle.com/" \nOracle
Donald raikes | Accessibility Specialist/ QA Engineer
Phone: HYPERLINK "tel:+15202717608"+15202717608 | Mobile: HYPERLINK "tel:+15202717608"+15202717608 
Oracle Quality Assurance
| Tucson, Arizona 

HYPERLINK "http://www.oracle.com/commitment" \nGreen Oracle

Oracle is committed to developing practices and products that help protect the environment

 

             reply	other threads:[~ UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
 Don Raikes [this message]
 ` Jason White
 ` Chris Brannon
   ` Don Raikes
   ` Don Raikes
   ` Jason White
     ` Don Raikes
       ` Jason White
         ` Don Raikes
           ` Jason White
             ` Don Raikes
               ` Jason White

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=0d30e6e5-261e-47e0-b5da-2ce5fe6bad24@default \
    --to=don.raikes@oracle.com \
    --cc=speakup@linux-speakup.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).