public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [UBI UBIFS] replace vmalloc with kmalloc
@ 2009-08-07  9:02 JiSheng Zhang
  2009-08-07  9:14 ` Matthieu CASTET
  2009-08-07  9:20 ` Adrian Hunter
  0 siblings, 2 replies; 7+ messages in thread
From: JiSheng Zhang @ 2009-08-07  9:02 UTC (permalink / raw)
  To: linux-mtd; +Cc: linux-kernel, dwmw2, rmk, adrian.hunter, Artem.Bityutskiy

If nandflash driver use DMA to support UBI and UBIFS i/o, there will
be panic like
the following. This is because UBI and UBIFS use vmalloced buffer
somewhere while
nandflash driver put the buffer under DMA and DMA support doesn't like vmalloced
memory.
[  412.369280] UBIFS: default file-system created
[  412.374879] Unable to handle kernel NULL pointer dereference at
virtual address 00000000
[  412.383177] UBIFS: background thread "ubifs_bgt0_0" started, PID 887
[  412.389656] pgd = c0004000
[  412.392419] [00000000] *pgd=00000000
[  412.396117] Internal error: Oops: 817 [#1] PREEMPT

Yes, I know kmalloc may fail when memory get fragmented, but I grep the UBI and
UBIFS's source, there are six .c files and seven .c files using
vmalloc, the function
which call vmalloc are all called during the ubi being attached and
the volume being
mounted. In embedded system, this mainly happen during kernel boot, it
should succeed.

After replacing vmalloc with kmalloc, ubi and ubifs runs fine on my
board. I can alos upload
a patch.

Comments are welcomed!

Jisheng

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-08-09  5:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-07  9:02 [UBI UBIFS] replace vmalloc with kmalloc JiSheng Zhang
2009-08-07  9:14 ` Matthieu CASTET
2009-08-07  9:20 ` Adrian Hunter
2009-08-07  9:44   ` Russell King
2009-08-07 14:26   ` Josh Boyer
2009-08-07 15:28   ` JiSheng Zhang
2009-08-09  5:35     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox