Showing error 898

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: sound/core/pcm_native.c
Line in file: 708
Project: Linux Kernel
Project version: 2.6.28
Tools: Undetermined 1
Entered: 2012-02-27 21:22:42 UTC


Source:

 678                snd_pcm_gettime(runtime, &runtime->trigger_tstamp);
 679        } else {
 680                snd_pcm_trigger_tstamp(runtime->trigger_master);
 681                runtime->trigger_tstamp = runtime->trigger_master->runtime->trigger_tstamp;
 682        }
 683        runtime->trigger_master = NULL;
 684}
 685
 686struct action_ops {
 687        int (*pre_action)(struct snd_pcm_substream *substream, int state);
 688        int (*do_action)(struct snd_pcm_substream *substream, int state);
 689        void (*undo_action)(struct snd_pcm_substream *substream, int state);
 690        void (*post_action)(struct snd_pcm_substream *substream, int state);
 691};
 692
 693/*
 694 *  this functions is core for handling of linked stream
 695 *  Note: the stream state might be changed also on failure
 696 *  Note2: call with calling stream lock + link lock
 697 */
 698static int snd_pcm_action_group(struct action_ops *ops,
 699                                struct snd_pcm_substream *substream,
 700                                int state, int do_lock)
 701{
 702        struct snd_pcm_substream *s = NULL;
 703        struct snd_pcm_substream *s1;
 704        int res = 0;
 705
 706        snd_pcm_group_for_each_entry(s, substream) {
 707                if (do_lock && s != substream)
 708                        spin_lock_nested(&s->self_group.lock,
 709                                         SINGLE_DEPTH_NESTING);
 710                res = ops->pre_action(s, state);
 711                if (res < 0)
 712                        goto _unlock;
 713        }
 714        snd_pcm_group_for_each_entry(s, substream) {
 715                res = ops->do_action(s, state);
 716                if (res < 0) {
 717                        if (ops->undo_action) {
 718                                snd_pcm_group_for_each_entry(s1, substream) {
Show full sources