Showing error 1695

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: sound/core/oss/pcm_oss.c
Line in file: 2889
Project: Linux Kernel
Project version: 2.6.28
Confirmation: Fixed by 91054598f794fb5d8a0b1e747ff8e2e8fc2115b3
Tools: Smatch (1.59)
Entered: 2013-09-10 14:01:52 UTC


Source:

2859                        } else if (!strcmp(str, "block")) {
2860                                template.block = 1;
2861                        } else if (!strcmp(str, "non-block")) {
2862                                template.nonblock = 1;
2863                        } else if (!strcmp(str, "partial-frag")) {
2864                                template.partialfrag = 1;
2865                        } else if (!strcmp(str, "no-silence")) {
2866                                template.nosilence = 1;
2867                        } else if (!strcmp(str, "buggy-ptr")) {
2868                                template.buggyptr = 1;
2869                        }
2870                } while (*str);
2871                if (setup == NULL) {
2872                        setup = kmalloc(sizeof(*setup), GFP_KERNEL);
2873                        if (! setup) {
2874                                buffer->error = -ENOMEM;
2875                                mutex_lock(&pstr->oss.setup_mutex);
2876                                return;
2877                        }
2878                        if (pstr->oss.setup_list == NULL)
2879                                pstr->oss.setup_list = setup;
2880                        else {
2881                                for (setup1 = pstr->oss.setup_list;
2882                                     setup1->next; setup1 = setup1->next);
2883                                setup1->next = setup;
2884                        }
2885                        template.task_name = kstrdup(task_name, GFP_KERNEL);
2886                        if (! template.task_name) {
2887                                kfree(setup);
2888                                buffer->error = -ENOMEM;
2889                                mutex_lock(&pstr->oss.setup_mutex);
2890                                return;
2891                        }
2892                }
2893                *setup = template;
2894                mutex_unlock(&pstr->oss.setup_mutex);
2895        }
2896}
2897
2898static void snd_pcm_oss_proc_init(struct snd_pcm *pcm)
2899{
Show full sources