[PATCH v2 0/2] fix request uaf in nbd_read_stat()

From: Yu Kuai
Date: Sun Aug 08 2021 - 22:58:53 EST


This patchset fix request uaf in nbd, other drivers might have the
same problem. Will fix them later if this patchset is accepted.

Changes in v2:
- as Bart suggested, add a new helper function for drivers to get
request by tag.

Yu Kuai (2):
blk-mq: add a new interface to get request by tag
nbd: convert to use blk_mq_get_rq_by_tag()

block/blk-mq-tag.c | 33 +++++++++++++++++++++++++++++++++
block/blk-mq.c | 1 +
block/blk-mq.h | 1 -
drivers/block/nbd.c | 11 ++++++-----
include/linux/blk-mq.h | 3 +++
5 files changed, 43 insertions(+), 6 deletions(-)

--
2.31.1