Commit 1171e981 authored by Jeff Dike's avatar Jeff Dike

Fixed some locking bugs spotted by Oleg Drokin.

parent 8472e5ec
...@@ -968,8 +968,8 @@ static int ubd_revalidate(kdev_t rdev) ...@@ -968,8 +968,8 @@ static int ubd_revalidate(kdev_t rdev)
set_capacity(fake_gendisk[n], size / 512); set_capacity(fake_gendisk[n], size / 512);
dev->size = size; dev->size = size;
} }
spin_unlock(&ubd_lock);
out: out:
spin_unlock(&ubd_lock);
return err; return err;
} }
......
...@@ -157,7 +157,7 @@ int activate_fd(int irq, int fd, int type, void *dev_id) ...@@ -157,7 +157,7 @@ int activate_fd(int irq, int fd, int type, void *dev_id)
printk("Registering fd %d twice\n", fd); printk("Registering fd %d twice\n", fd);
printk("Irqs : %d, %d\n", irq_fd->irq, irq); printk("Irqs : %d, %d\n", irq_fd->irq, irq);
printk("Ids : 0x%x, 0x%x\n", irq_fd->id, dev_id); printk("Ids : 0x%x, 0x%x\n", irq_fd->id, dev_id);
goto out_free; goto out_unlock;
} }
} }
...@@ -334,8 +334,10 @@ void reactivate_fd(int fd, int irqnum) ...@@ -334,8 +334,10 @@ void reactivate_fd(int fd, int irqnum)
flags = irq_lock(); flags = irq_lock();
irq = find_irq_by_fd(fd, irqnum, &i); irq = find_irq_by_fd(fd, irqnum, &i);
if(irq == NULL) if(irq == NULL){
goto out; irq_unlock(flags);
return;
}
pollfds[i].fd = irq->fd; pollfds[i].fd = irq->fd;
irq_unlock(flags); irq_unlock(flags);
...@@ -344,8 +346,6 @@ void reactivate_fd(int fd, int irqnum) ...@@ -344,8 +346,6 @@ void reactivate_fd(int fd, int irqnum)
* section. * section.
*/ */
maybe_sigio_broken(fd, irq->type); maybe_sigio_broken(fd, irq->type);
out:
irq_unlock(flags);
} }
void deactivate_fd(int fd, int irqnum) void deactivate_fd(int fd, int irqnum)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment