WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 1/5] cpumask: update irq_desc to use cpumask_var_

To: "Mike Travis" <travis@xxxxxxx>
Subject: [Xen-devel] Re: [PATCH 1/5] cpumask: update irq_desc to use cpumask_var_t
From: "Yinghai Lu" <yinghai@xxxxxxxxxx>
Date: Wed, 7 Jan 2009 12:27:46 -0800
Cc: Jack Steiner <steiner@xxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>, Venkatesh Pallipadi <venkatesh.pallipadi@xxxxxxxxx>, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Chris Wright <chrisw@xxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>, KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 07 Jan 2009 12:28:11 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=OId0Dsm8cLwJRMXUtyBmjx/L/dKskif9mO9CZIQ0vJw=; b=BLfEr9JmW0l3McMjNJxqSJsGvwPVUXNEdDCiEdEF4yEdxBnnTota+MHaAm5GGCTPlv u2iFdv7v1JxLAAQnadktaZTVswMLBqeqd1ug5qJ+YxqaPSMvGLbb0BFibyvlJRsClpEf tVaQWauxMZ5XzbnDTe/aoEaTYsF15xtdzxpjo=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=Wumcn9SZU+l3MKEOidscXBG1P5xzO9f6OIffDcFv3wPq36NFN8eFll8TMfGFwbPqYl fKab7Mt0UdZmAR4VEJAoSj+/48BwsGGByVc+o0/28TXkP6sIDOrGYlu8U7wZXpeolefk d3g36U/w7AWdulBXhI7q36Xn/w7cZl3c2IMWU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090107195832.465094000@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20090107195832.265117000@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20090107195832.465094000@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, Jan 7, 2009 at 11:58 AM, Mike Travis <travis@xxxxxxx> wrote:
| --- linux-2.6-for-ingo.orig/kernel/irq/numa_migrate.c
| +++ linux-2.6-for-ingo/kernel/irq/numa_migrate.c
| @@ -46,6 +46,7 @@ static void init_copy_one_irq_desc(int i
|       desc->cpu = cpu;
|       lockdep_set_class(&desc->lock, &irq_desc_lock_class);
|       init_copy_kstat_irqs(old_desc, desc, cpu, nr_cpu_ids);
|+      init_copy_desc_masks(old_desc, desc);
|       arch_init_copy_chip_data(old_desc, desc, cpu);
| }
|
|@@ -76,11 +77,20 @@ static struct irq_desc *__real_move_irq_
|       node = cpu_to_node(cpu);
|       desc = kzalloc_node(sizeof(*desc), GFP_ATOMIC, node);
|       if (!desc) {
|-              printk(KERN_ERR "irq %d: can not get new irq_desc for 
migration.\n", irq);
|+              printk(KERN_ERR "irq %d: can not get new irq_desc "
|+                              "for migration.\n", irq);
|               /* still use old one */
|               desc = old_desc;
|               goto out_unlock;
|       }
|+      if (!init_alloc_desc_masks(desc, node, false)) {
|+              printk(KERN_ERR "irq %d: can not get new irq_desc cpumask "
|+                              "for migration.\n", irq);
|+              /* still use old one */
|+              kfree(desc);
|+              desc = old_desc;
|+              goto out_unlock;
|+      }
|       init_copy_one_irq_desc(irq, old_desc, desc, cpu);

desc new mask_var (allocated) aka the pointer is overwritten here...
you may need to calling move init_alloc_desc_masks() into
init_copy_one_irq_desc()

|       irq_desc_ptrs[irq] = desc;

YH

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Re: [PATCH 1/5] cpumask: update irq_desc to use cpumask_var_t, Yinghai Lu <=