Skip to content

Commit

Permalink
fs: Extra data cache flush (workaround)
Browse files Browse the repository at this point in the history
Taken from linux-2.6.31.3-jz-20110809-FR1.patch.gz.

TODO: Investigate whether the problem this patch works around is due to
      flush_kernel_dcache_page() being unimplemented on MIPS.
  • Loading branch information
mthuurne committed Nov 4, 2013
1 parent abbafa8 commit 2771922
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fs/mpage.c
Expand Up @@ -54,6 +54,17 @@ static void mpage_end_io(struct bio *bio, int err)
if (bio_data_dir(bio) == READ) {
if (uptodate) {
SetPageUptodate(page);
/*
* It seems that there is a IO coherent bug in generic_file_mmap(),
* When __do_fault() calls vma->ops->falut(filemap_fault)->aops->readpage(),
* the PG_dcache_dirty is not set, so the page should be flushed (often with EXEC flags)
* will not be flushed in the update_mmu_cache().
*
* This causes some larger ELF files failing to execute with errors like illegal instruction...
*
* - River.
*/
flush_dcache_page(page);
} else {
ClearPageUptodate(page);
SetPageError(page);
Expand Down

0 comments on commit 2771922

Please sign in to comment.