300-fork_cacheflush.patch 901 B

123456789101112131415161718192021
  1. From: Wolfram Joost <dbox2@frokaschwei.de>
  2. Subject: [PATCH] fork_cacheflush
  3. On ASUS WL-500gP there are many unexpected "Segmentation fault"s that
  4. seem to be caused by a kernel. They can be avoided by:
  5. 1) Disabling highpage
  6. 2) Using flush_cache_mm in flush_cache_dup_mm
  7. For details see OpenWrt ticket #2035 https://dev.openwrt.org/ticket/2035
  8. ---
  9. --- a/arch/mips/include/asm/cacheflush.h
  10. +++ b/arch/mips/include/asm/cacheflush.h
  11. @@ -46,7 +46,7 @@
  12. extern void (*flush_cache_all)(void);
  13. extern void (*__flush_cache_all)(void);
  14. extern void (*flush_cache_mm)(struct mm_struct *mm);
  15. -#define flush_cache_dup_mm(mm) do { (void) (mm); } while (0)
  16. +#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
  17. extern void (*flush_cache_range)(struct vm_area_struct *vma,
  18. unsigned long start, unsigned long end);
  19. extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page, unsigned long pfn);