On Thu, Dec 08, 2011 at 11:09:19AM +0100, Christoph Egger wrote: > On 12/08/11 04:34, Cherry G. Mathew wrote: > >Module Name: src > >Committed By: cherry > >Date: Thu Dec 8 03:34:48 UTC 2011 > > > >Modified Files: > > src/sys/arch/xen/xen: evtchn.c > > > >Log Message: > >kmem_free() the appropriate size. > > > >Thanks cegger@ > > This is still not enough: In pirq_establish() you allocate > sizeof(struct pintrhand) but in event_remove_handler you free > sizeof(struct intrhand). > And sizeof(struct pintrhand) != sizeof(intrhand). > > We need a ih_size field to track the right size.
No, in event_remove_handler() is't really a intrhand which is freed, not pintrhand (the pintrhand is ih->ih_arg, not ih itself). At this time, pintrhand is never freed. It should be freed in pci_intr_disestablish() when this one will do something usefull. -- Manuel Bouyer <bou...@antioche.eu.org> NetBSD: 26 ans d'experience feront toujours la difference --