ia64/xen-unstable
changeset 1313:bbc618396572
bitkeeper revision 1.873 (4088061aJxAcmfxVFNME07oyCEdeaQ)
Fix free_irq to not deallocate static irqactions.
Fix free_irq to not deallocate static irqactions.
author | kaf24@scramble.cl.cam.ac.uk |
---|---|
date | Thu Apr 22 17:51:22 2004 +0000 (2004-04-22) |
parents | de457488a115 |
children | 33e86963d2a4 |
files | xenolinux-2.4.26-sparse/arch/xen/kernel/ctrl_if.c xenolinux-2.4.26-sparse/arch/xen/kernel/irq.c |
line diff
1.1 --- a/xenolinux-2.4.26-sparse/arch/xen/kernel/ctrl_if.c Thu Apr 22 13:56:30 2004 +0000 1.2 +++ b/xenolinux-2.4.26-sparse/arch/xen/kernel/ctrl_if.c Thu Apr 22 17:51:22 2004 +0000 1.3 @@ -294,9 +294,11 @@ void ctrl_if_resume(void) 1.4 ctrl_if_evtchn = start_info.domain_controller_evtchn; 1.5 ctrl_if_irq = bind_evtchn_to_irq(ctrl_if_evtchn); 1.6 1.7 +#define SA_STATIC_ACTION 0x01000000 /* so that free_irq() doesn't do kfree() */ 1.8 memset(&ctrl_if_irq_action, 0, sizeof(ctrl_if_irq_action)); 1.9 ctrl_if_irq_action.handler = ctrl_if_interrupt; 1.10 ctrl_if_irq_action.name = "ctrl-if"; 1.11 + ctrl_if_irq_action.flags = SA_STATIC_ACTION; 1.12 (void)setup_irq(ctrl_if_irq, &ctrl_if_irq_action); 1.13 } 1.14
2.1 --- a/xenolinux-2.4.26-sparse/arch/xen/kernel/irq.c Thu Apr 22 13:56:30 2004 +0000 2.2 +++ b/xenolinux-2.4.26-sparse/arch/xen/kernel/irq.c Thu Apr 22 17:51:22 2004 +0000 2.3 @@ -784,7 +784,9 @@ void free_irq(unsigned int irq, void *de 2.4 cpu_relax(); 2.5 } 2.6 #endif 2.7 - kfree(action); 2.8 +#define SA_STATIC_ACTION 0x01000000 /* Is it our duty to free the action? */ 2.9 + if (!(action->flags & SA_STATIC_ACTION)) 2.10 + kfree(action); 2.11 return; 2.12 } 2.13 printk("Trying to free free IRQ%d\n",irq);