* Re: [PATCH 14/14] block: Enable lock context analysis for all block drivers
@ 2026-03-06 8:02 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-03-06 8:02 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "only suspicious fbc files changed"
::::::
BCC: lkp@intel.com
CC: llvm@lists.linux.dev
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20260304194843.760669-15-bvanassche@acm.org>
References: <20260304194843.760669-15-bvanassche@acm.org>
TO: Bart Van Assche <bvanassche@acm.org>
TO: Jens Axboe <axboe@kernel.dk>
CC: Christoph Hellwig <hch@lst.de>
CC: Damien Le Moal <dlemoal@kernel.org>
CC: Marco Elver <elver@google.com>
CC: linux-block@vger.kernel.org
CC: Bart Van Assche <bvanassche@acm.org>
CC: Justin Sanders <justin@coraid.com>
CC: Philipp Reisner <philipp.reisner@linbit.com>
CC: Lars Ellenberg <lars.ellenberg@linbit.com>
CC: "Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>
CC: "Md. Haris Iqbal" <haris.iqbal@ionos.com>
CC: Jack Wang <jinpu.wang@ionos.com>
CC: "Roger Pau Monné" <roger.pau@citrix.com>
CC: Minchan Kim <minchan@kernel.org>
CC: Sergey Senozhatsky <senozhatsky@chromium.org>
Hi Bart,
kernel test robot noticed the following build warnings:
[auto build test WARNING on axboe/for-next]
[also build test WARNING on bpf-next/net bpf-next/master bpf/master linus/master v7.0-rc2 next-20260305]
[cannot apply to ceph-client/testing ceph-client/for-linus hch-configfs/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Bart-Van-Assche/drbd-Balance-RCU-calls-in-drbd_adm_dump_devices/20260305-035510
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git for-next
patch link: https://lore.kernel.org/r/20260304194843.760669-15-bvanassche%40acm.org
patch subject: [PATCH 14/14] block: Enable lock context analysis for all block drivers
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20260306/202603061658.H8q89fcs-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c32caeec8158d634bb71ab8911a6031248b9fc47)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260306/202603061658.H8q89fcs-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202603061658.H8q89fcs-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/block/sunvdc.c:1124:2: warning: releasing spinlock 'port->vio.lock' that was not held [-Wthread-safety-analysis]
1124 | spin_unlock_irq(&port->vio.lock);
| ^
>> drivers/block/sunvdc.c:1133:1: warning: spinlock 'port->vio.lock' is still held at the end of function [-Wthread-safety-analysis]
1133 | }
| ^
drivers/block/sunvdc.c:1129:2: note: spinlock acquired here
1129 | spin_lock_irq(&port->vio.lock);
| ^
2 warnings generated.
vim +1124 drivers/block/sunvdc.c
76e74bbe0a38c67 Dwight Engen 2014-12-11 1113
76e74bbe0a38c67 Dwight Engen 2014-12-11 1114 static void vdc_queue_drain(struct vdc_port *port)
76e74bbe0a38c67 Dwight Engen 2014-12-11 1115 {
fa182a1fa97dff5 Jens Axboe 2018-10-15 1116 struct request_queue *q = port->disk->queue;
1e1a9cecfab3f22 Christoph Hellwig 2025-01-31 1117 unsigned int memflags;
fa182a1fa97dff5 Jens Axboe 2018-10-15 1118
fa182a1fa97dff5 Jens Axboe 2018-10-15 1119 /*
fa182a1fa97dff5 Jens Axboe 2018-10-15 1120 * Mark the queue as draining, then freeze/quiesce to ensure
fa182a1fa97dff5 Jens Axboe 2018-10-15 1121 * that all existing requests are seen in ->queue_rq() and killed
fa182a1fa97dff5 Jens Axboe 2018-10-15 1122 */
fa182a1fa97dff5 Jens Axboe 2018-10-15 1123 port->drain = 1;
fa182a1fa97dff5 Jens Axboe 2018-10-15 @1124 spin_unlock_irq(&port->vio.lock);
76e74bbe0a38c67 Dwight Engen 2014-12-11 1125
1e1a9cecfab3f22 Christoph Hellwig 2025-01-31 1126 memflags = blk_mq_freeze_queue(q);
fa182a1fa97dff5 Jens Axboe 2018-10-15 1127 blk_mq_quiesce_queue(q);
fa182a1fa97dff5 Jens Axboe 2018-10-15 1128
fa182a1fa97dff5 Jens Axboe 2018-10-15 1129 spin_lock_irq(&port->vio.lock);
fa182a1fa97dff5 Jens Axboe 2018-10-15 1130 port->drain = 0;
64b48ec36dbed56 Stephen Rothwell 2025-02-03 1131 blk_mq_unquiesce_queue(q);
64b48ec36dbed56 Stephen Rothwell 2025-02-03 1132 blk_mq_unfreeze_queue(q, memflags);
76e74bbe0a38c67 Dwight Engen 2014-12-11 @1133 }
76e74bbe0a38c67 Dwight Engen 2014-12-11 1134
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 00/14] Enable lock context analysis
@ 2026-03-04 19:48 Bart Van Assche
2026-03-04 19:48 ` [PATCH 14/14] block: Enable lock context analysis for all block drivers Bart Van Assche
0 siblings, 1 reply; 3+ messages in thread
From: Bart Van Assche @ 2026-03-04 19:48 UTC (permalink / raw)
To: Jens Axboe
Cc: Christoph Hellwig, Damien Le Moal, Marco Elver, linux-block,
Bart Van Assche
Hi Jens,
During the most recent merge window the following patch series has been merged:
[PATCH v5 00/36] Compiler-Based Context- and Locking-Analysis
(https://lore.kernel.org/lkml/20251219154418.3592607-1-elver@google.com/). That
patch series drops support for verifying lock context annotations with sparse
and introduced support for verifying lock context annotations with Clang. The
support in Clang for lock context annotation and verification is better than
that in sparse. Hence this patch series that enables lock context analysis for
the block layer core and all block drivers.
The first patch in this series fixes a bug discovered in DRBD while enabling
lock context analysis.
Please consider this patch series for the upstream kernel.
Thanks,
Bart.
Bart Van Assche (14):
drbd: Balance RCU calls in drbd_adm_dump_devices()
blk-ioc: Prepare for enabling thread-safety analysis
block: Make the lock context annotations compatible with Clang
aoe: Add a lock context annotation
drbd: Make the lock context annotations compatible with Clang
loop: Add lock context annotations
nbd: Add lock context annotations
null_blk: Add more lock context annotations
rbd: Add lock context annotations
rnbd: Add more lock context annotations
ublk: Fix the lock context annotations
zloop: Add a lock context annotations
zram: Add lock context annotations
block: Enable lock context analysis for all block drivers
block/Makefile | 2 ++
block/bdev.c | 7 +++--
block/blk-cgroup.c | 7 +++--
block/blk-crypto-profile.c | 2 ++
block/blk-ioc.c | 2 +-
block/blk-iocost.c | 2 ++
block/blk-mq-debugfs.c | 12 ++++----
block/blk-zoned.c | 1 +
block/blk.h | 4 +++
block/ioctl.c | 1 +
block/kyber-iosched.c | 4 +--
block/mq-deadline.c | 8 +++---
drivers/block/Makefile | 2 ++
drivers/block/aoe/Makefile | 2 ++
drivers/block/aoe/aoecmd.c | 1 +
drivers/block/drbd/Makefile | 3 ++
drivers/block/drbd/drbd_bitmap.c | 20 +++++++------
drivers/block/drbd/drbd_int.h | 46 ++++++++++++++----------------
drivers/block/drbd/drbd_main.c | 45 ++++++++++++++++++++++-------
drivers/block/drbd/drbd_nl.c | 13 ++++++---
drivers/block/drbd/drbd_receiver.c | 20 +++++++------
drivers/block/drbd/drbd_req.c | 2 ++
drivers/block/drbd/drbd_state.c | 3 ++
drivers/block/drbd/drbd_worker.c | 6 ++--
drivers/block/loop.c | 4 +++
drivers/block/mtip32xx/Makefile | 2 ++
drivers/block/nbd.c | 3 ++
drivers/block/null_blk/Makefile | 2 ++
drivers/block/null_blk/main.c | 7 +++--
drivers/block/null_blk/zoned.c | 2 ++
drivers/block/rbd.c | 7 +++++
drivers/block/rnbd/Makefile | 2 ++
drivers/block/rnbd/rnbd-clt.c | 2 ++
drivers/block/ublk_drv.c | 6 +++-
drivers/block/xen-blkback/Makefile | 3 ++
drivers/block/zloop.c | 1 +
drivers/block/zram/Makefile | 2 ++
drivers/block/zram/zcomp.c | 3 +-
drivers/block/zram/zcomp.h | 6 ++--
drivers/block/zram/zram_drv.c | 1 +
include/linux/backing-dev.h | 2 ++
include/linux/blkdev.h | 11 +++++--
include/linux/bpf.h | 1 +
43 files changed, 197 insertions(+), 85 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 14/14] block: Enable lock context analysis for all block drivers
2026-03-04 19:48 [PATCH 00/14] Enable lock context analysis Bart Van Assche
@ 2026-03-04 19:48 ` Bart Van Assche
2026-03-05 1:33 ` Sergey Senozhatsky
0 siblings, 1 reply; 3+ messages in thread
From: Bart Van Assche @ 2026-03-04 19:48 UTC (permalink / raw)
To: Jens Axboe
Cc: Christoph Hellwig, Damien Le Moal, Marco Elver, linux-block,
Bart Van Assche, Justin Sanders, Philipp Reisner, Lars Ellenberg,
Christoph Böhmwalder, Md. Haris Iqbal, Jack Wang,
Roger Pau Monné, Minchan Kim, Sergey Senozhatsky
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>
---
drivers/block/Makefile | 2 ++
drivers/block/aoe/Makefile | 2 ++
drivers/block/drbd/Makefile | 3 +++
drivers/block/mtip32xx/Makefile | 2 ++
drivers/block/null_blk/Makefile | 2 ++
drivers/block/rnbd/Makefile | 2 ++
drivers/block/xen-blkback/Makefile | 3 +++
drivers/block/zram/Makefile | 2 ++
8 files changed, 18 insertions(+)
diff --git a/drivers/block/Makefile b/drivers/block/Makefile
index 2d8096eb8cdf..e17f6381b798 100644
--- a/drivers/block/Makefile
+++ b/drivers/block/Makefile
@@ -6,6 +6,8 @@
# Rewritten to use lists instead of if-statements.
#
+CONTEXT_ANALYSIS := y
+
# needed for trace events
ccflags-y += -I$(src)
diff --git a/drivers/block/aoe/Makefile b/drivers/block/aoe/Makefile
index b7545ce2f1b0..27bff6359a56 100644
--- a/drivers/block/aoe/Makefile
+++ b/drivers/block/aoe/Makefile
@@ -3,5 +3,7 @@
# Makefile for ATA over Ethernet
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_ATA_OVER_ETH) += aoe.o
aoe-y := aoeblk.o aoechr.o aoecmd.o aoedev.o aoemain.o aoenet.o
diff --git a/drivers/block/drbd/Makefile b/drivers/block/drbd/Makefile
index 67a8b352a1d5..8eaa83a7592b 100644
--- a/drivers/block/drbd/Makefile
+++ b/drivers/block/drbd/Makefile
@@ -1,4 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
+
+CONTEXT_ANALYSIS := y
+
drbd-y := drbd_buildtag.o drbd_bitmap.o drbd_proc.o
drbd-y += drbd_worker.o drbd_receiver.o drbd_req.o drbd_actlog.o
drbd-y += drbd_main.o drbd_strings.o drbd_nl.o
diff --git a/drivers/block/mtip32xx/Makefile b/drivers/block/mtip32xx/Makefile
index bff32b5d3c19..233961fdb41b 100644
--- a/drivers/block/mtip32xx/Makefile
+++ b/drivers/block/mtip32xx/Makefile
@@ -3,4 +3,6 @@
# Makefile for Block device driver for Micron PCIe SSD
#
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_BLK_DEV_PCIESSD_MTIP32XX) += mtip32xx.o
diff --git a/drivers/block/null_blk/Makefile b/drivers/block/null_blk/Makefile
index 84c36e512ab8..282b0d51a477 100644
--- a/drivers/block/null_blk/Makefile
+++ b/drivers/block/null_blk/Makefile
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
+CONTEXT_ANALYSIS := y
+
# needed for trace events
ccflags-y += -I$(src)
diff --git a/drivers/block/rnbd/Makefile b/drivers/block/rnbd/Makefile
index 208e5f865497..42c2cccdb53d 100644
--- a/drivers/block/rnbd/Makefile
+++ b/drivers/block/rnbd/Makefile
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
+CONTEXT_ANALYSIS := y
+
ccflags-y := -I$(srctree)/drivers/infiniband/ulp/rtrs
rnbd-client-y := rnbd-clt.o \
diff --git a/drivers/block/xen-blkback/Makefile b/drivers/block/xen-blkback/Makefile
index b0ea5ab5b9a1..864ef423226c 100644
--- a/drivers/block/xen-blkback/Makefile
+++ b/drivers/block/xen-blkback/Makefile
@@ -1,4 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
+
+CONTEXT_ANALYSIS := y
+
obj-$(CONFIG_XEN_BLKDEV_BACKEND) := xen-blkback.o
xen-blkback-y := blkback.o xenbus.o
diff --git a/drivers/block/zram/Makefile b/drivers/block/zram/Makefile
index 0fdefd576691..a5663ab01653 100644
--- a/drivers/block/zram/Makefile
+++ b/drivers/block/zram/Makefile
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
+CONTEXT_ANALYSIS := y
+
zram-y := zcomp.o zram_drv.o
zram-$(CONFIG_ZRAM_BACKEND_LZO) += backend_lzorle.o backend_lzo.o
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 14/14] block: Enable lock context analysis for all block drivers
2026-03-04 19:48 ` [PATCH 14/14] block: Enable lock context analysis for all block drivers Bart Van Assche
@ 2026-03-05 1:33 ` Sergey Senozhatsky
0 siblings, 0 replies; 3+ messages in thread
From: Sergey Senozhatsky @ 2026-03-05 1:33 UTC (permalink / raw)
To: Bart Van Assche
Cc: Jens Axboe, Christoph Hellwig, Damien Le Moal, Marco Elver,
linux-block, Justin Sanders, Philipp Reisner, Lars Ellenberg,
Christoph Böhmwalder, Md. Haris Iqbal, Jack Wang,
Roger Pau Monné, Minchan Kim, Sergey Senozhatsky
On (26/03/04 11:48), Bart Van Assche wrote:
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-06 8:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 8:02 [PATCH 14/14] block: Enable lock context analysis for all block drivers kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2026-03-04 19:48 [PATCH 00/14] Enable lock context analysis Bart Van Assche
2026-03-04 19:48 ` [PATCH 14/14] block: Enable lock context analysis for all block drivers Bart Van Assche
2026-03-05 1:33 ` Sergey Senozhatsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.