mtd: request locked pages when mmap'ing the FIS table, cures random segfaults in...
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 16 Jun 2010 23:34:38 +0000 (23:34 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 16 Jun 2010 23:34:38 +0000 (23:34 +0000)
SVN-Revision: 21823

package/mtd/Makefile
package/mtd/src/fis.c

index 9438b96fdc2487468f779d1cddcbfad40c1cb3e4..332ce3034cd8e35356afc43b8a58fb248d184dd6 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=mtd
-PKG_RELEASE:=12
+PKG_RELEASE:=13
 
 PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)
 STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
index b285d24db4735aa77c6caf127ab2cb7ca3f3b92d..559ca95069a510cd6f76e66ca0d5cfafe3cb4a6f 100644 (file)
@@ -77,7 +77,7 @@ fis_open(void)
                goto error;
 
        fis_erasesize = erasesize;
-       desc = mmap(NULL, erasesize, PROT_READ|PROT_WRITE, MAP_SHARED, fis_fd, 0);
+       desc = mmap(NULL, erasesize, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_LOCKED, fis_fd, 0);
        if (desc == MAP_FAILED)
                goto error;