[PATCH 2/2] Fix irq_alloc_host() reference counting and callers

Michael Ellerman michael at ellerman.id.au
Tue May 13 21:49:46 EST 2008


On Tue, 2008-05-13 at 20:58 +1000, Paul Mackerras wrote:
> Michael Ellerman writes:
> 
> > When I changed irq_alloc_host() to take an of_node
> > (52964f87c64e6c6ea671b5bf3030fb1494090a48: "Add an
> > optional device_node pointer to the irq_host"),
> > I botched the reference counting semantics.
> > 
> > Stephen pointed out that it's irq_alloc_host()'s
> > business if it needs to take an additional reference
> > to the device_node, the caller shouldn't need to care.
> > To make that clean we also need a free routine, so
> > the caller doesn't have to deal with dropping the
> > reference.
> > 
> > Luckily we now have an irq_free_host() where we can
> > drop the reference - so we can make the reference
> > counting internal to irq_alloc_host()/irq_free_host().
> 
> Is this needed for 2.6.26? 

No.

> What's the worst possible effect of this bug?

Only nodes having an incorrect reference count - in either direction.
But pseries is fine, so there should be no real bug.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080513/7af4120c/attachment.pgp>


More information about the Linuxppc-dev mailing list