* [PATCH 02/62] blk-ioc: Prepare for enabling thread-safety analysis
[not found] <20260223214950.2153735-1-bvanassche@acm.org>
@ 2026-02-23 21:48 ` Bart Van Assche
2026-02-24 14:45 ` Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: Bart Van Assche @ 2026-02-23 21:48 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Bart Van Assche, Jens Axboe, Yu Kuai, Jan Kara, linux-block
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: Jens Axboe <axboe@kernel.dk>
Cc: Yu Kuai <yukuai3@huawei.com>
Cc: Jan Kara <jack@suse.cz>
Cc: linux-block@vger.kernel.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/blk-ioc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index d15918d7fabb..0bf78aebc887 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -364,7 +364,7 @@ static struct io_cq *ioc_create_icq(struct request_queue *q)
if (!icq)
return NULL;
- if (radix_tree_maybe_preload(GFP_ATOMIC) < 0) {
+ if (radix_tree_maybe_preload(GFP_ATOMIC) != 0) {
kmem_cache_free(et->icq_cache, icq);
return NULL;
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 02/62] blk-ioc: Prepare for enabling thread-safety analysis
[not found] <20260223215118.2154194-1-bvanassche@acm.org>
@ 2026-02-23 21:50 ` Bart Van Assche
0 siblings, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2026-02-23 21:50 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Ingo Molnar, Will Deacon, Boqun Feng, Waiman Long, linux-kernel,
Marco Elver, Christoph Hellwig, Steven Rostedt, Nick Desaulniers,
Nathan Chancellor, Kees Cook, Jann Horn, Bart Van Assche,
Jens Axboe, Yu Kuai, Jan Kara, linux-block
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: Jens Axboe <axboe@kernel.dk>
Cc: Yu Kuai <yukuai3@huawei.com>
Cc: Jan Kara <jack@suse.cz>
Cc: linux-block@vger.kernel.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/blk-ioc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index d15918d7fabb..0bf78aebc887 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -364,7 +364,7 @@ static struct io_cq *ioc_create_icq(struct request_queue *q)
if (!icq)
return NULL;
- if (radix_tree_maybe_preload(GFP_ATOMIC) < 0) {
+ if (radix_tree_maybe_preload(GFP_ATOMIC) != 0) {
kmem_cache_free(et->icq_cache, icq);
return NULL;
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 02/62] blk-ioc: Prepare for enabling thread-safety analysis
[not found] <20260223220102.2158611-1-bart.vanassche@linux.dev>
@ 2026-02-23 22:00 ` Bart Van Assche
2026-02-23 22:00 ` [PATCH 03/62] drbd: Balance RCU calls in drbd_adm_dump_devices() Bart Van Assche
1 sibling, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2026-02-23 22:00 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Ingo Molnar, Will Deacon, Boqun Feng, Waiman Long, linux-kernel,
Marco Elver, Christoph Hellwig, Steven Rostedt, Nick Desaulniers,
Nathan Chancellor, Kees Cook, Jann Horn, Bart Van Assche,
Jens Axboe, Yu Kuai, Jan Kara, linux-block
From: 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: Jens Axboe <axboe@kernel.dk>
Cc: Yu Kuai <yukuai3@huawei.com>
Cc: Jan Kara <jack@suse.cz>
Cc: linux-block@vger.kernel.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/blk-ioc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index d15918d7fabb..0bf78aebc887 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -364,7 +364,7 @@ static struct io_cq *ioc_create_icq(struct request_queue *q)
if (!icq)
return NULL;
- if (radix_tree_maybe_preload(GFP_ATOMIC) < 0) {
+ if (radix_tree_maybe_preload(GFP_ATOMIC) != 0) {
kmem_cache_free(et->icq_cache, icq);
return NULL;
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 03/62] drbd: Balance RCU calls in drbd_adm_dump_devices()
[not found] <20260223220102.2158611-1-bart.vanassche@linux.dev>
2026-02-23 22:00 ` [PATCH 02/62] blk-ioc: Prepare for enabling thread-safety analysis Bart Van Assche
@ 2026-02-23 22:00 ` Bart Van Assche
1 sibling, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2026-02-23 22:00 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Ingo Molnar, Will Deacon, Boqun Feng, Waiman Long, linux-kernel,
Marco Elver, Christoph Hellwig, Steven Rostedt, Nick Desaulniers,
Nathan Chancellor, Kees Cook, Jann Horn, Bart Van Assche,
Andreas Gruenbacher, linux-block
From: Bart Van Assche <bvanassche@acm.org>
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.
Cc: Andreas Gruenbacher <agruen@linbit.com>
Cc: linux-block@vger.kernel.org
Fixes: a55bbd375d18 ("drbd: Backport the "status" command")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
drivers/block/drbd/drbd_nl.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index e201f0087a0f..728ecc431b38 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -3378,8 +3378,10 @@ int drbd_adm_dump_devices(struct sk_buff *skb, struct netlink_callback *cb)
if (resource_filter) {
retcode = ERR_RES_NOT_KNOWN;
resource = drbd_find_resource(nla_data(resource_filter));
- if (!resource)
+ if (!resource) {
+ rcu_read_lock();
goto put_result;
+ }
cb->args[0] = (long)resource;
}
}
@@ -3628,8 +3630,10 @@ int drbd_adm_dump_peer_devices(struct sk_buff *skb, struct netlink_callback *cb)
if (resource_filter) {
retcode = ERR_RES_NOT_KNOWN;
resource = drbd_find_resource(nla_data(resource_filter));
- if (!resource)
+ if (!resource) {
+ rcu_read_lock();
goto put_result;
+ }
}
cb->args[0] = (long)resource;
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 02/62] blk-ioc: Prepare for enabling thread-safety analysis
2026-02-23 21:48 ` Bart Van Assche
@ 2026-02-24 14:45 ` Christoph Hellwig
2026-02-24 17:35 ` Bart Van Assche
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2026-02-24 14:45 UTC (permalink / raw)
To: Bart Van Assche
Cc: Peter Zijlstra, Jens Axboe, Yu Kuai, Jan Kara, linux-block
On Mon, Feb 23, 2026 at 01:48:50PM -0800, Bart Van Assche wrote:
> 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.
This is a series with 62 patches, of which only some and not the cover
letter made it to linux-block. You're doing something seriously
wrong in your patch submission.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 02/62] blk-ioc: Prepare for enabling thread-safety analysis
2026-02-24 14:45 ` Christoph Hellwig
@ 2026-02-24 17:35 ` Bart Van Assche
0 siblings, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2026-02-24 17:35 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Peter Zijlstra, Jens Axboe, Yu Kuai, Jan Kara, linux-block
On 2/24/26 6:45 AM, Christoph Hellwig wrote:
> This is a series with 62 patches, of which only some and not the cover
> letter made it to linux-block. You're doing something seriously
> wrong in your patch submission.
The two SMTP servers that I tried (smtpauth.mailroute.net and
smtp.migadu.com) gave up about halfway this patch series (quota
exceeded / too many recipients).
Peter Zijlstra asked me to split this series and to send the patches
from this series directly to the maintainers of the affected code rather
than to send these patches as one large patch series to him.
Thanks,
Bart.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-02-24 17:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260223220102.2158611-1-bart.vanassche@linux.dev>
2026-02-23 22:00 ` [PATCH 02/62] blk-ioc: Prepare for enabling thread-safety analysis Bart Van Assche
2026-02-23 22:00 ` [PATCH 03/62] drbd: Balance RCU calls in drbd_adm_dump_devices() Bart Van Assche
[not found] <20260223215118.2154194-1-bvanassche@acm.org>
2026-02-23 21:50 ` [PATCH 02/62] blk-ioc: Prepare for enabling thread-safety analysis Bart Van Assche
[not found] <20260223214950.2153735-1-bvanassche@acm.org>
2026-02-23 21:48 ` Bart Van Assche
2026-02-24 14:45 ` Christoph Hellwig
2026-02-24 17:35 ` Bart Van Assche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox