lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAR576NEto9ewk+OhGBfh6+xicB3KL-41gUkc5g_68UvJw@mail.gmail.com>
Date: Mon, 8 Apr 2024 21:33:18 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Question about context imbalance warning in sparse

Hi Luc,


Sparse does not seem to consider the first parameter
of __context__().

Sparse does not warn anything about this code.


void foo(void)
{
        __context__(a, 1);
        __context__(b, -1);
}




In Linux, I think sparse should warn
the following code
(lock and unlock different locks)


void foo(void)
{
        write_lock(&my_lock1);
        write_unlock(&my_lock2);
}



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ