Showing error 598

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: sound/oss/sequencer.c
Line in file: 1487
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:20:57 UTC


Source:

1457                        synth_devs[dev]->ioctl(dev, cmd, arg);
1458                        return 0;
1459
1460                case SNDCTL_SYNTH_INFO:
1461                        if (get_user(dev, &((struct synth_info __user *)arg)->device))
1462                                return -EFAULT;
1463                        if (dev < 0 || dev >= max_synthdev)
1464                                return -ENXIO;
1465                        if (!(synth_open_mask & (1 << dev)) && !orig_dev)
1466                                return -EBUSY;
1467                        return synth_devs[dev]->ioctl(dev, cmd, arg);
1468
1469                /* Like SYNTH_INFO but returns ID in the name field */
1470                case SNDCTL_SYNTH_ID:
1471                        if (get_user(dev, &((struct synth_info __user *)arg)->device))
1472                                return -EFAULT;
1473                        if (dev < 0 || dev >= max_synthdev)
1474                                return -ENXIO;
1475                        if (!(synth_open_mask & (1 << dev)) && !orig_dev)
1476                                return -EBUSY;
1477                        memcpy(&inf, synth_devs[dev]->info, sizeof(inf));
1478                        strlcpy(inf.name, synth_devs[dev]->id, sizeof(inf.name));
1479                        inf.device = dev;
1480                        return copy_to_user(arg, &inf, sizeof(inf))?-EFAULT:0;
1481
1482                case SNDCTL_SEQ_OUTOFBAND:
1483                        if (copy_from_user(&event_rec, arg, sizeof(event_rec)))
1484                                return -EFAULT;
1485                        spin_lock_irqsave(&lock,flags);
1486                        play_event(event_rec.arr);
1487                        spin_unlock_irqrestore(&lock,flags);
1488                        return 0;
1489
1490                case SNDCTL_MIDI_INFO:
1491                        if (get_user(dev, &((struct midi_info __user *)arg)->device))
1492                                return -EFAULT;
1493                        if (dev < 0 || dev >= max_mididev || !midi_devs[dev])
1494                                return -ENXIO;
1495                        midi_devs[dev]->info.device = dev;
1496                        return copy_to_user(arg, &midi_devs[dev]->info, sizeof(struct midi_info))?-EFAULT:0;
1497
Show full sources