* msync over reserved mem
@ 2001-05-14 17:21 Andrea Arcangeli
0 siblings, 0 replies; only message in thread
From: Andrea Arcangeli @ 2001-05-14 17:21 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
This patch fixes the troubles generated by msync on /dev/fb0 or any
other device driver that exports reserved memory to userspace via shared
mapping.
--- 2.4.5pre1aa3/mm/filemap.c.~1~ Fri May 11 02:08:28 2001
+++ 2.4.5pre1aa3/mm/filemap.c Mon May 14 18:48:59 2001
@@ -1808,10 +1808,12 @@
{
pte_t pte = *ptep;
- if (pte_present(pte) && ptep_test_and_clear_dirty(ptep)) {
+ if (pte_present(pte)) {
struct page *page = pte_page(pte);
- flush_tlb_page(vma, address);
- set_page_dirty(page);
+ if (VALID_PAGE(page) && !PageReserved(page) && ptep_test_and_clear_dirty(ptep)) {
+ flush_tlb_page(vma, address);
+ set_page_dirty(page);
+ }
}
return 0;
}
Andrea
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-05-14 17:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-14 17:21 msync over reserved mem Andrea Arcangeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®