Enable lock context analysis#619
Enable lock context analysis#619blktests-ci[bot] wants to merge 14 commits intolinus-master_basefrom
Conversation
|
Upstream branch: ecc64d2 |
|
Upstream branch: ecc64d2 |
e52183e to
afbdff3
Compare
|
Upstream branch: ecc64d2 |
afbdff3 to
dce2c9a
Compare
78036b2 to
bbb3394
Compare
|
Upstream branch: c107785 |
dce2c9a to
e2cb4e7
Compare
bbb3394 to
901a429
Compare
|
Upstream branch: 5ee8dbf |
e2cb4e7 to
0e2f11f
Compare
901a429 to
1f19ba6
Compare
|
Upstream branch: 1f318b9 |
0e2f11f to
427f9ac
Compare
1f19ba6 to
e79276a
Compare
Make drbd_adm_dump_devices() call rcu_read_lock() before rcu_read_unlock() is called. This has been detected by the Clang thread-safety analyzer. Compile-tested only. Tested-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com> Cc: Andreas Gruenbacher <agruen@linbit.com> Fixes: a55bbd3 ("drbd: Backport the "status" command") Signed-off-by: Bart Van Assche <bvanassche@acm.org>
The Clang thread-safety analyzer does not support testing return values with "< 0". Hence change the "< 0" test into "!= 0". This is fine since the radix_tree_maybe_preload() return value is <= 0. Cc: Yu Kuai <yukuai3@huawei.com> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Clang is more strict than sparse with regard to lock context annotation checking. Hence this patch that makes the lock context annotations compatible with Clang. __release() annotations have been added below invocations of indirect calls that unlock a mutex because Clang does not support annotating function pointers with __releases(). Enable context analysis in the block layer Makefile. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
ktio() unlocks and locks iocq[id].lock. Add a __must_hold() annotation that reflects this. This annotation prevents that Clang will complain about this function once lock context analysis is enabled. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Clang performs more strict checking of lock context annotations than sparse. This patch makes the DRBD lock context annotations compatible with Clang and prepares for enabling lock context analysis. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Prepare for enabling lock context analysis by adding lock context annotations that are compatible with Clang. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Prepare for enabling lock context analysis by adding those lock context annotations that are required by Clang. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Prepare for enabling lock context analysis by adding the lock context annotations that are required by Clang. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Prepare for enabling lock context analysis by adding the lock context annotations that are required by Clang. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Prepare for enabling lock context analysis by adding the lock context annotations required by Clang. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Add the lock context annotations that are required by Clang. Remove the __must_hold(&ub->mutex) annotation from ublk_mark_io_ready() because not all callers hold ub->mutex. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
|
Upstream branch: None |
Prepare for enabling lock context analysis by adding a lock context annotation that is required for Clang. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Prepare for enabling lock context analysis by adding the lock context annotations that are required by Clang. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Now that all locking functions in block drivers have been annotated, enable lock context analysis for all block drivers. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> # zram
427f9ac to
a4132f8
Compare
Pull request for series with
subject: Enable lock context analysis
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1061541