This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [xen-unstable] x86/hpet: fix cpumask allocation after 23

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86/hpet: fix cpumask allocation after 23990:1c8789852eaf
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Tue, 25 Oct 2011 01:55:17 +0100
Delivery-date: Mon, 24 Oct 2011 17:57:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1319475667 -3600
# Node ID 662dbf6ee71c3bd14db0d32cc69b85f8513527e3
# Parent  e458dfc35b8d3be04a9b72c30ff97163e27a7314
x86/hpet: fix cpumask allocation after 23990:1c8789852eaf

hpet_fsb_cap_lookup(), if it doesn't find any FSB capable timer,
leaves hpet_events allocated, while hpet_events->cpumask may not have
been, As we're pretty generous with these one-time allocations already
(in that hpet_events doesn't get freed when no usable counters were
found, even if in that case only the first array entry [or none at
all] may get used), simply make the cpumask allocation in the legacy
case independent of whether hpet_events was NULL before.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Tested-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Acked-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>

diff -r e458dfc35b8d -r 662dbf6ee71c xen/arch/x86/hpet.c
--- a/xen/arch/x86/hpet.c       Mon Oct 24 18:00:20 2011 +0100
+++ b/xen/arch/x86/hpet.c       Mon Oct 24 18:01:07 2011 +0100
@@ -512,15 +512,8 @@
         if ( !hpet_events )
-        {
             hpet_events = xzalloc(struct hpet_event_channel);
-            if ( hpet_events && !zalloc_cpumask_var(&hpet_events->cpumask) )
-            {
-                xfree(hpet_events);
-                hpet_events = NULL;
-            }
-        }
-        if ( !hpet_events )
+        if ( !hpet_events || !zalloc_cpumask_var(&hpet_events->cpumask) )
         hpet_events->irq = -1;

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86/hpet: fix cpumask allocation after 23990:1c8789852eaf, Xen patchbot-unstable <=