mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] gma500: restore the wb attribute for the scratch page
@ 2011-08-03 18:42 Suresh Siddha
  2011-08-03 18:56 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Suresh Siddha @ 2011-08-03 18:42 UTC (permalink / raw)
  To: Cox, Alan; +Cc: LKML, Venkatesh Pallipadi, x86

Alan, Found this while checking who is using set_pages_uc() in the
current mainline code. I am also looking to see if we should add bug
check in __free_page() to avoid this kind of attribute leak or better
yet, restore the wb attribute in __free_page() itself (perhaps using
something like arch_free_page).

---
From: Suresh Siddha <suresh.b.siddha@intel.com>
Subject: gma500: restore the wb attribute for the scratch page

psb_driver_load() is changing the scratch_page attribute to uncached.
Restore the write-back attribute before freeing the page in the unload
routine.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
 drivers/staging/gma500/psb_drv.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/gma500/psb_drv.c b/drivers/staging/gma500/psb_drv.c
index b2cdce7..cb45ad7 100644
--- a/drivers/staging/gma500/psb_drv.c
+++ b/drivers/staging/gma500/psb_drv.c
@@ -285,6 +285,7 @@ static int psb_driver_unload(struct drm_device *dev)
 		}
 		psb_gtt_takedown(dev);
 		if (dev_priv->scratch_page) {
+			set_pages_wb(dev_priv->scratch_page, 1);
 			__free_page(dev_priv->scratch_page);
 			dev_priv->scratch_page = NULL;
 		}



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] gma500: restore the wb attribute for the scratch page
  2011-08-03 18:42 [patch] gma500: restore the wb attribute for the scratch page Suresh Siddha
@ 2011-08-03 18:56 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2011-08-03 18:56 UTC (permalink / raw)
  To: Suresh Siddha; +Cc: Cox, Alan, LKML, Venkatesh Pallipadi, x86

> From: Suresh Siddha <suresh.b.siddha@intel.com>
> Subject: gma500: restore the wb attribute for the scratch page
> 
> psb_driver_load() is changing the scratch_page attribute to uncached.
> Restore the write-back attribute before freeing the page in the unload
> routine.

Thanks will apply.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-03 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-03 18:42 [patch] gma500: restore the wb attribute for the scratch page Suresh Siddha
2011-08-03 18:56 ` Alan Cox

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®