Showing error 1566

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: arch/x86/mm/pageattr.c
Line in file: 839
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-29 20:11:37 UTC


Source:

 809
 810        ret = __change_page_attr_set_clr(&cpa, checkalias);
 811
 812        /*
 813         * Check whether we really changed something:
 814         */
 815        if (!(cpa.flags & CPA_FLUSHTLB))
 816                goto out;
 817
 818        /*
 819         * No need to flush, when we did not set any of the caching
 820         * attributes:
 821         */
 822        cache = cache_attr(mask_set);
 823
 824        /*
 825         * On success we use clflush, when the CPU supports it to
 826         * avoid the wbindv. If the CPU does not support it and in the
 827         * error case we fall back to cpa_flush_all (which uses
 828         * wbindv):
 829         */
 830        if (!ret && cpu_has_clflush) {
 831                if (cpa.flags & CPA_ARRAY)
 832                        cpa_flush_array(addr, numpages, cache);
 833                else
 834                        cpa_flush_range(*addr, numpages, cache);
 835        } else
 836                cpa_flush_all(cache);
 837
 838out:
 839        return ret;
 840}
 841
 842static inline int change_page_attr_set(unsigned long *addr, int numpages,
 843                                       pgprot_t mask, int array)
 844{
 845        return change_page_attr_set_clr(addr, numpages, mask, __pgprot(0), 0,
 846                array);
 847}
 848
 849static inline int change_page_attr_clear(unsigned long *addr, int numpages,
Show full sources