Skip to content

Commit

Permalink
sh: Fix argument page dcache flushing regression.
Browse files Browse the repository at this point in the history
In the do_execve() path, argument page handling used to explicitly call
flush_dcache_page() for each page, this has since been reworked and
uses flush_kernel_dcache_page() instead, which is presently a nop.

Doing a simple modprobe/rmmod in a loop under busybox consistently
manages to crash without providing a sane flush_kernel_dcache_page()
implementation, so, plug in a simple implementation.

Signed-off-by: Carmelo Amoroso <carmelo73@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Carmelo Amoroso authored and Paul Mundt committed Jan 7, 2008
1 parent 3ce5445 commit 844b43a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/asm-sh/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ extern void __flush_purge_region(void *start, int size);
extern void __flush_invalidate_region(void *start, int size);
#endif

#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
static inline void flush_kernel_dcache_page(struct page *page)
{
flush_dcache_page(page);
}

#if defined(CONFIG_CPU_SH4) && !defined(CONFIG_CACHE_OFF)
extern void copy_to_user_page(struct vm_area_struct *vma,
struct page *page, unsigned long vaddr, void *dst, const void *src,
Expand Down

0 comments on commit 844b43a

Please sign in to comment.