Re: kernel BUG while reading from SPI into static buffer

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

 



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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux