gnttab_end_foreign_access_ref() leaking grant entries?

Pratyush Yadav pratyush at freebsd.org
Mon Jun 18 12:41:44 UTC 2018


Hi everyone,

I was looking at gnttab_end_foreign_access_ref() and I notice that
while gnttab_end_foreign_access_ref() ends the foreign access, it does
not free the grant reference.

gnttab_end_foreign_access() free the reference by calling put_free_entry(ref).

gnttab_end_foreign_access_references() also frees the grant entries.

Shouldn't gnttab_end_foreign_access_ref() also free the grant entry?
It is an inconsistency at best and a bug at worst.

Is it ok if I submit a patch that calls put_free_entry(ref) in
gnttab_end_foreign_access_ref()?

-- 
Regards,
Pratyush Yadav


More information about the freebsd-xen mailing list