[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-devel
Subject:    Re: [Xen-devel] [PATCH] Improve xenbus timeout error message
From:       Keir Fraser <Keir.Fraser () cl ! cam ! ac ! uk>
Date:       2006-06-30 17:23:04
Message-ID: 75c1b2b7cf6ba952841d43074c731a4a () cl ! cam ! ac ! uk
[Download RAW message or body]


On 30 Jun 2006, at 18:17, Keir Fraser wrote:

>> 	Note, the original patch leaked device references when printing out 
>> the
>> warning if there are multiple disconnected devices. Fixed in the 
>> second
>> patch.
>
> Ha. And I spotted that and already fixed in a third patch (10574): The 
> very final. :-)

Also your fix is racy, since it calls bus_find_device() on a dev that 
you have no reference to (since you already called put_device()). So 
there's a vanishingly small possibility that the dev could disappear in 
the meantime.

I replaced with a straightforward bus_for_each_device iterator with the 
printk inside the iterator callback.

  -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic