Re: Re : [CHECKER] 28 potential interrupt errors

Junfeng Yang (yjf@stanford.edu)
Thu, 22 Mar 2001 15:49:31 -0800 (PST)


Sometimes the line number reported by the checker is not correct.
But if you go into the function, you can find the bug.

On Thu, 22 Mar 2001, Jean Tourrilhes wrote:

> Junfeng Yang wrote :
> > Hi,
> >
> > Here are yet more results from the MC project. This checker looks for
> > inconsistent usage of interrupt functions.
> [...]
> > ---------------------------------------------------------
> > [BUG] error path

at line 952, this function exits without restoring flags.

> >
> > /u2/acc/oses/linux/2.4.1/drivers/net/irda/irport.c:943:irport_net_ioctl: ERROR:INTR:947:997: Interrupts inconsistent, severity `20':997
> >
> > /* Disable interrupts & save flags */
> > save_flags(flags);
> > Start --->
> > cli();
> >
> > switch (cmd) {
> > case SIOCSBANDWIDTH: /* Set bandwidth */
> > if (!capable(CAP_NET_ADMIN))
> > return -EPERM;
> > irda_task_execute(self, __irport_change_speed, NULL, NULL,
> >
> > ... DELETED 40 lines ...
> >
> > }
> >
> > restore_flags(flags);
> >
> > Error --->
> > return ret;
> > }
> >
> > [BUG] error path. this bug is interesting
> >
> > /u2/acc/oses/linux/2.4.1/drivers/net/pcmcia/wavelan_cs.c:2561:wavelan_get_wireless_stats: ERROR:INTR:2528:2561: Interrupts inconsistent, severity `20':2561
> >
> >
> > /* Disable interrupts & save flags */
> > Start --->
> > spin_lock_irqsave (&lp->lock, flags);
> >
> > if(lp == (net_local *) NULL)

return without restoring flags here
(use lp->lock first, then check if lp == NULL)
--->

> > return (iw_stats *) NULL;
> > wstats = &lp->wstats;
> >
> > /* Get data from the mmc */
> >
> > ... DELETED 23 lines ...
> >

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/