3c509B locking w/"re-entering the interrupt handler"

Robert G. Brown rgb@phy.duke.edu
Mon Sep 7 09:57:49 1998


On Sat, 5 Sep 1998, Jeremy Wohl wrote:

>         vp = (struct vortex_private *)dev->priv;
>         if (test_and_set_bit(0, (void*)&vp->in_interrupt)) {
>                 printk(KERN_ERR "%s: Re-entering the interrupt handler.\n", dev->name);
> +               vp->in_interrupt = 0;   /* Avoid halting machine. */

If you're gonna do it, at least do it with

+                 clear_bit(0,(void*)&vp->in_interrupt; /* Avoid halting machine */

as the "=" assignment isn't SMP-safe.  Of course, its also easier to
just comment out the whole conditional than to set the flag and
immediately clear it...

   rgb

Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb@phy.duke.edu