[Bugme-janitors] [Bug 9580] Dereferencing NULL pointer on kernel/irq/manage.c

bugme-daemon at bugzilla.kernel.org bugme-daemon at bugzilla.kernel.org
Sun May 4 23:39:22 PDT 2008


http://bugzilla.kernel.org/show_bug.cgi?id=9580


protasnb at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |protasnb at gmail.com,
                   |                            |tglx at linutronix.de




------- Comment #1 from protasnb at gmail.com  2008-05-04 23:39 -------
You mean the code below (the line numbers have changed). Statement (1) applies
that chip cannot be NULL. Then "if (desc->chip" seems extraneous in (2) and
(3). I wonder if it's just being over-careful, the check shouldn't be needed
here.

        if (!shared) {
(1)             irq_chip_set_defaults(desc->chip);

#if defined(CONFIG_IRQ_PER_CPU)
                if (new->flags & IRQF_PERCPU)
                        desc->status |= IRQ_PER_CPU;
#endif

                /* Setup the type (level, edge polarity) if configured: */
                if (new->flags & IRQF_TRIGGER_MASK) {
 (2)                    if (desc->chip && desc->chip->set_type)
                                desc->chip->set_type(irq,
                                                new->flags &
IRQF_TRIGGER_MASK);
                        else
                                /*
                                 * IRQF_TRIGGER_* but the PIC does not support
                                 * multiple flow-types?
                                 */
                                printk(KERN_WARNING "No IRQF_TRIGGER set_type "
                                       "function for IRQ %d (%s)\n", irq,
  (3)                                   desc->chip ? desc->chip->name :
                                       "unknown");
                } else
                        compat_irq_chip_set_default_handler(desc);

                desc->status &= ~(IRQ_AUTODETECT | IRQ_WAITING |
                                  IRQ_INPROGRESS | IRQ_SPURIOUS_DISABLED);

                if (!(desc->status & IRQ_NOAUTOEN)) {
                        desc->depth = 0;
                        desc->status &= ~IRQ_DISABLED;
                        if (desc->chip->startup)
                                desc->chip->startup(irq);
                        else


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Bugme-janitors mailing list