]> git.baikalelectronics.ru Git - kernel.git/commit
Blackfin: fix silent crash when no uClinux MTD filesystem exists
authorRobin Getz <robin.getz@analog.com>
Fri, 26 Jun 2009 12:23:51 +0000 (12:23 +0000)
committerMike Frysinger <vapier@gentoo.org>
Thu, 16 Jul 2009 05:52:21 +0000 (01:52 -0400)
commit8e8ce499c1f459bafaca5602872fba79a92e0ac5
treebc208f10f955095dc8e71c952cd895d83a90db0f
parent966f5bf29d5971081e6977e5a556fd1ebd4928eb
Blackfin: fix silent crash when no uClinux MTD filesystem exists

Since we need to relocate the attached filesystem with the uClinux MTD map
(to handle some anomalies), we need to know its real filesize.  If we boot
a kernel without a filesystem actually attached, we end up blindly reading
and copying garbage (since there is no magic value to detect validity).
Often times this results in an early crash and no output.  So add a few
basic sanity checks before operating on things to catch the majority of
cases.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/kernel/setup.c