[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] Revert "xen/gnttab: Drop owner->grant_table check in _cache_flush()"



commit a5c26d0e73d4cde7c4620ea43cbd82ba7b2af02e
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Nov 9 12:21:21 2026 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon Nov 9 13:11:05 2026 +0000

    Revert "xen/gnttab: Drop owner->grant_table check in _cache_flush()"
    
    The claim that ARM system domains don't own memory is false.
    CONFIG_STATIC_SHM is one example where DOM_IO does own memory.
    
    This reverts commit bec8e3c1fb91b96f337c08c6daf1bb2563b320c0.
    
    Reported-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/common/grant_table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index 2285c4aee8..5e79c012b6 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -3633,7 +3633,7 @@ static int _cache_flush(gnttab_cache_flush_t *cflush, 
grant_ref_t *cur_ref)
 
     page = mfn_to_page(mfn);
     owner = page_get_owner_and_reference(page);
-    if ( !owner )
+    if ( !owner || !owner->grant_table )
     {
         rcu_unlock_domain(d);
         return -EPERM;
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.