* [patch] xen/privcmd: fix condition in privcmd_close()
@ 2012-11-05 6:42 Dan Carpenter
2013-05-15 6:56 ` [patch -resend] " Dan Carpenter
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2012-11-05 6:42 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk, Mukesh Rathor
Cc: Jeremy Fitzhardinge, xen-devel, kernel-janitors, virtualization
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: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index b9d0898..6011f3b 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -495,7 +495,7 @@ static void privcmd_close(struct vm_area_struct *vma)
struct page **pages = vma->vm_private_data;
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;
xen_unmap_domain_mfn_range(vma, numpgs, pages);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [patch -resend] xen/privcmd: fix condition in privcmd_close()
2012-11-05 6:42 [patch] xen/privcmd: fix condition in privcmd_close() Dan Carpenter
@ 2013-05-15 6:56 ` Dan Carpenter
2013-05-15 14:23 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2013-05-15 6:56 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk
Cc: Jeremy Fitzhardinge, xen-devel, kernel-janitors, virtualization
The parenthesis are in the wrong place so the original code is
equivalent to:
if (!xen_feature(0x1)) { ...
Or:
if (!xen_feature(XENFEAT_writable_descriptor_tables)) { ...
Which obviously was not intended.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
I sent this last November but it was never merged.
diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index ca2b00e..2cfc24d 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -504,7 +504,7 @@ static void privcmd_close(struct vm_area_struct *vma)
struct page **pages = vma->vm_private_data;
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;
xen_unmap_domain_mfn_range(vma, numpgs, pages);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch -resend] xen/privcmd: fix condition in privcmd_close()
2013-05-15 6:56 ` [patch -resend] " Dan Carpenter
@ 2013-05-15 14:23 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-05-15 14:23 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jeremy Fitzhardinge, xen-devel, kernel-janitors, virtualization
On Wed, May 15, 2013 at 09:56:24AM +0300, Dan Carpenter wrote:
> The parenthesis are in the wrong place so the original code is
> equivalent to:
>
> if (!xen_feature(0x1)) { ...
> Or:
> if (!xen_feature(XENFEAT_writable_descriptor_tables)) { ...
>
> Which obviously was not intended.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> I sent this last November but it was never merged.
Ah, it was, but in a different branch (stable/pvh.v8). Let me stick it on branch for Linus.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-15 14:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-05 6:42 [patch] xen/privcmd: fix condition in privcmd_close() Dan Carpenter
2013-05-15 6:56 ` [patch -resend] " Dan Carpenter
2013-05-15 14:23 ` Konrad Rzeszutek Wilk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).