Skip to content

Enable lock context analysis in drivers/block/ - #1042

Open
blktests-ci[bot] wants to merge 12 commits into
linus-master_basefrom
series/1137673=>linus-master
Open

Enable lock context analysis in drivers/block/#1042
blktests-ci[bot] wants to merge 12 commits into
linus-master_basefrom
series/1137673=>linus-master

Conversation

@blktests-ci

@blktests-ci blktests-ci Bot commented Aug 2, 2026

Copy link
Copy Markdown

Pull request for series with
subject: Enable lock context analysis in drivers/block/
version: 2
url: https://patchwork.kernel.org/project/linux-block/list/?series=1137673

@blktests-ci

blktests-ci Bot commented Aug 2, 2026

Copy link
Copy Markdown
Author

Upstream branch: 2d2338c
series: https://patchwork.kernel.org/project/linux-block/list/?series=1137673
version: 2

@blktests-ci

blktests-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Author

Upstream branch: 2d2338c
series: https://patchwork.kernel.org/project/linux-block/list/?series=1137673
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1137673=>linus-master branch from 6efc2ea to 386b652 Compare August 3, 2026 13:37
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from c0cc428 to 23d8cf0 Compare August 6, 2026 09:20
@blktests-ci

blktests-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown
Author

Upstream branch: 0d83957
series: https://patchwork.kernel.org/project/linux-block/list/?series=1137673
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1137673=>linus-master branch from 386b652 to 176d491 Compare August 6, 2026 09:25
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch 2 times, most recently from 612ae31 to 863d43a Compare August 9, 2026 07:24
@blktests-ci

blktests-ci Bot commented Aug 9, 2026

Copy link
Copy Markdown
Author

Upstream branch: 06cf618
series: https://patchwork.kernel.org/project/linux-block/list/?series=1137673
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1137673=>linus-master branch from 176d491 to 1c63fc6 Compare August 9, 2026 08:49
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from 863d43a to 29ac21d Compare August 10, 2026 22:28
@blktests-ci

blktests-ci Bot commented Aug 10, 2026

Copy link
Copy Markdown
Author

Upstream branch: d58772d
series: https://patchwork.kernel.org/project/linux-block/list/?series=1137673
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1137673=>linus-master branch from 1c63fc6 to da1cbde Compare August 10, 2026 23:19
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from 29ac21d to ea2c39d Compare August 12, 2026 13:27
@blktests-ci

blktests-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown
Author

Upstream branch: f5bbbfe
series: https://patchwork.kernel.org/project/linux-block/list/?series=1137673
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1137673=>linus-master branch from da1cbde to 1aff975 Compare August 12, 2026 14:55
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from ea2c39d to 4082a30 Compare August 12, 2026 18:56
@blktests-ci

blktests-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown
Author

Upstream branch: 3d6d817
series: https://patchwork.kernel.org/project/linux-block/list/?series=1137673
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1137673=>linus-master branch from 1aff975 to 62819f1 Compare August 12, 2026 20:07
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from 4082a30 to 36bd7eb Compare August 13, 2026 19:18
@blktests-ci

blktests-ci Bot commented Aug 13, 2026

Copy link
Copy Markdown
Author

Upstream branch: 3aa1dca
series: https://patchwork.kernel.org/project/linux-block/list/?series=1137673
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1137673=>linus-master branch from 62819f1 to b500e10 Compare August 13, 2026 21:04
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch 2 times, most recently from d89ab11 to fdba928 Compare August 16, 2026 18:34
@blktests-ci

blktests-ci Bot commented Aug 16, 2026

Copy link
Copy Markdown
Author

Upstream branch: fd923b3
series: https://patchwork.kernel.org/project/linux-block/list/?series=1137673
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1137673=>linus-master branch from b500e10 to fd0dce3 Compare August 16, 2026 21:13
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from fdba928 to 60442a3 Compare August 17, 2026 14:10
@blktests-ci

blktests-ci Bot commented Aug 17, 2026

Copy link
Copy Markdown
Author

Upstream branch: 8d3ae59
series: https://patchwork.kernel.org/project/linux-block/list/?series=1137673
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1137673=>linus-master branch from fd0dce3 to 4b9d218 Compare August 17, 2026 20:37
@blktests-ci
blktests-ci Bot force-pushed the linus-master_base branch from 60442a3 to 3df366e Compare August 19, 2026 05:25
Add a missing __must_hold() annotation. Enable lock context analysis in the
Makefile.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Move the code that is protected by a mutex from loop_change_fd() into
__loop_change_fd(). Move the code that is protected by a mutex from
loop_configure() into __loop_configure(). Keep the behavior in
loop_global_lock_killable() for the global == true case. Expand
loop_global_lock_killable(lo, false) calls into a mutex_lock_killable()
and a mutex_unlock() call. This patch prepares for adding lock context
annotations.

Cc: Haris Iqbal <haris.iqbal@linux.dev>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Add lock context annotations that are compatible with Clang. Swap the
loop_ctl_mutex and loop_index_idr declarations such that __guarded_by()
can be used.

Cc: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Let the compiler verify lock and unlock calls. Enable lock context analysis
in the Makefile.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
Add __must_hold() annotations where these are missing. Document which mutex
protects nbd_index_idr.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Add __must_hold() annotations where these are missing. Because
null_lock_zone() and null_unlock_zone() use conditional locking, instead
of annotating these functions, introduce guard class null_zone. Replace
null_lock_zone() and null_unlock_zone() calls with scoped_guard(null_zone,
...). Enable lock context analysis in the Makefile.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Add lock context annotations.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Add the lock context annotations that are required by Clang.

Cc: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Let Clang verify lock and unlock calls. Enable lock context analysis in the
Makefile.

Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Add the lock context annotations that are required by Clang. Enable lock
context analysis in the Makefile.

Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Let Clang verify lock and unlock calls. Enable lock context analysis in the
Makefile.

Acked-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Now that all locking functions in block drivers have been annotated,
enable lock context analysis for all block drivers at the top level of
drivers/block/.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
@blktests-ci

blktests-ci Bot commented Aug 19, 2026

Copy link
Copy Markdown
Author

Upstream branch: bd5f485
series: https://patchwork.kernel.org/project/linux-block/list/?series=1137673
version: 2

@blktests-ci
blktests-ci Bot force-pushed the series/1137673=>linus-master branch from 4b9d218 to ee58368 Compare August 19, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant