Commit 9eff37a8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Konrad Rzeszutek Wilk
Browse files

xen/privcmd: fix condition in privcmd_close()

The parenthesis are in the wrong place so the original code is
equivalent to:

	if (!xen_feature(XENFEAT_writable_descriptor_tables)) { ...

Which obviously was not intended.

Signed-off-by: default avatarDan Carpenter <>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <>
parent 7c86617d
...@@ -504,7 +504,7 @@ static void privcmd_close(struct vm_area_struct *vma) ...@@ -504,7 +504,7 @@ static void privcmd_close(struct vm_area_struct *vma)
struct page **pages = vma->vm_private_data; struct page **pages = vma->vm_private_data;
int numpgs = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; int numpgs = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
if (!xen_feature(XENFEAT_auto_translated_physmap || !numpgs || !pages)) if (!xen_feature(XENFEAT_auto_translated_physmap) || !numpgs || !pages)
return; return;
xen_unmap_domain_mfn_range(vma, numpgs, pages); xen_unmap_domain_mfn_range(vma, numpgs, pages);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment