From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: kernel BUG while reading from SPI into static buffer
Date: Fri, 13 May 2011 08:08:51 -0700 [thread overview]
Message-ID: <20110513150851.GA13400@kroah.com> (raw)
In-Reply-To: <BANLkTin25_+YjJLbFWHeDhjG48gKwR65dg@mail.gmail.com>
On Fri, May 13, 2011 at 12:33:15PM +0530, Felix Varghese wrote:
> Hi,
>
> I am trying to read some data via SPI on an a modified (custom SPI device
> attached) AT91SAM9G20-EK board. If I pass a local array buffer, declared as
> "char buffer[100];" as the rx_buf pointer for the spi transfer, the code works
> fine. But if I just change the declaration to "static char buffer[100]"
> instead, I get the following crash:
Don't statically allocate memory for spi, you need to dynamically
allocate it with 'kmalloc'.
The fact that the first time didn't crash for you was just lucky.
hope this helps,
greg k-h
next prev parent reply other threads:[~2011-05-13 15:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 7:03 kernel BUG while reading from SPI into static buffer Felix Varghese
2011-05-13 14:32 ` Mulyadi Santosa
2011-05-13 14:33 ` Mulyadi Santosa
2011-05-13 15:08 ` Greg KH [this message]
2011-05-16 5:55 ` Felix Varghese
2011-05-16 14:17 ` Greg KH
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=20110513150851.GA13400@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@lists.kernelnewbies.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 NNTP newsgroup(s).