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@citrix.com>
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@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Jan Beulich <jbeulich@suse.com>
if ( !irq_desc_initialized(desc) || desc->handler == &no_irq_type )
continue;
- ssid = xsm_show_irq_sid(irq);
+ ssid = in_irq() ? NULL : xsm_show_irq_sid(irq);
spin_lock_irqsave(&desc->lock, flags);
{
struct bhdr *b;
- ASSERT(!in_irq());
-
if ( p == NULL )
return;
+ ASSERT(!in_irq());
+
/* Strip alignment padding. */
b = (struct bhdr *)((char *) p - BHDR_OVERHEAD);
if ( b->size & 1 )