All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] x86/hpet: fix cpumask allocation after	23990:1c8789852eaf
Date: Mon, 24 Oct 2011 12:39:12 +0200	[thread overview]
Message-ID: <4EA54050.9020508@amd.com> (raw)
In-Reply-To: <4EA19733020000780005CC83@nat28.tlf.novell.com>

On 10/21/11 16:00, Jan Beulich wrote:
> 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@suse.com>

Tested-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>

>
> --- a/xen/arch/x86/hpet.c
> +++ b/xen/arch/x86/hpet.c
> @@ -512,15 +512,8 @@ void __init hpet_broadcast_init(void)
>               return;
>
>           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) )
>               return;
>           hpet_events->irq = -1;
>
>
>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

      reply	other threads:[~2011-10-24 10:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-21 14:00 [PATCH] x86/hpet: fix cpumask allocation after 23990:1c8789852eaf Jan Beulich
2011-10-24 10:39 ` Christoph Egger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EA54050.9020508@amd.com \
    --to=christoph.egger@amd.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.