[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86: prevent call to xfree() in dump_irqs() while in an irq context



>>> On 21.05.12 at 17:06, Keir Fraser <keir.xen@xxxxxxxxx> wrote:
> On 21/05/2012 14:59, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx> wrote:
> 
>> On 21/05/12 14:50, Jan Beulich wrote:
>>> Because of c/s 24707:96987c324a4f, dump_irqs() can now be called in an
>>> irq context when a bug condition is encountered. If this is the case,
>>> ignore the call to xsm_show_irq_ssid() and the subsequent call to
>>> xfree().
>>> 
>>> This prevents an assertion failure in xfree(), and should allow all the
>>> debug information to be dumped, before failing with a BUG() because of
>>> the underlying race condition we are attempting to reproduce.
>>> 
>>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>> 
>>> Rather than using the non-obvious conditional around an xfree() that
>>> would be passed NULL only in the inverse case (which could easily get
>>> removed by a future change on the basis that calling xfree(NULL) is
>>> benign), switch the order of checks in xfree() itself and only suppress
>>> the call to XSM that could potentially call xmalloc().
>>> 
>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>> 
>> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> 
> I'm a bit dubious about having a function that can be called in irq context
> for some input values but not others. I suppose this trivial case for
> xfree() is obvious enough, so I'm okay with it. If it was anything more
> subtle, I would probably nack.

I did ask that in the original thread, but you never responded
either way. Is your above reply an ack then, or should I commit
Andy's original patch instead?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.