-
Notifications
You must be signed in to change notification settings - Fork 0
Fix an error path in disk_update_zone_resources() #487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: linus-master_base
Are you sure you want to change the base?
Conversation
|
Upstream branch: b543459 |
06634b5 to
8a473ad
Compare
|
Upstream branch: 944aacb |
53c4c3b to
10b6193
Compare
8a473ad to
fa94b37
Compare
|
Upstream branch: 944aacb |
10b6193 to
3388a7d
Compare
fa94b37 to
41a5848
Compare
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Any queue_limits_start_update() call must be followed either by a
queue_limits_commit_update() call or by a queue_limits_cancel_update()
call. Make sure that the error path near the start of
disk_update_zone_resources() follows this requirement. Remove the
"goto unfreeze" statement from that error path to make the code easier
to verify.
This was detected by annotating the queue_limits_*() calls with Clang
thread-safety attributes and by building the kernel with thread-safety
checking enabled. Without this patch and with thread-safety checking
enabled, the following error is reported:
block/blk-zoned.c:2020:1: error: mutex 'disk->queue->limits_lock' is not held on every path through here [-Werror,-Wthread-safety-analysis]
2020 | }
| ^
block/blk-zoned.c:1959:8: note: mutex acquired here
1959 | lim = queue_limits_start_update(q);
| ^
Cc: Damien Le Moal <dlemoal@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Fixes: bba4322 ("block: freeze queue when updating zone resources")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
Upstream branch: 6c79021 |
3388a7d to
eb017d3
Compare
Pull request for series with
subject: Fix an error path in disk_update_zone_resources()
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1042470