Showing error 569

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: 2875
Project: Linux Kernel
Project version: 2.6.28
Confirmation: Fixed by 91054598f794fb5d8a0b1e747ff8e2e8fc2115b3
Tools: Stanse (1.2)
Smatch (1.59)
Entered: 2011-11-07 22:19:59 UTC


Source:

2845                template.periods = simple_strtoul(str, NULL, 10);
2846                ptr = snd_info_get_str(str, ptr, sizeof(str));
2847                template.period_size = simple_strtoul(str, NULL, 10);
2848                for (idx1 = 31; idx1 >= 0; idx1--)
2849                        if (template.period_size & (1 << idx1))
2850                                break;
2851                for (idx1--; idx1 >= 0; idx1--)
2852                        template.period_size &= ~(1 << idx1);
2853                do {
2854                        ptr = snd_info_get_str(str, ptr, sizeof(str));
2855                        if (!strcmp(str, "disable")) {
2856                                template.disable = 1;
2857                        } else if (!strcmp(str, "direct")) {
2858                                template.direct = 1;
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);
Show full sources