Skip to content

block: fix race between adding wbt and normal IO

Ming Lei linux-block 3 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 6 repliesApplied
  2. v22 patches 2 repliesSuperseded
  3. v14 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- use ->queue_lock for protecting concurrent adding/deleting rqos on same queue

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2block: fix race between adding/removing rq qos and normal IOblock/blk-rq-qos.h+24 -01 reply
2/2block: mark queue init done at the end of blk_register_queueblock/blk-sysfs.c+15 -141 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchBart Van AsscheYi Zhang
SeriesT-b
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH V3 0/2] block: fix race between adding wbt and normal IO

Hello,

Yi reported several kernel panics on:

[16687.001777] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
...
[16687.163549] pc : __rq_qos_track+0x38/0x60

or

[  997.690455] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020
...
[  997.850347] pc : __rq_qos_done+0x2c/0x50

Turns out it is caused by race between adding wbt and normal IO.

Fix the issue by freezing request queue when adding/deleting rq qos.

V3:
- use ->queue_lock for protecting concurrent adding/deleting rqos on same queue

V2:
- switch to the approach of freezing queue, which is more generic than V1.

Ming Lei (2):
block: fix race between adding/removing rq qos and normal IO
block: mark queue init done at the end of blk_register_queue

 block/blk-rq-qos.h | 24 ++++++++++++++++++++++++
 block/blk-sysfs.c  | 29 +++++++++++++++--------------
 2 files changed, 39 insertions(+), 14 deletions(-)
Cc Yi Zhang <[email protected]>
Cc Bart Van Assche <[email protected]>
Signature · 1 line
2.31.1